Skip to content

Rebuild PE32 SEH state and EH4 nonlocal continuations - #1086

Merged
gmh5225 merged 8 commits into
devfrom
codex/pe32-seh-dynamic-parent-calls
Oct 15, 2026
Merged

gmh5225 merged 8 commits into
devfrom
codex/pe32-seh-dynamic-parent-calls

Conversation

@gmh5225

@gmh5225 gmh5225 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

PE32 functions can now retain a live jump buffer across a proved private helper call, call ordinary code under multiple checked SEH states, and rebuild EH4 nonlocal transfers with the original cookie protocol.

Keep one source body and its PHI edges while projecting the checked physical scope selector into LLVM's inherited-call contract. A shared COFF binder validates exact source receipts. Private helper graphs must have immutable code, zero cleanup, no stack arguments or object borrow, and checked image effects; caller-frame lifetime and result provenance remain independent obligations.

EH4 capture authenticates the load-config cookie address, encoded scope table, third unwind argument and physical capture PC. The state solver protects all eleven initialized buffer words, separates callback scratch from the establisher, and follows the CRT's -2 unwind sentinel. Distinct EH3/EH4 native bridges preserve the original unwind helper. Tests cover GS/no-GS, finally/filter transfers, zero-value normalization, retired scopes, corrupted cookies, buffer overlap and forged source/IR contracts.

The LLVM gitlink and all three r6 package hashes refer to main commit 06788fb19109851e6a6b9f109a2b8027a606f0c6. The Linux package passed 53 LLVM RUN lines; each platform's archive, BUILDINFO and dynamic-call interface were checked. Release https://github.com/NeverSight/llvm-project/releases/tag/neverd-llvm-v23.0.0-r6 is published, and the release workflow completed successfully. Public asset digests match the validated artifacts.

Validation:

  • All 90 scenarios passed 1,800 Wine executions, then an independent 1,800-execution replay of the exact images.
  • The full lifting suite and 11 related C++ targets: 8,133 passed, 73 explicit skips, zero failures.
  • 108 registration Python tests, 23 prebuilt package tests, 203 SDK tests (103 unavailable native integration skips), clang-format 22.1.2 and 309 Markdown files across 10 locales passed.

The dev integration also fixes three missing Python Local Types ABI declarations and reuses an ancestor-owned zlib CMake target. The integrated rebuild and all 12 C++ targets passed; all 90 scenarios also passed another 1,800 Wine executions after integration. The ARM32 PE/Wine workflow is queued at https://github.com/NeverSight/NeverD/actions/runs/38808157470. Multi-state capture, suspended-finally handler transfers, borrowed EH4 helper buffers and remaining C++ lifetime protocols still require separate proofs.

@gmh5225 gmh5225 changed the title Support PE32 SEH calls reached through multiple scopes Preserve PE32 SEH state and live captures across parent calls Oct 15, 2026
@gmh5225 gmh5225 changed the title Preserve PE32 SEH state and live captures across parent calls Rebuild PE32 SEH state and EH4 nonlocal continuations Oct 15, 2026
@gmh5225
gmh5225 marked this pull request as ready for review October 15, 2026 21:24
@gmh5225
gmh5225 merged commit c05ace9 into dev Oct 15, 2026
16 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants