Skip to content

libutil: Print stack trace on assertion failure#14194

Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom
xokdvium:stacktrace-assertion
Oct 11, 2025
Merged

libutil: Print stack trace on assertion failure#14194
Ericson2314 merged 1 commit intoNixOS:masterfrom
xokdvium:stacktrace-assertion

Conversation

@xokdvium
Copy link
Contributor

@xokdvium xokdvium commented Oct 8, 2025

Motivation

This change overrides __assert_fail on glibc/musl
to instead call std::terminate that we have a custom handler for. This ensures that we have more context to diagnose issues encountered by users in the wild.

Context


Add 👍 to pull requests you find important.

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

@xokdvium xokdvium requested a review from edolstra as a code owner October 8, 2025 21:33
Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

🥴😵‍💫

@xokdvium xokdvium marked this pull request as draft October 8, 2025 21:53
@xokdvium xokdvium force-pushed the stacktrace-assertion branch from 04d9d72 to 3508fe8 Compare October 10, 2025 22:34
@xokdvium xokdvium marked this pull request as ready for review October 10, 2025 22:35
This change overrides __assert_fail on glibc/musl
to instead call std::terminate that we have a custom
handler for. This ensures that we have more context
to diagnose issues encountered by users in the wild.
@xokdvium xokdvium force-pushed the stacktrace-assertion branch from 3508fe8 to 46382ad Compare October 10, 2025 22:36
@Ericson2314 Ericson2314 enabled auto-merge October 10, 2025 22:50
@xokdvium xokdvium added backport 2.31-maintenance Automatically creates a PR against the branch backport 2.32-maintenance Automatically creates a PR against the branch labels Oct 10, 2025
@Ericson2314 Ericson2314 added this pull request to the merge queue Oct 10, 2025
Merged via the queue into NixOS:master with commit 8064c75 Oct 11, 2025
20 checks passed
@internal-nix-ci
Copy link

Backport failed for 2.31-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.31-maintenance
git worktree add -d .worktree/backport-14194-to-2.31-maintenance origin/2.31-maintenance
cd .worktree/backport-14194-to-2.31-maintenance
git switch --create backport-14194-to-2.31-maintenance
git cherry-pick -x 46382ade74bdd811ddeab7da33d57effaa76852a

@internal-nix-ci
Copy link

Successfully created backport PR for 2.32-maintenance:

@xokdvium xokdvium deleted the stacktrace-assertion branch October 11, 2025 00:40
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-2-32-0-released/70528/8

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

Labels

backport 2.31-maintenance Automatically creates a PR against the branch backport 2.32-maintenance Automatically creates a PR against the branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants