-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std: Funnel all aborts through rtabort! cc #31519 #32832
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
r? @alex |
The only other use of the intrinsics is in the alloc crate. |
panic. aborting.\n")); | ||
unsafe { intrinsics::abort() } | ||
rtabort!("thread panicked while processing \ | ||
panic. aborting."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that these messages will now be prefixed with fatal runtime error:
rather than being printed directly as-is. In the past I think we tried to avoid printing the "fatal runtime error" aspect?
Maybe we could add a function to do the abort without printing and use that instead in these places? |
@alexcrichton If we removed the "fatal runtime error" part of the |
Yeah I think that'd also work! |
☔ The latest upstream changes (presumably #32900) made this pull request unmergeable. Please resolve the merge conflicts. |
Closing due to inactivity, but we can always resubmit with some fixes later of course! |
The abort strategy isn't necessarily as simple as intrinsics::abort. For example on windows we may want to instead use
__failfast
. All aborts should use the same code.