pseudorand: make the results in deterministic mode per-caller.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2025-11-13 15:40:31 +10:30
parent f8fd97fb5d
commit 0b2b92ffe3
7 changed files with 40 additions and 11 deletions

View File

@@ -21,7 +21,7 @@ int LLVMFuzzerInitialize(int *argc, char ***argv);
/* Provide a non-random pseudo-random function to speed fuzzing. */
static isaac64_ctx isaac64;
uint64_t pseudorand(uint64_t max)
uint64_t pseudorand_(uint64_t max, uint64_t *offset)
{
assert(max);
return isaac64_next_uint(&isaac64, max);