Skip to content

Commit e2d9538

Browse files
committed
use xxhash output
1 parent 648adca commit e2d9538

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/flamenco/runtime/tests/fd_elf_harness.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ fd_solfuzz_fb_elf_loader_run( fd_solfuzz_runner_t * runner,
201201
uchar out_err_code = FD_SBPF_ELF_SUCCESS;
202202

203203
/* Rodata */
204-
ulong out_rodata_hash = fd_hash( 0UL, prog->rodata, prog->rodata_sz );
204+
ulong out_rodata_hash_u64 = fd_hash( 0UL, prog->rodata, prog->rodata_sz );
205+
SOL_COMPAT_NS(XXHash_t) out_rodata_hash;
206+
fd_memcpy( out_rodata_hash.hash, &out_rodata_hash_u64, sizeof(ulong) );
205207

206208
/* Text count */
207209
ulong out_text_cnt = prog->info.text_cnt;
@@ -235,10 +237,12 @@ fd_solfuzz_fb_elf_loader_run( fd_solfuzz_runner_t * runner,
235237
sort_ulong_inplace( tmp_out_calldests, out_calldests_cnt );
236238

237239
/* Create output calldests vector */
238-
ulong out_calldests_hash = fd_hash( 0UL, tmp_out_calldests, sizeof(ulong) * out_calldests_cnt );
240+
ulong out_calldests_hash_u64 = fd_hash( 0UL, tmp_out_calldests, sizeof(ulong) * out_calldests_cnt );
241+
SOL_COMPAT_NS(XXHash_t) out_calldests_hash;
242+
fd_memcpy( out_calldests_hash.hash, &out_calldests_hash_u64, sizeof(ulong) );
239243

240244
/* Build effects */
241-
SOL_COMPAT_NS(ELFLoaderEffects_create_as_root)( runner->fb_builder, out_err_code, out_rodata_hash, out_text_cnt, out_text_off, out_entry_pc, out_calldests_hash );
245+
SOL_COMPAT_NS(ELFLoaderEffects_create_as_root)( runner->fb_builder, out_err_code, &out_rodata_hash, out_text_cnt, out_text_off, out_entry_pc, &out_calldests_hash );
242246

243247
return SOL_COMPAT_V2_SUCCESS;
244248
}

0 commit comments

Comments
 (0)