Skip to content

ecdsa: VERIFY_CHECK result of _fe_set_b32_limit#1839

Open
real-or-random wants to merge 1 commit intobitcoin-core:masterfrom
real-or-random:202603-ecdsa-maybe-undef
Open

ecdsa: VERIFY_CHECK result of _fe_set_b32_limit#1839
real-or-random wants to merge 1 commit intobitcoin-core:masterfrom
real-or-random:202603-ecdsa-maybe-undef

Conversation

@real-or-random
Copy link
Contributor

This also avoids a spurious -Wmaybe-uninitialized warning emitted by gcc 16 (snapshot) when compiling with -DDETERMINISTIC.

Alternative to #1838 by @mllwchrry who tried very a similar thing as this PR but couldn't convince the compiler. (The GCC snapshot is very annoying: a simple VERIFY_CHECK(secp256k1_fe_set_b32_limit(&xr, c)) doesn't do the trick. I found this variant here with a local store rather by accident.)

This also avoids a spurious "-Wmaybe-uninitialized" warning emitted by
gcc 16 (snapshot) when compiling with -DDETERMINISTIC.
@mllwchrry
Copy link

Good solution. I find it more robust since it verifies the range assumption rather than just zero-initializing. I'll close my PR.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants