tests: record SEH faults through a sink so clang-cl can build the probe #3869
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3869"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-02T15:46:42Z.
Refs #3867. Second of the three gaps in that report — this one is a compiler crash, not a warning.
The crash.
clang 19.1.1dies in the frontend with exit 139 while outlining the SEH filter in this file:Reduced to ~20 lines. The trigger is an
__exceptfilter expression that both calls theGetExceptionInformation()intrinsic and takes the address of an escaping local:capture_fault(GetExceptionInformation(), &info)capture_fault(plain_ep(), &info)— same shape, no intrinsiccapture_fault(GetExceptionInformation())— no captured localSo the captured local is what clang must recover inside the outlined filter, and it fails only when the filter also references the exception record. The reproducer is small enough to report upstream; I have not filed it with LLVM, so say if you would rather I did.
Change. The filter captures nothing and records into a
thread_localsink that the probe sets immediately before__tryand clears after:The fields written, their order and the return value are unchanged. The probe loop is single-threaded, and
thread_localkeeps it correct if that ever changes. MSVC accepts both forms, so this is not a workaround that costs MSVC anything.Verified — Debian, clang-cl 19.1.1,
xwin splatSDK 10.0.26100, Release,main0939575e:Not established. I could not run it: the executable imports
xmem.dlland does not start under Wine here, so behaviour preservation is by construction, not measured. The Windows job is the real check for both correctness and the MSVC side.Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-12-02T15:46:54Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
c7a5e6dℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T15:57:45Z.
Review: APPROVED
I reviewed
c7a5e6d3and verified the probe on Windows/MSVC Debug.cmake --build --preset dev --target xmem_commit_protection_check xmem_shimcompleted, andctest --preset dev --no-tests=error -j 1 -R '^xmem_commit_protection$' --output-on-failurepassed 1/1. Both probe paths set and clear the thread-local sink, and the handled exception still records its operation and address. The clang-cl 19.1.1 build evidence is from the author.