For native builds, this builds and runs a test for the bug itself.
When cross-compiling, it assumes any 9.x or 10.x GCC is affected.
The second commit (native test) may be more than this project needs.
For native builds, this builds and runs a test for the bug itself.
When cross-compiling, it assumes any 9.x or 10.x GCC is affected.
The second commit (native test) may be more than this project needs.
Hmm, this is a lot simpler than what I tried!
The only argument against this would be that it doesn’t protect non-autoconf builds.
The only argument against this would be that it doesn’t protect non-autoconf builds.
Yes, but I think that’s an important argument.
Also, the code of secp256k1_memcmp_var
is fewer lines and easier to reason about than this autoconf code.
I like @gmaxwell ’s suggestion to just have a test case for it, for non-autotools builders.
Another option would be to add a define in configure that the code #ifndef/#errors without…
I like @gmaxwell ’s suggestion to just have a test case for it, for non-autotools builders.
Hm but this should be a self-test then. Not everyone runs the tests.
Another option would be to add a define in configure that the code #ifndef/#errors without…
Then people will just remove the #error
.
Also every form of conditional compilation makes it harder for us to test on Travis reliably.
I think all of these are more or less acceptable solutions but each of them has some disadvantages. What’s the disadvantage of secp256k1_memcmp_var
?
secp256k1_memcmp_var
obviously can’t help with stdlib calling __builtin_memcmp
either ;)
Note that
secp256k1_memcmp_var
obviously can’t help with stdlib calling__builtin_memcmp
either ;)
obviously :)
memset
.