diff --git a/src/flamenco/runtime/tests/fd_vm_test.c b/src/flamenco/runtime/tests/fd_vm_test.c index 6dcd5f4dcb..db2c69a67e 100644 --- a/src/flamenco/runtime/tests/fd_vm_test.c +++ b/src/flamenco/runtime/tests/fd_vm_test.c @@ -215,22 +215,6 @@ do{ fd_vm_t * vm = fd_vm_join( fd_vm_new( fd_valloc_malloc( valloc, fd_vm_align(), fd_vm_footprint() ) ) ); FD_TEST( vm ); - /* Override some execution state values from the interp fuzzer input - This is so we can test if the interp (or vm setup) mutates any of - these erroneously */ - vm->reg[0] = input->vm_ctx.r0; - vm->reg[1] = input->vm_ctx.r1; - vm->reg[2] = input->vm_ctx.r2; - vm->reg[3] = input->vm_ctx.r3; - vm->reg[4] = input->vm_ctx.r4; - vm->reg[5] = input->vm_ctx.r5; - vm->reg[6] = input->vm_ctx.r6; - vm->reg[7] = input->vm_ctx.r7; - vm->reg[8] = input->vm_ctx.r8; - vm->reg[9] = input->vm_ctx.r9; - vm->reg[10] = input->vm_ctx.r10; - vm->reg[11] = input->vm_ctx.r11; - fd_vm_init( vm, instr_ctx, @@ -254,6 +238,22 @@ do{ FD_FEATURE_ACTIVE( instr_ctx->slot_ctx, bpf_account_data_direct_mapping ) /* direct mapping */ ); + /* Override some execution state values from the interp fuzzer input + This is so we can test if the interp (or vm setup) mutates any of + these erroneously */ + vm->reg[0] = input->vm_ctx.r0; + // vm->reg[1] = input->vm_ctx.r1; // set in fd_vm_init + vm->reg[2] = input->vm_ctx.r2; + vm->reg[3] = input->vm_ctx.r3; + vm->reg[4] = input->vm_ctx.r4; + vm->reg[5] = input->vm_ctx.r5; + vm->reg[6] = input->vm_ctx.r6; + vm->reg[7] = input->vm_ctx.r7; + vm->reg[8] = input->vm_ctx.r8; + vm->reg[9] = input->vm_ctx.r9; + // vm->reg[10] = input->vm_ctx.r10; // set in fd_vm_init + vm->reg[11] = input->vm_ctx.r11; + // Propagate the acc_regions_meta to the vm vm->acc_region_metas = fd_valloc_malloc( valloc, alignof(fd_vm_acc_region_meta_t), sizeof(fd_vm_acc_region_meta_t) * input->vm_ctx.input_data_regions_count ); setup_vm_acc_region_metas( vm->acc_region_metas, vm, vm->instr_ctx );