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

Re-introduce the "expensive debug assertions" feature #3431

Closed
RalfJung opened this issue Mar 30, 2024 · 0 comments · Fixed by #3434
Closed

Re-introduce the "expensive debug assertions" feature #3431

RalfJung opened this issue Mar 30, 2024 · 0 comments · Fixed by #3434

Comments

@RalfJung
Copy link
Member

IIRC we used to have a cargo feature to control whether we run the Stacked Borrows cache consistency checks. At some point I replaced that by cfg!(debug_assertions). For debug builds of Miri, the assertions don't make a huge difference. (In a quick benchmark with time ./miri test, I can't even see a difference.)

But we're getting Miri to work better in x.py, and that tends to be configured to use release builds with debug assertions. I don't think we want the cache consistency check running as part of ./x.py test library/core --miri, even if one has debug assertions enabled for the compiler. So I think we should go back to using an off-by-default feature flag for this.

@bors bors closed this as completed in 4077298 Mar 30, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this issue Mar 31, 2024
…ency, r=RalfJung

cotrol stacked borrows consistency check with its own feature flag

Fixes rust-lang/miri#3431
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 a pull request may close this issue.

1 participant