@@ -866,8 +866,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
866866 // These shims are enabled only when the caller is in the standard library.
867867 "pthread_attr_getguardsize" if this. frame_in_std ( ) => {
868868 let [ _attr, guard_size] = this. check_shim ( abi, Conv :: C , link_name, args) ?;
869- let guard_size = this. deref_pointer ( guard_size) ?;
870869 let guard_size_layout = this. libc_ty_layout ( "size_t" ) ;
870+ let guard_size = this. deref_pointer_as ( guard_size, guard_size_layout) ?;
871871 this. write_scalar (
872872 Scalar :: from_uint ( this. machine . page_size , guard_size_layout. size ) ,
873873 & guard_size,
@@ -894,7 +894,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
894894 let _attr_place =
895895 this. deref_pointer_as ( attr_place, this. libc_ty_layout ( "pthread_attr_t" ) ) ?;
896896 let addr_place = this. deref_pointer ( addr_place) ?;
897- let size_place = this. deref_pointer ( size_place) ?;
897+ let size_place = this. deref_pointer_as ( size_place, this . libc_ty_layout ( "size_t" ) ) ?;
898898
899899 this. write_scalar (
900900 Scalar :: from_uint ( this. machine . stack_addr , this. pointer_size ( ) ) ,
@@ -928,7 +928,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
928928 let pwd = this. deref_pointer_as ( pwd, this. libc_ty_layout ( "passwd" ) ) ?;
929929 let buf = this. read_pointer ( buf) ?;
930930 let buflen = this. read_target_usize ( buflen) ?;
931- let result = this. deref_pointer ( result) ?;
931+ let result = this. deref_pointer_as ( result, this . machine . layouts . mut_raw_ptr ) ?;
932932
933933 // Must be for "us".
934934 if uid != UID {
0 commit comments