bus error from unaligned access in threads on 64bit raspberry pi.

Open
#1,136 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
50/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Read Thread.h and Thread.cpp, focusing on the pthread_cond_t and pthread_mutex_t initialization and destruction mentioned in the issue. Reproduce the bus error with hxcpp threads on a 64-bit Raspberry Pi and verify that the issue no longer occurs without forcing HXCPP_ALIGN_ALLOC.

Written by the indexing model from the issue text.

Description

hxcpp Threads are causing bus errors an 64bit (os) RaspberryPi .

forcing HXCPP_ALIGN_ALLOC solves the problem.

quoting Hugh:
the better way would be to replace the pthread_cond_init calls with a malloc + a pthread_cond_init call and the pthread_cond_destroy calls with a pthread_cond_destroy + free calls. Same for pthread_mutex_t. In Thread.h and Thread.cpp

Dominant language
C++
Stars
330
Forks
237
Avg merge
1d 3h
Merged PRs (30d)
20

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HaxeFoundation/hxcpp

All issues in HaxeFoundation/hxcpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.