mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
The detached Universal TXM worker thread can still be stuck in brk #0xf00d when the main thread falls back to legacy brk #0x69. Previously the old SIGTRAP handler was restored immediately after the legacy path, so a late trap from the worker hit the default handler and killed the process. Move the sigaction restore to AFTER vm_remap + mprotect complete, and add it to every error-return path. This keeps our handler installed during the entire allocation so late worker traps are caught safely.