Closed fanquake closed 3 months ago
I guess it does not happen in valgrind, dropping -fsanitize=memory
first in the CFLAGS?
The accessed value is created by asm in secp256k1_scalar_mul_512
. https://github.com/bitcoin-core/secp256k1/pull/1496 added annotations to secp256k1_scalar_reduce_512
, but not to secp256k1_scalar_mul_512
. So we'll simply need to add those. I'm not sure why this wasn't noticed in #1496, i.e., why MSAN was happy without the annotation. (Perhaps differences in clang versions etc?) cc @theuni
Huh, yeah, I'm not sure either. I never bumped into this with my testing. Will have a look and try to PR a fix.
It took me a while to reproduce... indeed clang-15 does not complain, but clang-17 does. Seeing as it detected something that clang-15 missed, but smarter tracking could potentially understand vars set in asm, it's hard to say if newer clang is smarter or dumber here :p
Either way, I agree with @real-or-random that this needs annotations. Will PR a fix.
Closing as fixed now that #1512 is merged.
Building master (05bfab69aef3622f77f754cfb01220108a109c91) in the following way (same flags as we use in our MSAN CI), results in the following failure:
Related to https://github.com/bitcoin/bitcoin/pull/29742.