Files
reactos/sdk/lib/pseh
Ahmed Arif ff6bd79221 [PSEH] Fix x64 ABI compliance and register clobbering in exception filters (#8700)
pseh2_64 relied on inline-asm clobbers across a C/asm funclet jump, which is not a reliable ABI boundary.
On AMD64 gcc path, this can corrupt non-volatile state during exception filtering/unwind.

This change makes the trampoline ABI-safe by explicitly preserving and restoring non-volatile registers and keeping unwind metadata/prologue consistent.

Changes:
- Save/restore rbx, rdi, rsi, r12-r15 in `__seh2_global_filter_func`.
- Adjust stack allocation/unwind annotation to match the new prologue/epilogue.
- Keep filter return in eax and jump back through `__seh2_global_filter_func_exit`.

Note: This is exception-only path: extra stack usage is acceptable for correctness.

How to test: Build and run ReactOS with gcc 13/15; you should no longer see stack exhaustion.
2026-03-17 22:42:37 +01:00
..
2025-08-22 09:12:51 +03:00