@@ -132,7 +132,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx, 'mir> for super::MiriEvalCo
132
132
133
133
"free" => {
134
134
let ptr = self . read_scalar ( args[ 0 ] ) ?. not_undef ( ) ?. erase_tag ( ) ; // raw ptr operation, no tag
135
- if !ptr. is_null ( ) {
135
+ if !ptr. is_null_ptr ( & self ) {
136
136
self . memory . deallocate (
137
137
ptr. to_ptr ( ) ?. with_default_tag ( ) ,
138
138
None ,
@@ -353,7 +353,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx, 'mir> for super::MiriEvalCo
353
353
let mut success = None ;
354
354
{
355
355
let name_ptr = self . read_scalar ( args[ 0 ] ) ?. not_undef ( ) ?. erase_tag ( ) ; // raw ptr operation
356
- if !name_ptr. is_null ( ) {
356
+ if !name_ptr. is_null_ptr ( & self ) {
357
357
let name = self . memory . read_c_str ( name_ptr. to_ptr ( ) ?. with_default_tag ( ) ) ?;
358
358
if !name. is_empty ( ) && !name. contains ( & b'=' ) {
359
359
success = Some ( self . machine . env_vars . remove ( name) ) ;
@@ -376,7 +376,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx, 'mir> for super::MiriEvalCo
376
376
let name_ptr = self . read_scalar ( args[ 0 ] ) ?. not_undef ( ) ?. erase_tag ( ) ; // raw ptr operation
377
377
let value_ptr = self . read_scalar ( args[ 1 ] ) ?. to_ptr ( ) ?. erase_tag ( ) ; // raw ptr operation
378
378
let value = self . memory . read_c_str ( value_ptr. with_default_tag ( ) ) ?;
379
- if !name_ptr. is_null ( ) {
379
+ if !name_ptr. is_null_ptr ( & self ) {
380
380
let name = self . memory . read_c_str ( name_ptr. to_ptr ( ) ?. with_default_tag ( ) ) ?;
381
381
if !name. is_empty ( ) && !name. contains ( & b'=' ) {
382
382
new = Some ( ( name. to_owned ( ) , value. to_owned ( ) ) ) ;
0 commit comments