Repository navigation
pipeline_workers: keep the rethrown error alive for Wine 11.0's rethrow_exception; pipeline_workers passes under Wine - #2374
Draft
Tauwni wants to merge 2 commits into
Conversation
… Wine 11.0's rethrow_exception Wine 11.0's rethrow_exception throws the stored object itself, not a copy. run() rethrew batch.error, the exception_ptr of a local Batch, which the unwinding then freed, so the caller caught no runtime_error. A thread_local exception_ptr now holds the object until the thread's next error. Same Wine bug as gta6rt's DllMain failure (ubiquitarianism#1086). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Under Wine 11.0,
pipeline_workersfails every round of itsexceptions()case ("run() rethrew no exception, or not the lowest job's"). On native Windows and macOS it passes.PipelineWorkers::run()(runtime/src/pipeline_workers.h) keeps the lowest job's error in theexception_ptrof aBatchon its own stack and ends withstd::rethrow_exception(batch.error). Wine 11.0'srethrow_exceptionthrows the stored object itself, not a copy. So the unwinding out ofrun()destroysbatch, frees that object while it is still in flight, and the caller'scatch (const std::runtime_error&)never sees it. #1086 found the same Wine behaviour ingta6rt'sDllMainfailure path and keeps a copy there.Here the error type is whatever a job throws, so a copy of a known type doesn't fit. Instead, a
thread_local std::exception_ptrtakes the error just before the rethrow and keeps the object alive until that thread's next error. Nothing else changes: the lowest-index rule, the stop and the inline path for one job stay as they are.Tested on an Apple M3 (macOS 26.5.1) at
mainfbf100b1b:pipeline_workerspipelinemain; PASS with this, 3 runs out of 3vk_pipeline_check_cli(a timeout) andpipeline_cache_seedfail with and without this changemain)d3d12_pipeline_workers,d3d12_pipeline_workers_eagerandreplay_pipeline_compiles*, which run throughPipelineWorkers, pass under Wine with this change.AI-assisted (Claude Code). No game data.
🤖 Generated with Claude Code