@@ -129,14 +129,14 @@ fn mutex_set_kind<'mir, 'tcx: 'mir>(
129
129
fn mutex_get_id < ' mir , ' tcx : ' mir > (
130
130
ecx : & MiriEvalContext < ' mir , ' tcx > ,
131
131
mutex_op : OpTy < ' tcx , Tag > ,
132
- ) -> InterpResult < ' tcx , ScalarMaybeUndef < Tag > > {
132
+ ) -> InterpResult < ' tcx , ScalarMaybeUninit < Tag > > {
133
133
get_at_offset ( ecx, mutex_op, 4 , ecx. machine . layouts . u32 , PTHREAD_MUTEX_T_MIN_SIZE )
134
134
}
135
135
136
136
fn mutex_set_id < ' mir , ' tcx : ' mir > (
137
137
ecx : & mut MiriEvalContext < ' mir , ' tcx > ,
138
138
mutex_op : OpTy < ' tcx , Tag > ,
139
- id : impl Into < ScalarMaybeUndef < Tag > > ,
139
+ id : impl Into < ScalarMaybeUninit < Tag > > ,
140
140
) -> InterpResult < ' tcx , ( ) > {
141
141
set_at_offset ( ecx, mutex_op, 4 , id, ecx. machine . layouts . u32 , PTHREAD_MUTEX_T_MIN_SIZE )
142
142
}
@@ -176,7 +176,7 @@ fn rwlock_get_id<'mir, 'tcx: 'mir>(
176
176
fn rwlock_set_id < ' mir , ' tcx : ' mir > (
177
177
ecx : & mut MiriEvalContext < ' mir , ' tcx > ,
178
178
rwlock_op : OpTy < ' tcx , Tag > ,
179
- id : impl Into < ScalarMaybeUndef < Tag > > ,
179
+ id : impl Into < ScalarMaybeUninit < Tag > > ,
180
180
) -> InterpResult < ' tcx , ( ) > {
181
181
set_at_offset ( ecx, rwlock_op, 4 , id, ecx. machine . layouts . u32 , PTHREAD_RWLOCK_T_MIN_SIZE )
182
182
}
@@ -208,14 +208,14 @@ const PTHREAD_CONDATTR_T_MIN_SIZE: u64 = 4;
208
208
fn condattr_get_clock_id < ' mir , ' tcx : ' mir > (
209
209
ecx : & MiriEvalContext < ' mir , ' tcx > ,
210
210
attr_op : OpTy < ' tcx , Tag > ,
211
- ) -> InterpResult < ' tcx , ScalarMaybeUndef < Tag > > {
211
+ ) -> InterpResult < ' tcx , ScalarMaybeUninit < Tag > > {
212
212
get_at_offset ( ecx, attr_op, 0 , ecx. machine . layouts . i32 , PTHREAD_CONDATTR_T_MIN_SIZE )
213
213
}
214
214
215
215
fn condattr_set_clock_id < ' mir , ' tcx : ' mir > (
216
216
ecx : & mut MiriEvalContext < ' mir , ' tcx > ,
217
217
attr_op : OpTy < ' tcx , Tag > ,
218
- clock_id : impl Into < ScalarMaybeUndef < Tag > > ,
218
+ clock_id : impl Into < ScalarMaybeUninit < Tag > > ,
219
219
) -> InterpResult < ' tcx , ( ) > {
220
220
set_at_offset ( ecx, attr_op, 0 , clock_id, ecx. machine . layouts . i32 , PTHREAD_CONDATTR_T_MIN_SIZE )
221
221
}
@@ -234,14 +234,14 @@ const PTHREAD_COND_T_MIN_SIZE: u64 = 12;
234
234
fn cond_get_id < ' mir , ' tcx : ' mir > (
235
235
ecx : & MiriEvalContext < ' mir , ' tcx > ,
236
236
cond_op : OpTy < ' tcx , Tag > ,
237
- ) -> InterpResult < ' tcx , ScalarMaybeUndef < Tag > > {
237
+ ) -> InterpResult < ' tcx , ScalarMaybeUninit < Tag > > {
238
238
get_at_offset ( ecx, cond_op, 4 , ecx. machine . layouts . u32 , PTHREAD_COND_T_MIN_SIZE )
239
239
}
240
240
241
241
fn cond_set_id < ' mir , ' tcx : ' mir > (
242
242
ecx : & mut MiriEvalContext < ' mir , ' tcx > ,
243
243
cond_op : OpTy < ' tcx , Tag > ,
244
- id : impl Into < ScalarMaybeUndef < Tag > > ,
244
+ id : impl Into < ScalarMaybeUninit < Tag > > ,
245
245
) -> InterpResult < ' tcx , ( ) > {
246
246
set_at_offset ( ecx, cond_op, 4 , id, ecx. machine . layouts . u32 , PTHREAD_COND_T_MIN_SIZE )
247
247
}
@@ -265,14 +265,14 @@ fn cond_get_or_create_id<'mir, 'tcx: 'mir>(
265
265
fn cond_get_clock_id < ' mir , ' tcx : ' mir > (
266
266
ecx : & MiriEvalContext < ' mir , ' tcx > ,
267
267
cond_op : OpTy < ' tcx , Tag > ,
268
- ) -> InterpResult < ' tcx , ScalarMaybeUndef < Tag > > {
268
+ ) -> InterpResult < ' tcx , ScalarMaybeUninit < Tag > > {
269
269
get_at_offset ( ecx, cond_op, 8 , ecx. machine . layouts . i32 , PTHREAD_COND_T_MIN_SIZE )
270
270
}
271
271
272
272
fn cond_set_clock_id < ' mir , ' tcx : ' mir > (
273
273
ecx : & mut MiriEvalContext < ' mir , ' tcx > ,
274
274
cond_op : OpTy < ' tcx , Tag > ,
275
- clock_id : impl Into < ScalarMaybeUndef < Tag > > ,
275
+ clock_id : impl Into < ScalarMaybeUninit < Tag > > ,
276
276
) -> InterpResult < ' tcx , ( ) > {
277
277
set_at_offset ( ecx, cond_op, 8 , clock_id, ecx. machine . layouts . i32 , PTHREAD_COND_T_MIN_SIZE )
278
278
}
@@ -518,8 +518,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
518
518
throw_ub_format ! ( "destroyed a locked mutex" ) ;
519
519
}
520
520
521
- mutex_set_kind ( this, mutex_op, ScalarMaybeUndef :: Undef ) ?;
522
- mutex_set_id ( this, mutex_op, ScalarMaybeUndef :: Undef ) ?;
521
+ mutex_set_kind ( this, mutex_op, ScalarMaybeUninit :: Uninit ) ?;
522
+ mutex_set_id ( this, mutex_op, ScalarMaybeUninit :: Uninit ) ?;
523
523
524
524
Ok ( 0 )
525
525
}
@@ -643,7 +643,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
643
643
throw_ub_format ! ( "destroyed a locked rwlock" ) ;
644
644
}
645
645
646
- rwlock_set_id ( this, rwlock_op, ScalarMaybeUndef :: Undef ) ?;
646
+ rwlock_set_id ( this, rwlock_op, ScalarMaybeUninit :: Uninit ) ?;
647
647
648
648
Ok ( 0 )
649
649
}
@@ -696,7 +696,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
696
696
fn pthread_condattr_destroy ( & mut self , attr_op : OpTy < ' tcx , Tag > ) -> InterpResult < ' tcx , i32 > {
697
697
let this = self . eval_context_mut ( ) ;
698
698
699
- condattr_set_clock_id ( this, attr_op, ScalarMaybeUndef :: Undef ) ?;
699
+ condattr_set_clock_id ( this, attr_op, ScalarMaybeUninit :: Uninit ) ?;
700
700
701
701
Ok ( 0 )
702
702
}
@@ -835,8 +835,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
835
835
if this. condvar_is_awaited ( id) {
836
836
throw_ub_format ! ( "destroyed an awaited conditional variable" ) ;
837
837
}
838
- cond_set_id ( this, cond_op, ScalarMaybeUndef :: Undef ) ?;
839
- cond_set_clock_id ( this, cond_op, ScalarMaybeUndef :: Undef ) ?;
838
+ cond_set_id ( this, cond_op, ScalarMaybeUninit :: Uninit ) ?;
839
+ cond_set_clock_id ( this, cond_op, ScalarMaybeUninit :: Uninit ) ?;
840
840
841
841
Ok ( 0 )
842
842
}
0 commit comments