Skip to content

Conversation

@asaites
Copy link

@asaites asaites commented Nov 4, 2025

Values larger than $2^{32}-1$ should be converted to a byte array before passing them onward to the seeded-random-state function.

Note to reviewers: I am not experienced with lisp, and so used generative AI to write the integer->ub32-vector function. My apologies if it is not a particularly idiomatic way to accomplish this in lisp, but in any case, the important aspect for the fix is that get-random-state converts larger values to an array (or rejects them).

Closes: #327

Values larger than 2^32-1 should be converted to a byte array
before passing them onward to the seeded-random-state function.

Closes: quil-lang#327
@stylewarning
Copy link
Member

Thanks for the patch. I'll try to have it reviewed by tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

qvm-app server mishandles rng-seeds greater than $2^32-1$

2 participants