@@ -702,7 +702,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
702
702
return Ok ( ( ) ) ;
703
703
}
704
704
705
- "alloc::heap ::::__rust_alloc" => {
705
+ "alloc::alloc ::::__rust_alloc" => {
706
706
let usize = self . tcx . types . usize ;
707
707
let size = self . value_to_primval ( args[ 0 ] , usize) ?. to_u64 ( ) ?;
708
708
let align = self . value_to_primval ( args[ 1 ] , usize) ?. to_u64 ( ) ?;
@@ -716,7 +716,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
716
716
return Ok ( ( ) ) ;
717
717
}
718
718
719
- "alloc::heap ::::__rust_alloc_zeroed" => {
719
+ "alloc::alloc ::::__rust_alloc_zeroed" => {
720
720
let usize = self . tcx . types . usize ;
721
721
let size = self . value_to_primval ( args[ 0 ] , usize) ?. to_u64 ( ) ?;
722
722
let align = self . value_to_primval ( args[ 1 ] , usize) ?. to_u64 ( ) ?;
@@ -798,7 +798,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
798
798
return Ok ( ( ) ) ;
799
799
}
800
800
801
- "alloc::heap ::::__rust_realloc" => {
801
+ "alloc::alloc ::::__rust_realloc" => {
802
802
let ( lval, block) = destination. expect ( "realloc() does not diverge" ) ;
803
803
let dest_ptr = self . force_allocation ( lval) ?. to_ptr ( ) ?;
804
804
@@ -809,17 +809,16 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
809
809
810
810
let usize = self . tcx . types . usize ;
811
811
let _old_size = self . value_to_primval ( args[ 1 ] , usize) ?. to_u64 ( ) ?;
812
- let _old_align = self . value_to_primval ( args[ 2 ] , usize) ?. to_u64 ( ) ?;
812
+ let align = self . value_to_primval ( args[ 2 ] , usize) ?. to_u64 ( ) ?;
813
813
let new_size = self . value_to_primval ( args[ 3 ] , usize) ?. to_u64 ( ) ?;
814
- let new_align = self . value_to_primval ( args[ 4 ] , usize) ?. to_u64 ( ) ?;
815
814
816
- let new_ptr = self . memory . reallocate ( ptr, new_size, new_align ) ?;
815
+ let new_ptr = self . memory . reallocate ( ptr, new_size, align ) ?;
817
816
self . memory . write_ptr ( dest_ptr, new_ptr) ?;
818
817
self . goto_block ( block) ;
819
818
return Ok ( ( ) ) ;
820
819
}
821
820
822
- "alloc::heap ::::__rust_dealloc" => {
821
+ "alloc::alloc ::::__rust_dealloc" => {
823
822
let ( _lval, block) = destination. expect ( "dealloc() does not diverge" ) ;
824
823
825
824
let ptr = match args[ 0 ] {
0 commit comments