-
Notifications
You must be signed in to change notification settings - Fork 360
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
implement support for __rust_alloc_error_handler #3478
Conversation
@bors r+ |
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.
Do we care to change the tracked ID to keep this stderr file intact?
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.
Ah, oops
66be834
to
150a4e9
Compare
@bors r+ |
☀️ Test successful - checks-actions |
struct BadAlloc; | ||
|
||
// Create a failing allocator; Miri's native allocator never fails so this is the only way to | ||
// actually call the alloc error handler. |
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.
User code can directly call std::alloc::handle_alloc_error(layout)
on stable to call the alloc error handler.
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.
Good point, thanks!
Fixes #3439