Skip to content
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

Merged
merged 1 commit into from Apr 16, 2024

Conversation

RalfJung
Copy link
Member

Fixes #3439

@RalfJung
Copy link
Member Author

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 16, 2024

📌 Commit 66be834 has been approved by RalfJung

It is now in the queue for this repository.

Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, oops

@RalfJung
Copy link
Member Author

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 16, 2024

📌 Commit 150a4e9 has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Apr 16, 2024

⌛ Testing commit 150a4e9 with merge 2321476...

@bors
Copy link
Collaborator

bors commented Apr 16, 2024

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing 2321476 to master...

@bors bors merged commit 2321476 into rust-lang:master Apr 16, 2024
8 checks passed
@RalfJung RalfJung deleted the alloc_error_handler branch April 16, 2024 21:06
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.
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, thanks!

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.

can't call (diverging) foreign function: __rust_alloc_error_handler
4 participants