-
Notifications
You must be signed in to change notification settings - Fork 157
ml-dsa: bump rand_core
to v0.9
#899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Well that's odd... https://github.com/RustCrypto/signatures/actions/runs/13297403714/job/37132349904
|
The failure seems to be happening inside It only seems to happen in non-release builds, which makes me curious if it might legitimately be a case of stack overflow |
617bc76
to
5ef721e
Compare
[profile.dev] | ||
opt-level = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what caused the test failure: without it the stack seems to overflow when testing dev builds.
Might suggest a case for #[inline]
or #[inline(always)]
5ef721e
to
704e536
Compare
Hmm, the initial stack overflow was locally reproducible, but now I can't reproduce the issue at all and I have no idea why this simple update would've caused it in the first place |
First of all, thanks for doing this upgrade. I had a problem with another project having to translate between versions of Second, I have also had stack overflows with In any case, I just pulled the branch and confirmed that |
@bifurcation the initial stack overflow (because I split the crate out of the workspace and didn't propagate the opt-level) was reproducible. I can't reproduce the latest failures, however they seem to reproducibly break in CI. |
Sorry, I misunderstood. I can reproduce the overflow on macOS / Apple Silicon by commenting out that
It's not ridiculously deep, for example. Which I suppose means that one of these stack frames is huge for some reason. But they're all within One thing I noticed that might be relevant: It looks like |
Notes trying to dissect this: The stack overflow happens even with the body of
Adding a line The following prop_compose avoids overflow, which seems to indicate that it's not the computation of key pairs that's the problem. fn mldsa87_keypair()(seed_bytes in any::<[u8; 32]>()) -> Vec<u8> {
let _unused = MlDsa87::key_gen_internal(seed_bytes.as_ref());
seed_bytes.len()
} The following prop_compose does cause an overflow, where 178432 is fn mldsa87_keypair()(seed_bytes in any::<[u8; 32]>()) -> [u8; 178432] {
[0; 178432]
} Looking at the source code for It is possible to allocate more stack to tests with the
|
Net of all that:
|
Increasing the stack size "fixed" the issue. I guess we'll go with that for now. |
No description provided.