Skip to content

boost: backport regression fixes for boost.context - #546405

Merged
roberth merged 1 commit into
NixOS:stagingfrom
xokdvium:boost-backport-uncaught-exceptions-patches
Jul 29, 2026
Merged

boost: backport regression fixes for boost.context#546405
roberth merged 1 commit into
NixOS:stagingfrom
xokdvium:boost-backport-uncaught-exceptions-patches

Conversation

@xokdvium

Copy link
Copy Markdown
Contributor

Applies the fixes for 1.88 regressions that have caused widespread breakage in Nix. Currently we are building with 1.89, so only 2 fixes are relevant [1,2], with the second patch being backported to avoid conflicts - the issue it addresses doesn't blow up in nix - but it does in userver and other stuff too probably. The third one is 1.88-only and is included in upstream >= 1.89.

The third patch was authored by NaN-git to unbreak nix with 1.89, so we apply it to 1.88 (the initial version that had the fiber-specific exception state changes with fcontext and libstdc++). This is mostly for consistency and unbreak boost.context on that version.

Even though we have only observed this breakage in Nix, I'm pretty sure any serious consumer of boost.context and downstream boost libraries (like asio/coroutine2 e.t.c.) is similarly broken currently so I'd prefer that we fix the root cause here instead of rolling a gazillion workarounds everywhere.

Things done

Applies the fixes for 1.88 regressions that have caused widespread
breakage in Nix. Currently we are building with 1.89, so only 2 fixes
are relevant [1,2], with the second patch being backported to avoid
conflicts - the issue it addresses doesn't blow up in nix - but it
does in userver and other stuff too probably.

The third patch was authored by NaN-git to unbreak nix with 1.89, so
we apply it to 1.88 (the initial version that had the fiber-specific
exception state changes with fcontext and libstdc++). This is mostly for
consistency and unbreak boost.context on that version.

[1]: boostorg/context#337
[2]: boostorg/context#331
@xokdvium

Copy link
Copy Markdown
Contributor Author

On the nix side there's a test for the bug and we've backported the stuff in our packaging (to be backported for release binary packages point releases soon) NixOS/nix#16197.

# std::uncaught_exceptions for abandoned coroutines under libstdc++ and fcontext implementation.
# This bug also caused subtle breakage in Nix. See https://github.com/NixOS/nix/issues/16174.
++
lib.optional (lib.versionAtLeast version "1.88.0" && lib.versionOlder version "1.93.0")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't yet included in any release, so I left the 1.93.0 as the placeholder for the next release that patch of mine should be included in.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged, so reasonable to assume this works out just fine when released.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. labels Jul 27, 2026
@roberth
roberth added this pull request to the merge queue Jul 29, 2026
@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. and removed 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Jul 29, 2026
Merged via the queue into NixOS:staging with commit 7116288 Jul 29, 2026
38 of 40 checks passed
@xokdvium
xokdvium deleted the boost-backport-uncaught-exceptions-patches branch July 29, 2026 21:20
@xokdvium xokdvium added the backport staging-26.05 Backport PR automatically label Aug 2, 2026
@nixpkgs-ci

nixpkgs-ci Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Successfully created backport PR for staging-26.05:

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

Labels

8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person. backport staging-26.05 Backport PR automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants