Merge pull request #4138 from geetanshjuneja/deref

Use deref_poiner_as instead of deref_pointer
This commit is contained in:
Ralf Jung 2025-01-14 08:13:25 +00:00 committed by GitHub
commit d40f2f77bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -120,7 +120,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
this.check_no_isolation("`_NSGetExecutablePath`")?;
let buf_ptr = this.read_pointer(buf)?;
let bufsize = this.deref_pointer(bufsize)?;
let bufsize = this.deref_pointer_as(bufsize, this.machine.layouts.u32)?;
// Using the host current_exe is a bit off, but consistent with Linux
// (where stdlib reads /proc/self/exe).