@@ -440,6 +440,7 @@ impl VirtualMachine {
440440 self . segments
441441 . memory
442442 . mark_as_accessed ( operands_addresses. op1_addr ) ;
443+ self . segments . memory . mark_as_accessed ( self . run_context . pc ) ;
443444
444445 if instruction. opcode_extension == OpcodeExtension :: Blake
445446 || instruction. opcode_extension == OpcodeExtension :: BlakeFinalize
@@ -3606,11 +3607,16 @@ mod tests {
36063607 ] ,
36073608 ) ;
36083609 //Check that the following addresses have been accessed:
3609- // Addresses have been copied from python execution:
3610+ // Addresses have been copied from python execution + addresses of accessed code :
36103611 let mem = & vm. segments . memory . data ;
3612+ assert ! ( mem[ 0 ] [ 0 ] . is_accessed( ) ) ;
36113613 assert ! ( mem[ 0 ] [ 1 ] . is_accessed( ) ) ;
3614+ assert ! ( mem[ 0 ] [ 2 ] . is_accessed( ) ) ;
3615+ assert ! ( mem[ 0 ] [ 3 ] . is_accessed( ) ) ;
36123616 assert ! ( mem[ 0 ] [ 4 ] . is_accessed( ) ) ;
3617+ assert ! ( mem[ 0 ] [ 5 ] . is_accessed( ) ) ;
36133618 assert ! ( mem[ 0 ] [ 6 ] . is_accessed( ) ) ;
3619+ assert ! ( mem[ 0 ] [ 7 ] . is_accessed( ) ) ;
36143620 assert ! ( mem[ 1 ] [ 0 ] . is_accessed( ) ) ;
36153621 assert ! ( mem[ 1 ] [ 1 ] . is_accessed( ) ) ;
36163622 assert ! ( mem[ 1 ] [ 2 ] . is_accessed( ) ) ;
@@ -3621,7 +3627,7 @@ mod tests {
36213627 vm. segments
36223628 . memory
36233629 . get_amount_of_accessed_addresses_for_segment( 0 ) ,
3624- Some ( 3 )
3630+ Some ( 8 )
36253631 ) ;
36263632 assert_eq ! (
36273633 vm. segments
@@ -5366,11 +5372,16 @@ mod tests {
53665372 ] ,
53675373 ) ;
53685374 //Check that the following addresses have been accessed:
5369- // Addresses have been copied from python execution:
5375+ // Addresses have been copied from python execution + addresses of accessed code :
53705376 let mem = & vm. segments . memory . data ;
5377+ assert ! ( mem[ 4 ] [ 0 ] . is_accessed( ) ) ;
53715378 assert ! ( mem[ 4 ] [ 1 ] . is_accessed( ) ) ;
5379+ assert ! ( mem[ 4 ] [ 2 ] . is_accessed( ) ) ;
5380+ assert ! ( mem[ 4 ] [ 3 ] . is_accessed( ) ) ;
53725381 assert ! ( mem[ 4 ] [ 4 ] . is_accessed( ) ) ;
5382+ assert ! ( mem[ 4 ] [ 5 ] . is_accessed( ) ) ;
53735383 assert ! ( mem[ 4 ] [ 6 ] . is_accessed( ) ) ;
5384+ assert ! ( mem[ 4 ] [ 7 ] . is_accessed( ) ) ;
53745385 assert ! ( mem[ 1 ] [ 0 ] . is_accessed( ) ) ;
53755386 assert ! ( mem[ 1 ] [ 1 ] . is_accessed( ) ) ;
53765387 assert ! ( mem[ 1 ] [ 2 ] . is_accessed( ) ) ;
@@ -5381,7 +5392,7 @@ mod tests {
53815392 vm. segments
53825393 . memory
53835394 . get_amount_of_accessed_addresses_for_segment( 4 ) ,
5384- Some ( 3 )
5395+ Some ( 8 )
53855396 ) ;
53865397 assert_eq ! (
53875398 vm. segments
0 commit comments