Open RalfJung opened 1 month ago
Once all of them are converted we should probably add a ./miri tidy
(or make it part of ./miri check
and similar commands) that automatically greps and asserts that there are no new ones introduced
Ah yes that's a good low-tech solution.
can i have a try at this?
Calling
deref_pointer
means we create a place at whatever type that argument was declared at by the user. But we can't trust that type, we should ideally entirely ignore it and usederef_pointer_as
everywhere. Failure to do so can lead to ICEs like https://github.com/rust-lang/miri/issues/3839.To help with this, do the following:
rg -w deref_pointer src/shims
deref_pointer
deref_pointer_as
and the correct typeGetting the correct type will be the hardest part of this, and it depends on what the correct type is. Many basic types are available in
this.machine.layouts
, butstruct
types need to be looked up inlibc
/std
or maybe we even have to construct one ourselves (or entirely change the code). If you are unsure about a concrete case, just ask here. :)