-
Notifications
You must be signed in to change notification settings - Fork 353
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
add an option to track raw pointer tags in Stacked Borrows #1603
Conversation
* `-Zmiri-track-call-id=<id>` shows a backtrace when the given call id is | ||
assigned to a stack frame. This helps in debugging UB related to Stacked | ||
Borrows "protectors". | ||
* `-Zmiri-track-raw-pointers` makes Stacked Borrows track a pointer tag even for |
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.
can you construct a test for both the false positive case as well as an example where we now detect latent aliasing where we didn't before? (I'm guessing under certain circumstances they could be one and the same test? we'd just detect the aliasing earlier now)
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.
An example with a false positive caused by this flag is run-pass/box.rs
, since it casts a ptr to an int and back.
I can add a test for a bug that would otherwise be missed (rust-lang/rust#78477 is the example that motivated this change).
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.
I added such a test.
Argh, this fails on Windows because there are integer-pointer casts in the runtime there... is there a way with compiletest to pass a compile-flag only on linux? Otherwise we might just have to disable these tests on Windows (they do not test anything platform-specific so that seems okay). |
no, all you can do is use |
I doubt the old compiletest in the stand-alone crate supports revisions... |
@bors r+ |
📌 Commit bf54607 has been approved by |
☀️ Test successful - checks-actions |
Also make error messages more informative by printing the affected memory location