Repository navigation
allocator_proxy, queue_proxy tests: take the guard fault's code in the filter (Wine 9) - #6864
Conversation
…e filter Under Wine 9.0 (Ubuntu 24.04's wine) allocator_proxy failed at read_slot_guarded(vtable, slot) == EXCEPTION_ACCESS_VIOLATION although the read past the table did fault in the guard region, at the slot's address: GetExceptionCode() in the __except body returned 0. clang-cl reads it there from what the unwind hands the handler, which that Wine does not supply; inside the filter the exception record is right. read_slot_guarded now records ExceptionRecord->ExceptionCode in its filter, as it already did for the address, in both tests (queue_proxy_test has the same helper and fails the same way at line 435 once its child-runner check passes). The runtime itself only calls GetExceptionCode() in filters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014W1f1QexoRrV2Dg68CN4cD
|
Tested
So with MSVC on Windows, the code taken in the filter is |
|
Tested
|
|
Verified at dd74782 merged with current main 023952c: the change is confined to the SEH filters in the two proxy tests — reading the fault code from the exception record inside the filter (reset before each guarded read) rather than GetExceptionCode() in the handler body, which returns 0 under Wine 9's unwinder — and both files get identical treatment. Not buildable or runnable on this CPU-only Linux verifier, so the Windows/Wine job is the execution gate. Checks pending. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run, C++ review-only). |
shayderrr
left a comment
There was a problem hiding this comment.
Summary
In runtime/test/allocator_proxy_test.cpp and queue_proxy_test.cpp, record_fault() now records ExceptionRecord->ExceptionCode into a new g_fault_code, and read_slot_guarded() returns that value instead of GetExceptionCode() from the __except body. Both reset the global before each guarded read.
Why merge
Under Wine 9, GetExceptionCode() inside the handler returns 0 even though the guard fault occurs at the correct address, making these tests fail spuriously. The code is valid inside the filter; the test-only change fixes Wine 9 with no behavior change on Windows and no runtime changes.
Verdict: Approve
SummaryIn Why mergeUnder Wine 9, Verdict: Approve |
Item: new TEST item claimed in #6750 (claim).
What: under Wine 9.0 (the
winepackage of Ubuntu 24.04 LTS)allocator_proxyfails atalthough the read past the proxy table does fault in the guard region, at the slot's address (
g_fault_addressmatches). A debug print in the handler showedGetExceptionCode()returning 0 in the__exceptbody. clang-cl reads the code there from what the unwind passes to the handler, which Wine 9 does not supply; inside the filter theEXCEPTION_RECORDis right.Change (tests only):
read_slot_guardedrecordsExceptionRecord->ExceptionCodein its filter (record_fault, which already records the address) and returns that, inallocator_proxy_test.cppand in the identical helper ofqueue_proxy_test.cpp. On Windows the value is the same as before. The runtime itself callsGetExceptionCode()only in filter expressions (checked with grep overruntime/), so it is not affected.Tests (Ubuntu 24.04, Wine 9.0
9.0~repack-4build3, NVIDIA RTX 4090, real Wayland display; cross-built with clang-cl/lld-link 19.1.1 + xwin 0.10.0, SDK 10.0.26100):ctest -R '^allocator_proxy$': passes (before: the failure above).queue_proxy: with this change and its child-runner crash check temporarily disabled locally, the whole test passes; with the oldGetExceptionCode()and the same local change it fails atline 435: read_slot_guarded(vtable, slot) == EXCEPTION_ACCESS_VIOLATION, the same bug.queue_proxyas committed still fails earlier under Wine 9, atchild runner line 1036(--child-crashchild: exit code 0, 8.4 KB printed instead of 100). That is Wine's crash debugger:winedbg --autowrites its register dump into the child's stdout pipe and the process ends with 0; settingAeDebug\Debuggertofalsedid not change it on this Wine. Not a runtime bug and not touched here (the runner side of winedbg is run_wine_tests: an aborted test ends at once instead of waiting 120 s for winedbg (~12 min off each Wine CI job) #4462).proton rundoesn't load the Vulkan stack on this machine).No game files.
AI-assisted (Claude Code, Claude Opus 5.5).
🤖 Generated with Claude Code
https://claude.ai/code/session_014W1f1QexoRrV2Dg68CN4cD