-
Notifications
You must be signed in to change notification settings - Fork 348
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
-Zmiri-track-pointer-tag=untagged
fails (ICE)
#1907
Comments
Z miri-track-pointer-tag=untagged
fails (ICE)-Zmiri-track-pointer-tag=untagged
fails (ICE)
Thanks for the report! I moved it to the Miri repo. Indeed Note that the verb "track" in
|
Maybe we should rename Cc @oli-obk |
IIUC, Miri is only available on nightly, and these flags begin with |
Technically we can do whatever we want, true -- but I see no reason to cause pain to all users that use the old name. Miri has no stability guarantees, but we try to not annoy our users more than we think is necessary. ;) |
The proposed rename is happening in #1911. @ssbr could you say a bit more about what you are trying to debug? As I said above, many pointers are untagged, so there's not really any point in having Miri print something whenever an untagged pointer is used. Can you say a bit more about what you are trying to debug? |
Sorry for not chiming in earlier, lost track of this.
The only way I'm aware of to make miri output how it is mutating the borrow stack is to tell it to track a tag. But it can only do so for non-raw pointers, so I was (and am) a bit stuck: AFAIK there's no way to determine how the borrow stack is mutated for raw pointers except to read the code closely and follow along with the paper, pretending to be miri. (But, in fact, I wanted miri to tell me what it was doing so that I could be sure I was correctly understanding the paper to begin with!) You can see examples of the kinds of snippets I was working with e.g. here: #1878 . I don't know exactly what snippet prompted this particular attempt, but it would've been something along those lines -- short 5-10 line snippets where all pointers are interesting and do something important, and where I want to fully understand the borrow stack for every touched region of memory. |
A more recent example where something like this might be useful -- I was recently trying to make sure I understood why As you say, in a larger program, there's too many pointers. But for a minimal reproducible example, where every pointer is relevant, I think that isn't a problem. |
Note that even if you write an empty I do agree that it would be great to have better visualizations and debugging features for Stacked Borrows. But asking specifically for There is #974 for debugability of Stacked Borrows failures; if that issue does not reflect what you are looking for then please open a new one and describe the problem you want to solve. I think this would also be a great use-case for https://github.com/oli-obk/priroda, if it could display Stacked Borrows data. |
Ah I should also say, there are some tracing features you could play around with, but they will drown you in information: MIRI_LOG=info,miri::stacked_borrows=trace ./miri run tests/run-pass/hello.rs This is how I debugged Stacked Borrows while developing it. |
rename track-raw-pointers flag to tag-raw-pointers The old flag name sounds too similar to `-Zmiri-track-pointer-tag`, which is a totally different kind of 'tracking'. This has lead to confusion in #1907.
I'd like to be able to track untagged when debugging, but currently I think the only way to do this is
-Zmiri-track-raw-pointers
.Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: