Skip to content

TODO Change NONFATAL_UNREACHABLE to abort if G_ABORT_ON_FAILED_ASSUME is set - #22

Closed
optout21 wants to merge 3 commits into
masterfrom
2606-assert-msg2
Closed

optout21 wants to merge 3 commits into
masterfrom
2606-assert-msg2

Conversation

@optout21

@optout21 optout21 commented Sep 2, 2026

Copy link
Copy Markdown
Owner

bitcoin#35461 (comment)

Change NONFATAL_UNREACHABLE to abort if G_ABORT_ON_FAILED_ASSUME is set

@optout21
optout21 force-pushed the 2606-assert-msg2 branch 7 times, most recently from b1cf1b4 to fa8806b Compare September 3, 2026 10:43
The error message generated by Assert, Assume, and CHECK_NONFATAL
contained the failing assertion condition text, but it was
unclear whether that's the failed expectation or the
actual case. E.g. "Internal bug detected: pindex != nullptr"
meant that pindex == nullptr.

Clarify the situation, by including "`%s` check failed".
The above example is now:
"Internal bug detected: `pindex != nullptr` check failed".
Rename only. Use a more descriptive naming, the helper is for abort.
Unreachable error also honors `G_ABORT_ON_FAILED_ASSUME`, and if set,
it aborts instead of throwing.
The condition checking `G_ABORT_ON_FAILED_ASSUME` has been extracted
into a new helper, `check_non_fatal_fail()`, and it is reused.
@optout21

optout21 commented Sep 4, 2026

Copy link
Copy Markdown
Owner Author

Included in bitcoin#35461, closing.

@optout21 optout21 closed this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant