Repository navigation
Fix xcpt4 source decompilation with explicit unresolved SEH state - #969
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The x64 MSVC xcpt4 fixture in #858 aborted source decompilation when an unproved
_local_unwindcontinuation remained an independent machine entry. Preserve its decoded source body by carrying unknown entry register/stack values instead of asserting an entry-relative invocation frame. The original eleven-case analysis matrix now passes, andsub_140001500retains its guarded SEH/GS body with 114 structured regions, zero fallback regions and an explicit unresolved-frame annotation.LowIR still validates unwind/prologue consistency, protected-range SP stability and every resolved switch target. Only published ordinary entries may introduce source-only unknown state; an unrelated disconnected protected path still refuses. The x86 MedIR helper seeds those entries and keeps a shared handler’s ordinary and exceptional SP inputs separate. Patch/lift conversion retains strict frame checks, and direct LLVM emission rejects unresolved source frames. This change does not add saved-memory authority across opaque calls or complete native xcpt4 reconstruction.
Add a reusable local Wine/source acceptance script and run it with the full analysis matrix in the focused Windows EH CI lane. It records original executable observations separately from source analysis, checks every runtime result even after exit zero, and allows only the fixture’s compile-time-disabled x64 alignment test 29 to skip. No submodule revisions change.
Validation on
942033df3ff9fd924855ae54b5142d2c6cd5d520, integrated with dev, using the Release/r4 profile with CPU/driver emulation and semantic tests disabled:NeverDLiftTests: 7,143 cases; 7,102 pass, 41 platform/toolchain skips, zero failures (400 seconds). The skips include Apple-only Mach-O/Objective-C execution, unavailable Swift/cross-compilers and optional external parity inputs.NeverDMedEntryFrameTests: 41 pass, including independent/shared entries, unresolved LLVM rejection, malformed unwind/SP controls, complete switch targets and unlisted disconnected roots.NeverDSEHRuntimeMemoryTests: 33 pass, including opaque-call and saved-frame-slot overwrite refusals.NeverDWindowsEHCorpusTests --gtest_filter=WindowsEHModesCorpus.*: all five tests pass, including the original eleven-case matrix and the optimized FH3/registration recursion regressions.check_windows_xcpt4_source.py: local Wine 10 original execution exits 0, with 89 successes and only test 29 skipped; the original full-image source CLI succeeds. Default optimized source output also passes its body/annotation checks, while the LLVM CLI still refuses the unresolved frame.git diff --checkand the documentation translation check pass.The complete PE32 application probes have a separate 240-second child limit within their existing 300-second CTest deadline. A single-CPU, single-worker run of the large optimized PE32 xcpt4 succeeded in 123.6 seconds, exceeding the previous 120-second small-probe limit. All five mode tests then passed in 129.4 seconds under that isolated configuration. Static work budgets and output checks are unchanged.
The production code tested above is unchanged in final head
dd9fa81ce143e39f06e50e3f70f4b899b7259ffd; its final delta adjusts only the test timeout and documentation. Focused Windows EH/Wine CI is queued on this head. The code changes have complete local validation and the previous CI passed the x64 source acceptance and focused IR/PE checks; the final change is limited to the locally verified subprocess allowance and documentation. The previous run passed the x64 eleven-case matrix and all 597 focused IR/PE checks, then hit the PE32 subprocess time limit.Follow-up: the focused CI completed all 597 IR/PE checks and all nine corpus checks, then exposed a missing Wine64 package in the new PE64 observation step. PR #970 installs that dependency and is merged to dev. The focused rerun passed, including the original PE64 Wine execution and source acceptance.