[WASM_WORKERS] Fix UB in pthread_mutex with debug+hybrid builds in pthread_mutex_unlock.c#26699
[WASM_WORKERS] Fix UB in pthread_mutex with debug+hybrid builds in pthread_mutex_unlock.c#26699stephenduong1004 wants to merge 4 commits intoemscripten-core:mainfrom
Conversation
[WASM_WORKERS] Fix UB in pthread_mutex with debug+hybrid builds in pthread_mutex_unlock.c
|
thanks @stephenduong1004 ! |
sbc100
left a comment
There was a problem hiding this comment.
Actually I'm not so sure about this. IIUC its only really possible to make PTHREAD_MUTEX_NORMAL work with this hack.
Other types of mutex rely on things like self->robust_list.
Are you trying to make mutex types other than PTHREAD_MUTEX_NORMAL work when called from wasm workers?
|
I think the mismatch between pthread_mutex_unlock.c and pthread_mutex_trylock.c https://github.com/emscripten-core/emscripten/pull/26673/changes#diff-b6d40570bfd7b8bba0fc45e0956292fb0dfffa5d0faee1e3be198a2e34157845 is causing some errors in hybrid mode. I am not sure if this is the best approach... |
Are you able to config if this fix address your issues? It seems odd that it would because if your program is using anything other than |
Follow-up of #26673