Skip to content

Add boost.context patch for std::uncaught_exceptions() misreporting 0 while abandoning the coroutine - #16197

Merged
xokdvium merged 3 commits into
masterfrom
boost-context-patch-uncaught-exceptions
Jul 22, 2026
Merged

xokdvium merged 3 commits into
masterfrom
boost-context-patch-uncaught-exceptions

Conversation

@xokdvium

Copy link
Copy Markdown
Contributor

Motivation

Applies a patch to our boost.context dependency to fix
#16174. An alternative would be to
apply basically the same workaround to our suspension points, but that
would be more fragile. Other packagers might want to apply the boost
patch too (maybe once that's merged upstream), since the issue is likely
to affect more stuff than just nix.

The bug is subtle enough that it went unnoticed for quite some time.

Also adds a test that surfaces this bug so that (rather few) people running out unit tests don't silently build with a busted boost.

The patch isn't merged upstream yet, but we've discussed this during today's meeting and it seems best to apply these fixes to nixpkgs packaging instead of rolling a gazillion point releases adding workarounds for this stuff everywhere.

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

xokdvium added 2 commits July 22, 2026 23:26
… while abandoning the coroutine

Applies a patch to our boost.context dependency to fix
#16174. An alternative would be to
apply basically the same workaround to our suspension points, but that
would be more fragile. Other packagers might want to apply the boost
patch too (maybe once that's merged upstream), since the issue is likely
to affect more stuff than just nix.

The bug is subtle enough that it went unnoticed for quite some time.
@xokdvium
xokdvium requested a review from edolstra as a code owner July 22, 2026 20:32
@xokdvium
xokdvium enabled auto-merge July 22, 2026 21:09
@xokdvium
xokdvium added this pull request to the merge queue Jul 22, 2026
Merged via the queue into master with commit 66d0bd3 Jul 22, 2026
20 checks passed
@xokdvium
xokdvium deleted the boost-context-patch-uncaught-exceptions branch July 22, 2026 22:25
@xokdvium xokdvium added backport 2.34-maintenance Automatically creates a PR against the branch backport 2.35-maintenance Automatically creates a PR against the branch labels Jul 29, 2026
@internal-nix-ci

Copy link
Copy Markdown

Backport failed for 2.34-maintenance, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 2.34-maintenance
git worktree add -d .worktree/backport-16197-to-2.34-maintenance origin/2.34-maintenance
cd .worktree/backport-16197-to-2.34-maintenance
git switch --create backport-16197-to-2.34-maintenance
git cherry-pick -x 88579a87f43a88b8ea5c0a0bbaa737620ad1241e f8b102f902ee98bf051232a001e1e55b13ff70a4 54aa8880be35e7d169e8d84d3dc135893cc4ff12

1 similar comment
@internal-nix-ci

Copy link
Copy Markdown

Backport failed for 2.34-maintenance, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 2.34-maintenance
git worktree add -d .worktree/backport-16197-to-2.34-maintenance origin/2.34-maintenance
cd .worktree/backport-16197-to-2.34-maintenance
git switch --create backport-16197-to-2.34-maintenance
git cherry-pick -x 88579a87f43a88b8ea5c0a0bbaa737620ad1241e f8b102f902ee98bf051232a001e1e55b13ff70a4 54aa8880be35e7d169e8d84d3dc135893cc4ff12

@internal-nix-ci

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.34-maintenance Automatically creates a PR against the branch backport 2.35-maintenance Automatically creates a PR against the branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants