@@ -90,7 +90,7 @@ impl FileDescriptor for io::Stdin {
90
90
fn read < ' tcx > ( & mut self , communicate_allowed : bool , bytes : & mut [ u8 ] ) -> InterpResult < ' tcx , io:: Result < usize > > {
91
91
if !communicate_allowed {
92
92
// We want isolation mode to be deterministic, so we have to disallow all reads, even stdin.
93
- helpers:: isolation_error ( "read" ) ?;
93
+ helpers:: isolation_error ( "` read` from stdin " ) ?;
94
94
}
95
95
Ok ( Read :: read ( self , bytes) )
96
96
}
@@ -417,7 +417,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
417
417
) -> InterpResult < ' tcx , i32 > {
418
418
let this = self . eval_context_mut ( ) ;
419
419
420
- this. check_no_isolation ( "open" ) ?;
420
+ this. check_no_isolation ( "` open` " ) ?;
421
421
422
422
let flag = this. read_scalar ( flag_op) ?. to_i32 ( ) ?;
423
423
@@ -510,7 +510,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
510
510
) -> InterpResult < ' tcx , i32 > {
511
511
let this = self . eval_context_mut ( ) ;
512
512
513
- this. check_no_isolation ( "fcntl" ) ?;
513
+ this. check_no_isolation ( "` fcntl` " ) ?;
514
514
515
515
if args. len ( ) < 2 {
516
516
throw_ub_format ! ( "incorrect number of arguments for fcntl: got {}, expected at least 2" , args. len( ) ) ;
@@ -574,8 +574,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
574
574
fn close ( & mut self , fd_op : OpTy < ' tcx , Tag > ) -> InterpResult < ' tcx , i32 > {
575
575
let this = self . eval_context_mut ( ) ;
576
576
577
- this. check_no_isolation ( "close" ) ?;
578
-
579
577
let fd = this. read_scalar ( fd_op) ?. to_i32 ( ) ?;
580
578
581
579
if let Some ( file_descriptor) = this. machine . file_handler . handles . remove ( & fd) {
@@ -709,7 +707,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
709
707
fn unlink ( & mut self , path_op : OpTy < ' tcx , Tag > ) -> InterpResult < ' tcx , i32 > {
710
708
let this = self . eval_context_mut ( ) ;
711
709
712
- this. check_no_isolation ( "unlink" ) ?;
710
+ this. check_no_isolation ( "` unlink` " ) ?;
713
711
714
712
let path = this. read_path_from_c_str ( this. read_scalar ( path_op) ?. check_init ( ) ?) ?;
715
713
@@ -739,7 +737,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
739
737
740
738
let this = self . eval_context_mut ( ) ;
741
739
742
- this. check_no_isolation ( "symlink" ) ?;
740
+ this. check_no_isolation ( "` symlink` " ) ?;
743
741
744
742
let target = this. read_path_from_c_str ( this. read_scalar ( target_op) ?. check_init ( ) ?) ?;
745
743
let linkpath = this. read_path_from_c_str ( this. read_scalar ( linkpath_op) ?. check_init ( ) ?) ?;
@@ -755,7 +753,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
755
753
) -> InterpResult < ' tcx , i32 > {
756
754
let this = self . eval_context_mut ( ) ;
757
755
this. assert_target_os ( "macos" , "stat" ) ;
758
- this. check_no_isolation ( "stat" ) ?;
756
+ this. check_no_isolation ( "` stat` " ) ?;
759
757
// `stat` always follows symlinks.
760
758
this. macos_stat_or_lstat ( true , path_op, buf_op)
761
759
}
@@ -768,7 +766,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
768
766
) -> InterpResult < ' tcx , i32 > {
769
767
let this = self . eval_context_mut ( ) ;
770
768
this. assert_target_os ( "macos" , "lstat" ) ;
771
- this. check_no_isolation ( "lstat" ) ?;
769
+ this. check_no_isolation ( "` lstat` " ) ?;
772
770
this. macos_stat_or_lstat ( false , path_op, buf_op)
773
771
}
774
772
@@ -780,7 +778,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
780
778
let this = self . eval_context_mut ( ) ;
781
779
782
780
this. assert_target_os ( "macos" , "fstat" ) ;
783
- this. check_no_isolation ( "fstat" ) ?;
781
+ this. check_no_isolation ( "` fstat` " ) ?;
784
782
785
783
let fd = this. read_scalar ( fd_op) ?. to_i32 ( ) ?;
786
784
@@ -802,7 +800,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
802
800
let this = self . eval_context_mut ( ) ;
803
801
804
802
this. assert_target_os ( "linux" , "statx" ) ;
805
- this. check_no_isolation ( "statx" ) ?;
803
+ this. check_no_isolation ( "` statx` " ) ?;
806
804
807
805
let statxbuf_scalar = this. read_scalar ( statxbuf_op) ?. check_init ( ) ?;
808
806
let pathname_scalar = this. read_scalar ( pathname_op) ?. check_init ( ) ?;
@@ -961,7 +959,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
961
959
) -> InterpResult < ' tcx , i32 > {
962
960
let this = self . eval_context_mut ( ) ;
963
961
964
- this. check_no_isolation ( "rename" ) ?;
962
+ this. check_no_isolation ( "` rename` " ) ?;
965
963
966
964
let oldpath_scalar = this. read_scalar ( oldpath_op) ?. check_init ( ) ?;
967
965
let newpath_scalar = this. read_scalar ( newpath_op) ?. check_init ( ) ?;
@@ -987,7 +985,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
987
985
) -> InterpResult < ' tcx , i32 > {
988
986
let this = self . eval_context_mut ( ) ;
989
987
990
- this. check_no_isolation ( "mkdir" ) ?;
988
+ this. check_no_isolation ( "` mkdir` " ) ?;
991
989
992
990
#[ cfg_attr( not( unix) , allow( unused_variables) ) ]
993
991
let mode = if this. tcx . sess . target . target . target_os == "macos" {
@@ -1020,7 +1018,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
1020
1018
) -> InterpResult < ' tcx , i32 > {
1021
1019
let this = self . eval_context_mut ( ) ;
1022
1020
1023
- this. check_no_isolation ( "rmdir" ) ?;
1021
+ this. check_no_isolation ( "` rmdir` " ) ?;
1024
1022
1025
1023
let path = this. read_path_from_c_str ( this. read_scalar ( path_op) ?. check_init ( ) ?) ?;
1026
1024
@@ -1032,7 +1030,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
1032
1030
fn opendir ( & mut self , name_op : OpTy < ' tcx , Tag > ) -> InterpResult < ' tcx , Scalar < Tag > > {
1033
1031
let this = self . eval_context_mut ( ) ;
1034
1032
1035
- this. check_no_isolation ( "opendir" ) ?;
1033
+ this. check_no_isolation ( "` opendir` " ) ?;
1036
1034
1037
1035
let name = this. read_path_from_c_str ( this. read_scalar ( name_op) ?. check_init ( ) ?) ?;
1038
1036
@@ -1063,7 +1061,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
1063
1061
let this = self . eval_context_mut ( ) ;
1064
1062
1065
1063
this. assert_target_os ( "linux" , "readdir64_r" ) ;
1066
- this. check_no_isolation ( "readdir64_r" ) ?;
1064
+ this. check_no_isolation ( "` readdir64_r` " ) ?;
1067
1065
1068
1066
let dirp = this. read_scalar ( dirp_op) ?. to_machine_usize ( this) ?;
1069
1067
@@ -1150,7 +1148,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
1150
1148
let this = self . eval_context_mut ( ) ;
1151
1149
1152
1150
this. assert_target_os ( "macos" , "readdir_r" ) ;
1153
- this. check_no_isolation ( "readdir_r" ) ?;
1151
+ this. check_no_isolation ( "` readdir_r` " ) ?;
1154
1152
1155
1153
let dirp = this. read_scalar ( dirp_op) ?. to_machine_usize ( this) ?;
1156
1154
@@ -1233,7 +1231,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
1233
1231
fn closedir ( & mut self , dirp_op : OpTy < ' tcx , Tag > ) -> InterpResult < ' tcx , i32 > {
1234
1232
let this = self . eval_context_mut ( ) ;
1235
1233
1236
- this. check_no_isolation ( "closedir" ) ?;
1234
+ this. check_no_isolation ( "` closedir` " ) ?;
1237
1235
1238
1236
let dirp = this. read_scalar ( dirp_op) ?. to_machine_usize ( this) ?;
1239
1237
@@ -1252,7 +1250,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
1252
1250
) -> InterpResult < ' tcx , i32 > {
1253
1251
let this = self . eval_context_mut ( ) ;
1254
1252
1255
- this. check_no_isolation ( "ftruncate64" ) ?;
1253
+ this. check_no_isolation ( "` ftruncate64` " ) ?;
1256
1254
1257
1255
let fd = this. read_scalar ( fd_op) ?. to_i32 ( ) ?;
1258
1256
let length = this. read_scalar ( length_op) ?. to_i64 ( ) ?;
@@ -1287,7 +1285,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
1287
1285
1288
1286
let this = self . eval_context_mut ( ) ;
1289
1287
1290
- this. check_no_isolation ( "fsync" ) ?;
1288
+ this. check_no_isolation ( "` fsync` " ) ?;
1291
1289
1292
1290
let fd = this. read_scalar ( fd_op) ?. to_i32 ( ) ?;
1293
1291
if let Some ( file_descriptor) = this. machine . file_handler . handles . get ( & fd) {
@@ -1303,7 +1301,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
1303
1301
fn fdatasync ( & mut self , fd_op : OpTy < ' tcx , Tag > ) -> InterpResult < ' tcx , i32 > {
1304
1302
let this = self . eval_context_mut ( ) ;
1305
1303
1306
- this. check_no_isolation ( "fdatasync" ) ?;
1304
+ this. check_no_isolation ( "` fdatasync` " ) ?;
1307
1305
1308
1306
let fd = this. read_scalar ( fd_op) ?. to_i32 ( ) ?;
1309
1307
if let Some ( file_descriptor) = this. machine . file_handler . handles . get ( & fd) {
@@ -1325,7 +1323,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
1325
1323
) -> InterpResult < ' tcx , i32 > {
1326
1324
let this = self . eval_context_mut ( ) ;
1327
1325
1328
- this. check_no_isolation ( "sync_file_range" ) ?;
1326
+ this. check_no_isolation ( "` sync_file_range` " ) ?;
1329
1327
1330
1328
let fd = this. read_scalar ( fd_op) ?. to_i32 ( ) ?;
1331
1329
let offset = this. read_scalar ( offset_op) ?. to_i64 ( ) ?;
0 commit comments