@@ -245,15 +245,15 @@ impl<'a, T: 'static> LowerContext<'a, T> {
245245 ) -> Result < usize > {
246246 #[ cfg( feature = "rr" ) ]
247247 self . store . 0 . record_event ( || ReallocEntryEvent {
248- old_addr : old,
249- old_size,
248+ old_addr : old as u64 ,
249+ old_size : old_size as u64 ,
250250 old_align,
251- new_size,
251+ new_size : new_size as u64 ,
252252 } ) ?;
253253 let result = self . realloc_inner ( old, old_size, old_align, new_size) ;
254254 #[ cfg( feature = "rr" ) ]
255255 self . store . 0 . record_event_validation ( || {
256- ReallocReturnEvent ( ResultEvent :: from_anyhow_result ( & result) )
256+ ReallocReturnEvent ( ResultEvent :: from_anyhow_result_usize ( & result) )
257257 } ) ?;
258258 result
259259 }
@@ -473,8 +473,12 @@ impl<'a, T: 'static> LowerContext<'a, T> {
473473 complete = true ;
474474 }
475475 RREvent :: ComponentReallocEntry ( e) => {
476- let result =
477- self . realloc_inner ( e. old_addr , e. old_size , e. old_align , e. new_size ) ;
476+ let result = self . realloc_inner (
477+ e. old_addr as usize ,
478+ e. old_size as usize ,
479+ e. old_align ,
480+ e. new_size as usize ,
481+ ) ;
478482 if run_validate {
479483 realloc_stack. push ( result) ;
480484 }
@@ -495,9 +499,10 @@ impl<'a, T: 'static> LowerContext<'a, T> {
495499 lowering_error = e. 0 . ret ( ) . map_err ( Into :: into) . err ( ) ;
496500 }
497501 RREvent :: ComponentMemorySliceWrite ( e) => {
502+ let offset = e. offset as usize ;
498503 // The bounds check is performed here is required here (in the absence of
499504 // trace validation) to protect against malicious out-of-bounds slice writes
500- self . as_slice_mut ( ) [ e . offset ..e . offset + e. bytes . len ( ) ]
505+ self . as_slice_mut ( ) [ offset..offset + e. bytes . len ( ) ]
501506 . copy_from_slice ( e. bytes . as_slice ( ) ) ;
502507 }
503508 // Optional events
@@ -510,7 +515,9 @@ impl<'a, T: 'static> LowerContext<'a, T> {
510515 // Unwrapping should never occur on valid executions since *Entry should be before *Return in trace
511516 RREvent :: ComponentReallocReturn ( e) => {
512517 if run_validate {
513- lowering_error = e. 0 . validate ( & realloc_stack. pop ( ) . unwrap ( ) ) . err ( )
518+ lowering_error =
519+ e. 0 . validate ( & realloc_stack. pop ( ) . unwrap ( ) . map ( |r| r as u64 ) )
520+ . err ( )
514521 }
515522 }
516523 RREvent :: ComponentLowerFlatEntry ( _) => {
0 commit comments