Line data Source code
1 : #include "fd_instr_harness.h"
2 : #include "fd_solfuzz_private.h"
3 : #include "../fd_executor.h"
4 : #include "../fd_runtime.h"
5 : #include "../fd_system_ids.h"
6 : #include "../../log_collector/fd_log_collector.h"
7 : #include "../program/fd_bpf_loader_serialization.h"
8 : #include "../../../ballet/sbpf/fd_sbpf_loader.h"
9 : #include "../../vm/fd_vm.h"
10 : #include "../../vm/fd_vm_private.h"
11 : #include "generated/vm.pb.h"
12 : #include "generated/vm_serialization.pb.h"
13 : #include "../fd_bank.h"
14 :
15 : static fd_sbpf_syscalls_t *
16 : fd_solfuzz_vm_syscall_lookup_func( fd_sbpf_syscalls_t * syscalls,
17 : const char * syscall_name,
18 7553 : size_t len) {
19 7553 : ulong i;
20 :
21 7553 : if (!syscall_name) return NULL;
22 :
23 300894 : for (i = 0; i < fd_sbpf_syscalls_slot_cnt(); ++i) {
24 300866 : if (!fd_sbpf_syscalls_key_inval(syscalls[i].key) && syscalls[i].name && strlen(syscalls[i].name) == len) {
25 11101 : if (!memcmp(syscalls[i].name, syscall_name, len)) {
26 7525 : return syscalls + i;
27 7525 : }
28 11101 : }
29 300866 : }
30 :
31 28 : return NULL;
32 7553 : }
33 :
34 : static ulong
35 : fd_solfuzz_vm_load_from_input_regions( fd_vm_input_region_t const * input,
36 : uint input_count,
37 : fd_exec_test_input_data_region_t ** output,
38 : pb_size_t * output_count,
39 : void * output_buf,
40 7340 : ulong output_bufsz ) {
41 : /* Each region emits a fixed-size record holding a hash of its contents,
42 : so the output size depends on the region count, not their contents. */
43 7340 : ulong output_sz = input_count * sizeof(fd_exec_test_input_data_region_t)
44 7340 : + alignof(fd_exec_test_input_data_region_t);
45 :
46 7340 : if( FD_UNLIKELY( !input_count || output_bufsz < output_sz ) ) {
47 0 : *output = NULL;
48 0 : *output_count = 0;
49 0 : return 0;
50 0 : }
51 :
52 7340 : FD_SCRATCH_ALLOC_INIT( l, output_buf );
53 7340 : *output = FD_SCRATCH_ALLOC_APPEND( l, alignof(fd_exec_test_input_data_region_t),
54 7340 : input_count * sizeof (fd_exec_test_input_data_region_t) );
55 7340 : FD_TEST( *output );
56 7340 : *output_count = input_count;
57 :
58 15514 : for( ulong i=0; i<input_count; i++ ) {
59 8174 : fd_vm_input_region_t const * vm_region = &input[i];
60 8174 : fd_exec_test_input_data_region_t * out_region = &(*output)[i];
61 8174 : out_region->is_writable = vm_region->is_writable;
62 8174 : out_region->offset = vm_region->vaddr_offset;
63 :
64 8174 : out_region->content_hash = fd_solfuzz_hash( (void *)vm_region->haddr, vm_region->region_sz );
65 8174 : }
66 :
67 7340 : ulong end = FD_SCRATCH_ALLOC_FINI( l, 1UL );
68 7340 : return end - (ulong)output_buf; /* return the number of bytes written */
69 7340 : }
70 :
71 :
72 : ulong
73 : fd_solfuzz_pb_syscall_run( fd_solfuzz_runner_t * runner,
74 : void const * input_,
75 : void ** output_,
76 : void * output_buf,
77 7508 : ulong output_bufsz ) {
78 7508 : fd_exec_test_syscall_context_t const * input = fd_type_pun_const( input_ );
79 7508 : fd_exec_test_syscall_effects_t ** output = fd_type_pun( output_ );
80 :
81 : /* Create execution context */
82 7508 : const fd_exec_test_instr_context_t * input_instr_ctx = &input->instr_ctx;
83 7508 : fd_exec_instr_ctx_t ctx[1];
84 7508 : fd_solfuzz_pb_instr_ctx_create( runner, ctx, input_instr_ctx );
85 :
86 7508 : ctx->txn_out->err.exec_err = 0;
87 7508 : ctx->txn_out->err.exec_err_kind = FD_EXECUTOR_ERR_KIND_NONE;
88 7508 : ctx->bank = runner->bank;
89 :
90 : /* Capture outputs */
91 7508 : ulong output_end = (ulong)output_buf + output_bufsz;
92 7508 : FD_SCRATCH_ALLOC_INIT( l, output_buf );
93 7508 : fd_exec_test_syscall_effects_t * effects =
94 7508 : FD_SCRATCH_ALLOC_APPEND( l, alignof(fd_exec_test_syscall_effects_t),
95 7508 : sizeof (fd_exec_test_syscall_effects_t) );
96 7508 : if( FD_UNLIKELY( _l > output_end ) ) {
97 0 : goto error;
98 0 : }
99 :
100 7508 : if( input->vm_ctx.return_data.program_id && input->vm_ctx.return_data.program_id->size == sizeof(fd_pubkey_t) ) {
101 1901 : fd_memcpy( ctx->txn_out->details.return_data.program_id.uc, input->vm_ctx.return_data.program_id->bytes, sizeof(fd_pubkey_t) );
102 1901 : }
103 :
104 7508 : if( input->vm_ctx.return_data.data && input->vm_ctx.return_data.data->size>0U ) {
105 1285 : if( FD_UNLIKELY( input->vm_ctx.return_data.data->size>sizeof(ctx->txn_out->details.return_data.data) ) ) goto error;
106 1285 : ctx->txn_out->details.return_data.len = input->vm_ctx.return_data.data->size;
107 1285 : fd_memcpy( ctx->txn_out->details.return_data.data, input->vm_ctx.return_data.data->bytes, ctx->txn_out->details.return_data.len );
108 1285 : }
109 :
110 7508 : *effects = (fd_exec_test_syscall_effects_t) FD_EXEC_TEST_SYSCALL_EFFECTS_INIT_ZERO;
111 :
112 : /* Set up the VM instance */
113 7508 : fd_spad_t * spad = runner->spad;
114 7508 : fd_sha256_t _sha[1];
115 7508 : fd_sha256_t * sha = fd_sha256_join( fd_sha256_new( _sha ) );
116 7508 : fd_sbpf_syscalls_t * syscalls = fd_sbpf_syscalls_new( fd_spad_alloc_check( spad, fd_sbpf_syscalls_align(), fd_sbpf_syscalls_footprint() ) );
117 7508 : fd_vm_syscall_register_all( syscalls, 0 );
118 :
119 : /* Pull out the memory regions */
120 7508 : if( !input->has_vm_ctx ) {
121 0 : goto error;
122 0 : }
123 :
124 7508 : ulong rodata_sz = input->vm_ctx.rodata ? input->vm_ctx.rodata->size : 0UL;
125 7508 : uchar * rodata = fd_spad_alloc_check( spad, 8UL, rodata_sz );
126 7508 : if ( input->vm_ctx.rodata != NULL ) {
127 4071 : fd_memcpy( rodata, input->vm_ctx.rodata->bytes, rodata_sz );
128 4071 : }
129 :
130 7508 : if( input->vm_ctx.heap_max > FD_VM_HEAP_MAX ) {
131 0 : goto error;
132 0 : }
133 :
134 7508 : FD_TEST( input->vm_ctx.sbpf_version<=FD_SBPF_V3 );
135 :
136 7508 : fd_vm_t * vm = fd_vm_join( fd_vm_new( fd_spad_alloc_check( spad, fd_vm_align(), fd_vm_footprint() ) ) );
137 7508 : if ( !vm ) {
138 0 : goto error;
139 0 : }
140 :
141 : /* If the program ID account owner is the v1 BPF loader, then alignment is disabled (controlled by
142 : the `is_deprecated` flag) */
143 :
144 7508 : ulong input_sz = 0UL;
145 7508 : ulong pre_lens[256] = {0};
146 7508 : fd_vm_input_region_t input_mem_regions[1000] = {0}; /* We can have a max of (3 * num accounts + 1) regions */
147 7508 : fd_vm_acc_region_meta_t acc_region_metas[256] = {0}; /* instr acc idx to idx */
148 7508 : uint input_mem_regions_cnt = 0U;
149 7508 : int direct_mapping = FD_FEATURE_ACTIVE_BANK( ctx->bank, account_data_direct_mapping );
150 7508 : int syscall_parameter_address_restrictions = FD_FEATURE_ACTIVE_BANK( ctx->bank, syscall_parameter_address_restrictions );
151 7508 : int virtual_address_space_adjustments = FD_FEATURE_ACTIVE_BANK( ctx->bank, virtual_address_space_adjustments );
152 7508 : int direct_account_pointers_in_program_input = FD_FEATURE_ACTIVE_BANK( ctx->bank, direct_account_pointers_in_program_input );
153 :
154 7508 : uchar program_id_idx = ctx->instr->program_id;
155 7508 : fd_acc_t * program_acc = ctx->txn_out->accounts.account[program_id_idx];
156 7508 : uchar is_deprecated = ( program_id_idx < ctx->txn_out->accounts.cnt ) &&
157 7564 : ( !memcmp( program_acc->owner, fd_solana_bpf_loader_deprecated_program_id.key, sizeof(fd_pubkey_t) ) );
158 :
159 : /* Push the instruction onto the stack. This may also modify the sysvar instructions account, if its present. */
160 7508 : int stack_push_err = fd_instr_stack_push( ctx->runtime, ctx->txn_in, ctx->txn_out, (fd_instr_info_t *)ctx->instr );
161 7508 : if( FD_UNLIKELY( stack_push_err ) ) {
162 0 : FD_LOG_WARNING(( "instr stack push err" ));
163 0 : goto error;
164 0 : }
165 :
166 7508 : ulong instr_data_offset = 0UL;
167 7508 : int err = fd_bpf_loader_input_serialize_parameters( ctx,
168 7508 : pre_lens,
169 7508 : input_mem_regions,
170 7508 : &input_mem_regions_cnt,
171 7508 : acc_region_metas,
172 7508 : virtual_address_space_adjustments,
173 7508 : direct_mapping,
174 7508 : direct_account_pointers_in_program_input,
175 7508 : is_deprecated,
176 7508 : &instr_data_offset,
177 7508 : &input_sz );
178 7508 : if( FD_UNLIKELY( err ) ) {
179 0 : FD_LOG_WARNING(( "bpf loader input serialize parameters err" ));
180 0 : goto error;
181 0 : }
182 :
183 7508 : fd_vm_init( vm,
184 7508 : ctx,
185 7508 : input->vm_ctx.heap_max,
186 7508 : ctx->txn_out->details.compute_budget.compute_meter,
187 7508 : rodata,
188 7508 : rodata_sz,
189 7508 : NULL, // TODO
190 7508 : 0, // TODO
191 7508 : 0, // TODO
192 7508 : 0, // TODO, text_sz
193 7508 : 0, // TODO
194 7508 : NULL, // TODO
195 7508 : input->vm_ctx.sbpf_version,
196 7508 : syscalls,
197 7508 : NULL, // TODO
198 7508 : sha,
199 7508 : input_mem_regions,
200 7508 : input_mem_regions_cnt,
201 7508 : acc_region_metas,
202 7508 : is_deprecated,
203 7508 : direct_mapping,
204 7508 : syscall_parameter_address_restrictions,
205 7508 : virtual_address_space_adjustments,
206 7508 : 0 /* dump_syscall_to_pb */,
207 7508 : 0UL /* r2 is set by the fuzzer below */ );
208 :
209 : // Override some execution state values from the syscall fuzzer input
210 : // This is so we can test if the syscall mutates any of these erroneously
211 7508 : vm->reg[0] = input->vm_ctx.r0;
212 7508 : vm->reg[1] = input->vm_ctx.r1;
213 7508 : vm->reg[2] = input->vm_ctx.r2;
214 7508 : vm->reg[3] = input->vm_ctx.r3;
215 7508 : vm->reg[4] = input->vm_ctx.r4;
216 7508 : vm->reg[5] = input->vm_ctx.r5;
217 7508 : vm->reg[6] = input->vm_ctx.r6;
218 7508 : vm->reg[7] = input->vm_ctx.r7;
219 7508 : vm->reg[8] = input->vm_ctx.r8;
220 7508 : vm->reg[9] = input->vm_ctx.r9;
221 7508 : vm->reg[10] = input->vm_ctx.r10;
222 7508 : vm->reg[11] = input->vm_ctx.r11;
223 :
224 7508 : fd_vm_mem_init_full( vm );
225 :
226 : // Override initial part of the heap, if specified the syscall fuzzer input
227 7508 : if( input->syscall_invocation.heap_prefix ) {
228 6582 : fd_memcpy( vm->heap, input->syscall_invocation.heap_prefix->bytes,
229 6582 : fd_ulong_min( input->syscall_invocation.heap_prefix->size, vm->heap_max ) );
230 6582 : }
231 :
232 : // Override initial part of the stack, if specified the syscall fuzzer input
233 7508 : if( input->syscall_invocation.stack_prefix ) {
234 3140 : fd_memcpy( vm->stack, input->syscall_invocation.stack_prefix->bytes,
235 3140 : fd_ulong_min( input->syscall_invocation.stack_prefix->size, FD_VM_STACK_MAX ) );
236 3140 : }
237 :
238 : // Look up the syscall to execute
239 7508 : char * syscall_name = (char *)input->syscall_invocation.function_name.bytes;
240 7508 : fd_sbpf_syscalls_t const * syscall = fd_solfuzz_vm_syscall_lookup_func(syscalls, syscall_name, input->syscall_invocation.function_name.size);
241 7508 : if( !syscall ) {
242 0 : goto error;
243 0 : }
244 :
245 : /* There's an instr ctx struct embedded in the txn ctx instr stack. */
246 7508 : fd_exec_instr_ctx_t * instr_ctx = &ctx->runtime->instr.stack[ ctx->runtime->instr.stack_sz - 1 ];
247 7508 : *instr_ctx = (fd_exec_instr_ctx_t) {
248 7508 : .instr = ctx->instr,
249 7508 : .txn_out = ctx->txn_out,
250 7508 : .runtime = ctx->runtime,
251 7508 : };
252 :
253 : /* Actually invoke the syscall */
254 7508 : int syscall_err = syscall->func( vm, vm->reg[1], vm->reg[2], vm->reg[3], vm->reg[4], vm->reg[5] );
255 7508 : int instr_end_err = fd_execute_instr_end( vm->instr_ctx, ctx->instr, syscall_err );
256 7508 : if( instr_end_err ) {
257 1726 : fd_log_collector_program_failure( vm->instr_ctx );
258 1726 : }
259 :
260 : /* Capture the effects */
261 7508 : int exec_err = vm->instr_ctx->txn_out->err.exec_err;
262 7508 : effects->error = 0;
263 7508 : if( instr_end_err ) {
264 1726 : if( exec_err==0 ) {
265 0 : FD_LOG_WARNING(( "TODO: syscall returns error, but exec_err not set. this is probably missing a log." ));
266 0 : effects->error = -1;
267 1726 : } else {
268 1726 : effects->error = (exec_err <= 0) ? -exec_err : -1;
269 :
270 : /* Map error kind, equivalent to:
271 : effects->error_kind = (fd_exec_test_err_kind_t)(vm->instr_ctx->txn_ctx->err.exec_err_kind); */
272 1726 : switch (vm->instr_ctx->txn_out->err.exec_err_kind) {
273 523 : case FD_EXECUTOR_ERR_KIND_EBPF:
274 523 : effects->error_kind = FD_EXEC_TEST_ERR_KIND_EBPF;
275 523 : break;
276 413 : case FD_EXECUTOR_ERR_KIND_SYSCALL:
277 413 : effects->error_kind = FD_EXEC_TEST_ERR_KIND_SYSCALL;
278 413 : break;
279 790 : case FD_EXECUTOR_ERR_KIND_INSTR:
280 790 : effects->error_kind = FD_EXEC_TEST_ERR_KIND_INSTRUCTION;
281 790 : break;
282 0 : default:
283 0 : effects->error_kind = FD_EXEC_TEST_ERR_KIND_UNSPECIFIED;
284 0 : break;
285 1726 : }
286 1726 : }
287 1726 : }
288 7508 : effects->r0 = instr_end_err ? 0 : vm->reg[0]; // Save only on success
289 7508 : effects->cu_avail = (ulong)vm->cu;
290 :
291 7508 : effects->heap_hash = fd_solfuzz_hash( vm->heap, vm->heap_max );
292 7508 : effects->stack_hash = fd_solfuzz_hash( vm->stack, FD_VM_STACK_MAX );
293 7508 : effects->rodata_hash = fd_solfuzz_hash( vm->rodata, vm->rodata_sz ? rodata_sz : 0UL );
294 :
295 7508 : effects->frame_count = vm->frame_cnt;
296 :
297 : /* Capture input regions */
298 7508 : ulong tmp_end = FD_SCRATCH_ALLOC_FINI( l, 1UL );
299 :
300 : /* Don't compare input data regions if execution failed and
301 : virtual_address_space_adjustments is enabled, because
302 : Agave leaks data into the input regions under these circumstances. */
303 7508 : ulong input_regions_size = 0UL;
304 7508 : if( syscall_err && virtual_address_space_adjustments ) {
305 216 : effects->input_data_regions = NULL;
306 216 : effects->input_data_regions_count = 0UL;
307 7292 : } else {
308 7292 : input_regions_size = fd_solfuzz_vm_load_from_input_regions(
309 7292 : vm->input_mem_regions,
310 7292 : vm->input_mem_regions_cnt,
311 7292 : &effects->input_data_regions,
312 7292 : &effects->input_data_regions_count,
313 7292 : (void *)tmp_end,
314 7292 : fd_ulong_sat_sub( output_end, tmp_end )
315 7292 : );
316 :
317 7334 : if( !!vm->input_mem_regions_cnt && !effects->input_data_regions ) {
318 0 : goto error;
319 0 : }
320 7292 : }
321 :
322 : /* Return the effects */
323 7508 : ulong actual_end = tmp_end + input_regions_size;
324 7508 : fd_solfuzz_pb_instr_ctx_destroy( runner, ctx );
325 :
326 7508 : *output = effects;
327 7508 : return actual_end - (ulong)output_buf;
328 :
329 0 : error:
330 0 : fd_solfuzz_pb_instr_ctx_destroy( runner, ctx );
331 0 : return 0;
332 7508 : }
333 :
334 : ulong
335 : fd_solfuzz_pb_vm_serialize_run( fd_solfuzz_runner_t * runner,
336 : void const * input_,
337 : void ** output_,
338 : void * output_buf,
339 1000 : ulong output_bufsz ) {
340 1000 : fd_exec_test_instr_context_t const * input = fd_type_pun_const( input_ );
341 1000 : fd_exec_test_vm_serialization_effects_t ** output = fd_type_pun( output_ );
342 :
343 : /* Create execution context */
344 1000 : fd_exec_instr_ctx_t ctx[1];
345 1000 : fd_solfuzz_pb_instr_ctx_create( runner, ctx, input );
346 :
347 1000 : ctx->txn_out->err.exec_err = 0;
348 1000 : ctx->txn_out->err.exec_err_kind = FD_EXECUTOR_ERR_KIND_NONE;
349 1000 : ctx->bank = runner->bank;
350 :
351 : /* Capture outputs */
352 1000 : ulong output_end = (ulong)output_buf + output_bufsz;
353 1000 : FD_SCRATCH_ALLOC_INIT( l, output_buf );
354 1000 : fd_exec_test_vm_serialization_effects_t * effects =
355 1000 : FD_SCRATCH_ALLOC_APPEND( l, alignof(fd_exec_test_vm_serialization_effects_t),
356 1000 : sizeof (fd_exec_test_vm_serialization_effects_t) );
357 1000 : FD_TEST( _l <= output_end );
358 1000 : *effects = (fd_exec_test_vm_serialization_effects_t) FD_EXEC_TEST_VM_SERIALIZATION_EFFECTS_INIT_ZERO;
359 :
360 : /* Determine feature flags and is_deprecated */
361 1000 : int direct_mapping = FD_FEATURE_ACTIVE_BANK( ctx->bank, account_data_direct_mapping );
362 1000 : int virtual_address_space_adjustments = FD_FEATURE_ACTIVE_BANK( ctx->bank, virtual_address_space_adjustments );
363 1000 : int direct_account_pointers_in_program_input = FD_FEATURE_ACTIVE_BANK( ctx->bank, direct_account_pointers_in_program_input );
364 :
365 1000 : uchar program_id_idx = ctx->instr->program_id;
366 1000 : fd_acc_t * program_acc = ctx->txn_out->accounts.account[program_id_idx];
367 1000 : uchar is_deprecated = ( program_id_idx < ctx->txn_out->accounts.cnt ) &&
368 1000 : ( !memcmp( program_acc->owner, fd_solana_bpf_loader_deprecated_program_id.key, sizeof(fd_pubkey_t) ) );
369 :
370 : /* Push the instruction onto the stack */
371 1000 : FD_TEST( !fd_instr_stack_push( ctx->runtime, ctx->txn_in, ctx->txn_out, (fd_instr_info_t *)ctx->instr ) );
372 :
373 : /* Call serialize_parameters */
374 1000 : ulong input_sz = 0UL;
375 1000 : ulong pre_lens[256] = {0};
376 1000 : fd_vm_input_region_t input_mem_regions[1000] = {0};
377 1000 : fd_vm_acc_region_meta_t acc_region_metas[256] = {0};
378 1000 : uint input_mem_regions_cnt = 0U;
379 1000 : ulong instr_data_offset = 0UL;
380 :
381 1000 : int err = fd_bpf_loader_input_serialize_parameters(
382 1000 : ctx,
383 1000 : pre_lens,
384 1000 : input_mem_regions,
385 1000 : &input_mem_regions_cnt,
386 1000 : acc_region_metas,
387 1000 : virtual_address_space_adjustments,
388 1000 : direct_mapping,
389 1000 : direct_account_pointers_in_program_input,
390 1000 : is_deprecated,
391 1000 : &instr_data_offset,
392 1000 : &input_sz
393 1000 : );
394 :
395 1000 : if( FD_UNLIKELY( err ) ) {
396 0 : effects->has_error = true;
397 0 : ulong actual_end = FD_SCRATCH_ALLOC_FINI( l, 1UL );
398 0 : fd_solfuzz_pb_instr_ctx_destroy( runner, ctx );
399 0 : *output = effects;
400 0 : return actual_end - (ulong)output_buf;
401 0 : }
402 :
403 : /* Hash the serialized memory buffer. */
404 1000 : uchar * serialized_buf = ctx->runtime->bpf_loader_serialization.serialization_mem[ ctx->runtime->instr.stack_sz-1UL ];
405 1000 : effects->serialized_memory_hash = fd_hash( 0UL, serialized_buf, input_sz );
406 :
407 : /* Populate vm_input_memory_regions */
408 1000 : effects->vm_input_memory_regions_count = (pb_size_t)input_mem_regions_cnt;
409 1000 : effects->vm_input_memory_regions =
410 1000 : FD_SCRATCH_ALLOC_APPEND( l, alignof(fd_exec_test_vm_input_memory_region_t),
411 1000 : input_mem_regions_cnt * sizeof(fd_exec_test_vm_input_memory_region_t) );
412 1000 : FD_TEST( _l <= output_end );
413 :
414 24712 : for( uint i=0; i<input_mem_regions_cnt; i++ ) {
415 23712 : fd_vm_input_region_t const * region = &input_mem_regions[i];
416 23712 : fd_exec_test_vm_input_memory_region_t * out = &effects->vm_input_memory_regions[i];
417 23712 : out->vm_address = FD_VM_MEM_MAP_INPUT_REGION_START + region->vaddr_offset;
418 23712 : out->region_size = region->region_sz;
419 23712 : out->is_writable = region->is_writable;
420 23712 : }
421 :
422 : /* Populate serialized_account_metadata */
423 1000 : ulong num_ix_accounts = ctx->instr->acct_cnt;
424 1000 : effects->serialized_account_metadata_count = (pb_size_t)num_ix_accounts;
425 1000 : effects->serialized_account_metadata =
426 1000 : FD_SCRATCH_ALLOC_APPEND( l, alignof(fd_exec_test_vm_serialized_account_metadata_t),
427 1000 : num_ix_accounts * sizeof(fd_exec_test_vm_serialized_account_metadata_t) );
428 1000 : FD_TEST( _l <= output_end );
429 :
430 76379 : for( ulong i=0; i<num_ix_accounts; i++ ) {
431 75379 : fd_vm_acc_region_meta_t const * meta = &acc_region_metas[i];
432 75379 : fd_exec_test_vm_serialized_account_metadata_t * out = &effects->serialized_account_metadata[i];
433 75379 : out->original_data_len = meta->original_data_len;
434 75379 : out->vm_data_addr = meta->vm_data_addr;
435 75379 : out->vm_key_addr = meta->vm_key_addr;
436 75379 : out->vm_lamports_addr = meta->vm_lamports_addr;
437 75379 : out->vm_owner_addr = meta->vm_owner_addr;
438 75379 : }
439 :
440 1000 : ulong actual_end = FD_SCRATCH_ALLOC_FINI( l, 1UL );
441 1000 : fd_solfuzz_pb_instr_ctx_destroy( runner, ctx );
442 :
443 1000 : *output = effects;
444 1000 : return actual_end - (ulong)output_buf;
445 1000 : }
|