HaxeFoundation / hxcpp

Runtime files for c++ backend for haxe
Other
297 stars 189 forks source link

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

Open gepatto opened 3 months ago

gepatto commented 3 months ago

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