Repository navigation
Fix Boost.Context corrupting the exception state on coroutine resume - #11168
Draft
jschmidt-icinga wants to merge 2 commits into
Draft
jschmidt-icinga wants to merge 2 commits into
jschmidt-icinga wants to merge 2 commits into
Conversation
jschmidt-icinga
force-pushed
the
coroutine-exception-corruption
branch
2 times, most recently
from
November 12, 2026 09:20
2a669eb to
8b83266
Compare
jschmidt-icinga
force-pushed
the
coroutine-exception-corruption
branch
from
November 12, 2026 09:22
8b83266 to
e5f91e2
Compare
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.
This adds a workaround for boostorg/context#323 which manifests on boost versions 1.88 through 1.91. The workaround redefines
__cxa_get_globalswhile the Boost.Fiber header is being included to a custom wrapper function that cannot be inlined or have its result cached.Affected distro releases:
Test case
I added a test case that acts as both diagnostic tool to see which distros are affected as well as verification for the fix. See here for a negative test run without the fix (if the Ubuntu repo gods are merciful today).
The test case also functions as easy to follow documentation for how the bug manifests.
Alternatives
This is obviously quite ugly, but there are no good alternatives. Alternatives considered:
-fno-inline: Would solve the issue, but cost a lot of performance and be less reliable, because we can only control it for our own packages and even then it would need to be carefully tested in combination with other optimization flags.Fixes #11160.