-
Notifications
You must be signed in to change notification settings - Fork 389
Provide slightly better notes when tracking a pointer tag #1945
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
Conversation
5fe9f1b
to
3856f96
Compare
What does the new output look like, compared to the old one? An example would be nice, to make it easier to evaluate the change. |
28bf160
to
b5b2526
Compare
I've cleaned up the nomenclature a bit and elaborated on the user experience that made me want this in the opening comment. |
Ah I see, this is a case where it's also not clear from the code whether this is a read or write access. ( |
Yup! I'm now understanding my own thinking a bit more: A lot of my use of Miri has been squinting at a diagnostic and trying to understand what exactly is causing there to be no borrow in the stack for a tag. The only way I could confirm my guess is by altering the code, and if Miri then passes, I just assume that my understanding was correct. |
b5b2526
to
cd69219
Compare
Looks good, thanks. :) |
📌 Commit cd69219 has been approved by |
☀️ Test successful - checks-actions |
I slapped this in as a sort of advanced println-based debugging when trying to figure out a track-raw-pointers finding in
smallvec
. Perhaps this looks like a good idea to you all?EDIT: User scenario
Run
MIRIFLAGS=-Ztag-raw-pointers cargo miri test
, get a diagnostic that looks likeSo now run
MIRIFLAGS=-Ztag-raw-pointers -Zmiri-track-pointer-tag=265507 cargo miri test
Old:
New:
So that if a user is now beginning to question their sanity because they don't really understand SB yet, they can then track the tag which caused the parent tag to be removed from the stack to be sure what's going on here:
The existing diagnostic can tell you where the tag you'd need was invalidated, but it cannot tell you what and why that tag was invalidated.