build: secp256k1 warnings not turned into errors in MSAN job #33284

issue fanquake openend this issue on September 2, 2025
  1. fanquake commented at 5:22 pm on September 2, 2025: member

    master (7e58c94112d061af38648808aae87c369098f44c) https://cirrus-ci.com/task/6098524451897344:

     0[06:05:23.776] Treat compiler warnings as errors ..... ON
     1<snip>
     2[06:05:24.677] [ 10%] Building CXX object src/crypto/CMakeFiles/bitcoin_crypto.dir/sha256_avx2.cpp.o
     3[06:05:24.678] /ci_container_base/src/secp256k1/src/tests.c:6049:34: warning: variable 'pubkey' is uninitialized when passed as a const pointer argument here [-Wuninitialized-const-pointer]
     4[06:05:24.678]  6049 |     SECP256K1_CHECKMEM_UNDEFINE(&pubkey, sizeof(pubkey));
     5[06:05:24.678]       |                                  ^~~~~~
     6[06:05:24.678] 1 warning generated.
     7[06:05:24.679] /ci_container_base/src/secp256k1/src/tests.c:6049:34: warning: variable 'pubkey' is uninitialized when passed as a const pointer argument here [-Wuninitialized-const-pointer]
     8[06:05:24.679]  6049 |     SECP256K1_CHECKMEM_UNDEFINE(&pubkey, sizeof(pubkey));
     9[06:05:24.679]       |                                  ^~~~~~
    10[06:05:24.679] 1 warning generated.
    
  2. jmoik commented at 12:04 pm on September 3, 2025: none
    I will take a look at this
  3. maflcko commented at 12:22 pm on September 3, 2025: member
    The reason is that Werror is not passed down, so I guess the question is: What flags should be passed down under what circumstances?
  4. fanquake commented at 12:33 pm on September 3, 2025: member
    My expectation would be that the CI shouldn’t produce any spurious output, and any unexpected output would be an error. That way, any output is either fixed, or documented/suppressed. Otherwise anyone looking at the CI can’t know what is expected, what should be fixed, or what doesn’t matter, and we avoid issues like this, #33256, etc.
  5. jmoik commented at 12:37 pm on September 3, 2025: none

    from CmakeLists.txt: The core_interface library aims to encapsulate common build flags. It is a usage requirement for all targets except for secp256k1, which gets its flags by other means.

    We can simply add a section for WERROR to the cmake file just like for other flags like BUILD_TESTS, to inherit the WERROR setting.

  6. jmoik commented at 12:57 pm on September 3, 2025: none
    I actually cannot reproduce the exact warning of this macro, not on clang or g++. But adding an explicitly undefined variable produces a warning and is properly turned into an error with -DWERROR=ON after adding the inheritance.
  7. hebasto added the label Build system on Sep 18, 2025
  8. hebasto commented at 12:55 pm on September 18, 2025: member
  9. real-or-random referenced this in commit a44a339384 on Oct 14, 2025
  10. hebasto commented at 11:41 am on October 14, 2025: member

    Related: bitcoin-core/secp256k1#1750.

    It might be worth updating the secp256k1 subtree to get rid of these warnings.

  11. fanquake referenced this in commit 0eeae4d174 on Oct 19, 2025
  12. enirox001 referenced this in commit 400dd3696e on Oct 29, 2025
  13. enirox001 referenced this in commit a7b1018ddd on Oct 29, 2025
  14. enirox001 referenced this in commit 6a745ef012 on Oct 29, 2025
  15. hebasto closed this on Feb 5, 2026

  16. hebasto referenced this in commit 28d8607882 on Feb 5, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-02-18 06:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me