diff options
| author | Spaghetih <191181391+Spaghetih@users.noreply.github.com> | 2026-11-21 21:47:59 +0100 |
|---|---|---|
| committer | Spaghetih <191181391+Spaghetih@users.noreply.github.com> | 2026-11-21 23:18:59 +0100 |
| commit | 27d1b11b649dca7bb7627061320e5af1612bedef (patch) | |
| tree | bea25811ebbd5f8f1c1be50decabdf40e68ab095 /runtime/src/main.cpp | |
| parent | 36ace7135e897c228eede5d1d8c28e972285cb14 (diff) | |
Runtime: register each mapped image's x64 unwind table (.pdata) with RtlAddFunctionTable
Images the loader maps by hand are unknown to the system unwinder, so an exception raised in or passing through one couldn't be dispatched and killed the process. load() now validates the exception directory (entries in bounds, sorted, non-overlapping; zero-length entries allowed, as in System32's symcryptk.dll) and registers it; the loader removes it before freeing the image. Rules measured over 3,780 x64 System32 images (5,023,071 entries) and the 16 package DLLs.
Tests: loader_test covers registration, removal and six corrupt tables on hand-built images; pe_loader_test checks a fixture SEH fault is caught by the image's own handler (fails without registration) and, with LEONIDA_GAME_DIR, every package DLL's table.
AI-assisted.
Diffstat (limited to 'runtime/src/main.cpp')
0 files changed, 0 insertions, 0 deletions