Repository navigation
Conversation
…ch; relax only the native reference Under Wine the builtin ucrtbase has already configured argc and both argv widths when the process image's TLS callback and the DLL's DllMain run, so the native reference run could not show the console-like "argv not configured at attach" state and failed before gta6rt was tested. Detect Wine in the fixture (ntdll wine_get_version) and relax that one clause for the directly run image only; the command lines are still compared, the attach-time argc must equal main's, and the gta6rt --run steps keep every assertion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…it as "Unknown exception") --init/--run held the failed attach in a std::exception_ptr and rethrew it after the binding report. Under Wine the stored exception is freed before the rethrow, so the user saw "error: Unknown exception" instead of "<dll>: DllMain returned FALSE". Copy what() in the first catch and throw a fresh runtime_error with it; the outer catch prints the same "error: <message>" and returns 1 as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent native Windows check of 3fd27e56 with MSVC 19.44.35230 x64, Release. The stock For the refusal, the loader exited 1 and printed Native Windows coverage with synthetic inputs. AI-assisted. |
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.
Claim: #7913 (
run_startup_cmdlineunder Wine)run_startup_cmdlinefails under Wine. Fixing the reason it fails first turned up a loader bug behind it, so this PR has two commits.1.
gta6rt: an init failure's message survives the rethrow (runtime/src/main.cpp, +8/−5)--init/--runkept the init failure in astd::exception_ptrand later calledstd::rethrow_exception. Under Wine the outer handler then printederror: Unknown exceptioninstead of<module>: DllMain returned FALSE. Wine's ucrtbase frees the stored exception before the rethrow (seen withWINEDEBUG=trace+seh). So when a package DLL'sDllMainfailed under Wine, the user lost the one line that names it.The first catch now copies
e.what()into astd::string, and the rethrow site throws a freshstd::runtime_errorwith it. That catch only ever handledstd::exception, so nothing else changes. On Windows, stdout, stderr and the exit code stay byte-for-byte the same; the binding report still prints before it. The--initcommand-line area that #3881 edits is untouched.2.
tiny_startup_cmdline: relax only the native reference under Wine (runtime/test/fixtures/tiny_startup_cmdline.cpp, +25/−2)The test's native reference run asserts that, at DLL attach, the UCRT hasn't configured
argc/argv/wargvyet. That's true of Microsoft's UCRT, but Wine's built-in ucrtbase configures all three when it loads. So the test failed at the native step ("Native startup command line (args) returned 1") before testing the loader.gta6rt.exe) and Wine (ntdll!wine_get_version, as tiny_game_abort_test: skip the native abort comparison under Wine #7904 does).argcthat matches. The "no wide argv at main" clause is skipped.gta6rt --runpath. The loader still has to provide the console-like state. Windows is unchanged.Tested
Linux, Wine 10.0, clang-cl 21 + xwin cross build of
maindde82f2. The ctest results:mainrun_startup_cmdlineargsstepfail_initfails: "error: Unknown exception"loader,pe_loader,startup_trace,dll_thread_calls,gta6rt_rejects_dry-run_initandgta6rt_rejects_init_run.main.cppreverted,fail_initfails again with "Unknown exception".argcfails in both the native and thegta6rtrun.scripts/check_no_game_data.py. No game files are involved.AI-assisted (Claude Code, Sonnet subagent, reviewed and re-run).
🤖 Generated with Claude Code