Open
Description
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 use deref_pointer_as
everywhere. Failure to do so can lead to ICEs like #3839.
To help with this, do the following:
rg -w deref_pointer src/shims
- Pick one of the remaining places where we call
deref_pointer
- Figure out which type that argument is supposed to have
- Replace the call with
deref_pointer_as
and the correct type
Getting 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
, but struct
types need to be looked up in libc
/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. :)