miri icon indicating copy to clipboard operation
miri copied to clipboard

Make it easier to debug weak memory emulation induced bugs

Open RalfJung opened this issue 3 years ago • 1 comments

When our weak memory emulation finds a bug, it can be quite hard to figure out the details. Using -Zmiri-disable-weak-memory-emulation is useful to confirm that it is indeed a weak memory bug, but what then?

One thing we could do is offer a flag to print a diagnostic every time an outdated value is returned from a load. One of them must be the cause of the bug. @cbeuw has some draft of that at https://github.com/cbeuw/miri/commit/64d738cb00dbcfbe9cab29c77717f5af62c83ada.

RalfJung avatar Jul 02 '22 22:07 RalfJung

Another idea I had is to have some way that pins a load to the latest value when running on Miri. This would allow the user to debug through elimination and pinpoint the minimal set of outdated loads that triggers a bug

cbeuw avatar Jul 02 '22 22:07 cbeuw