zherczeg / sljit

Platform independent low-level JIT compiler
Other
843 stars 74 forks source link

Fix locking region in sjlit_malloc_exec #244

Closed lbonn closed 7 months ago

lbonn commented 7 months ago

The locked section needs to extend until we are done modifying internal block offsets and sizes, otherwise we risk running into data corruption in a multi-threaded context.

This bug was introduced in 7de0fee9a7376b33e31a3903487cd9933da3a606

See: https://github.com/PCRE2Project/pcre2/issues/402

zherczeg commented 7 months ago

Thank you!