Skip to content

add test for backtrace with global allocator #2177

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

Merged

Conversation

beepster4096
Copy link
Contributor

closes #1996

@oli-obk
Copy link
Contributor

oli-obk commented Jun 2, 2022

I'm amazed a ui test like this passes CI without anything else needed 😆

Should we clean up the old code path for previous versions of Backtrace now? Or did all of that already happen?

use std::backtrace::Backtrace;

#[global_allocator]
static GLOBAL_ALLOCATOR: System = System;
Copy link
Member

Choose a reason for hiding this comment

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

So even using the System allocator failed before?

Copy link
Member

Choose a reason for hiding this comment

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

Ah yes, we distinguish C allocations from Rust allocations. Makes sense.

@RalfJung
Copy link
Member

RalfJung commented Jun 2, 2022

Thanks! :)
@bors r+

Should we clean up the old code path for previous versions of Backtrace now? Or did all of that already happen?

We could remove support for v0 of the API, yeah. No strong opinion on that.

@bors
Copy link
Contributor

bors commented Jun 2, 2022

📌 Commit 0b7a148 has been approved by RalfJung

@bors
Copy link
Contributor

bors commented Jun 2, 2022

⌛ Testing commit 0b7a148 with merge 7f4f607...

@bors
Copy link
Contributor

bors commented Jun 2, 2022

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

@bors bors merged commit 7f4f607 into rust-lang:master Jun 2, 2022
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.

Allocator confusion when a crate replaces the global allocator and also captures a backtrace
4 participants