From 58f011ec07b00a34125e6f27210a87ae21719d1a Mon Sep 17 00:00:00 2001 From: geetanshjuneja Date: Mon, 13 Jan 2025 11:19:41 +0530 Subject: [PATCH] Added deref_poiner_as in _NSGetExecutablePath --- src/shims/unix/macos/foreign_items.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shims/unix/macos/foreign_items.rs b/src/shims/unix/macos/foreign_items.rs index 2afe0b5cd3..85c963774a 100644 --- a/src/shims/unix/macos/foreign_items.rs +++ b/src/shims/unix/macos/foreign_items.rs @@ -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).