Fix segmentation fault when using jq in threads
Before adoption: this commit came in with the history the project adopted, so no landing records it.
In previous code nomem_handler in jv_alloc.c is called only once and therefore the structure is not initialized for second and following threads. This leads to segmentation fault in multi-threading environment. This patch moves initialization of nomem_handler out of the pthread_once call.
authored by Tomas Halman · committed by Nico Williams · parent 5300fbd · Browse files · 1 file+26 added−7 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+26 added−7 removed
- other:+26 added−7 removed