Failure to run Fuzz tests when running with corpus #32089

issue Prabhat1308 openend this issue on March 18, 2025
  1. Prabhat1308 commented at 9:05 am on March 18, 2025: contributor

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    When running the fuzz tests with fuzz corpus raises an error

     0FUZZ=process_message build_fuzz/bin/fuzz qa-assets/fuzz_corpora/process_message/                                               ─╯
     1INFO: Running with entropic power schedule (0xFF, 100).
     2INFO: Seed: 64371175
     3INFO: Loaded 1 modules   (1252320 inline 8-bit counters): 1252320 [0x1061c8000, 0x1062f9be0), 
     4INFO: Loaded 1 PC tables (1252320 PCs): 1252320 [0x1062f9be0,0x1076159e0), 
     5=================================================================
     6==36574==ERROR: AddressSanitizer: container-overflow on address 0x60800002c268 at pc 0x000102074ef4 bp 0x00016ddd26e0 sp 0x00016ddd26d8
     7WRITE of size 8 at 0x60800002c268 thread T0
     8    [#0](/bitcoin-bitcoin/0/) 0x000102074ef0 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::__init_copy_ctor_external(char const*, unsigned long)+0x1c4 (fuzz:arm64+0x100048ef0)
     9    [#1](/bitcoin-bitcoin/1/) 0x0001057b34f8 in fuzzer::ListFilesInDirRecursive(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, long*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>*, bool)+0x26c (fuzz:arm64+0x1037874f8)
    10    [#2](/bitcoin-bitcoin/2/) 0x0001057b27c0 in fuzzer::GetSizedFilesFromDir(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<fuzzer::SizedFile, std::__1::allocator<fuzzer::SizedFile>>*)+0x2c (fuzz:arm64+0x1037867c0)
    11    [#3](/bitcoin-bitcoin/3/) 0x0001057ae338 in fuzzer::ReadCorpora(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&)+0x4c (fuzz:arm64+0x103782338)
    12    [#4](/bitcoin-bitcoin/4/) 0x0001057ae1a0 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long))+0x1dbc (fuzz:arm64+0x1037821a0)
    13    [#5](/bitcoin-bitcoin/5/) 0x0001057c1aa8 in main+0x24 (fuzz:arm64+0x103795aa8)
    14    [#6](/bitcoin-bitcoin/6/) 0x00018ce70270  (<unknown module>)
    15    [#7](/bitcoin-bitcoin/7/) 0xf3547ffffffffffc  (<unknown module>)
    16
    170x60800002c268 is located 72 bytes inside of 96-byte region [0x60800002c220,0x60800002c280)
    18allocated by thread T0 here:
    19    [#0](/bitcoin-bitcoin/0/) 0x0001094d92c4 in _Znwm+0x6c (libclang_rt.asan_osx_dynamic.dylib:arm64+0x612c4)
    20    [#1](/bitcoin-bitcoin/1/) 0x0001025f0a5c in std::__1::__split_buffer<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>&)+0xf0 (fuzz:arm64+0x1005c4a5c)
    21    [#2](/bitcoin-bitcoin/2/) 0x000102943a48 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>* std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>::__push_back_slow_path<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)+0x244 (fuzz:arm64+0x100917a48)
    22    [#3](/bitcoin-bitcoin/3/) 0x0001057b3468 in fuzzer::ListFilesInDirRecursive(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, long*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>*, bool)+0x1dc (fuzz:arm64+0x103787468)
    23    [#4](/bitcoin-bitcoin/4/) 0x0001057b27c0 in fuzzer::GetSizedFilesFromDir(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<fuzzer::SizedFile, std::__1::allocator<fuzzer::SizedFile>>*)+0x2c (fuzz:arm64+0x1037867c0)
    24    [#5](/bitcoin-bitcoin/5/) 0x0001057ae338 in fuzzer::ReadCorpora(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&)+0x4c (fuzz:arm64+0x103782338)
    25    [#6](/bitcoin-bitcoin/6/) 0x0001057ae1a0 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long))+0x1dbc (fuzz:arm64+0x1037821a0)
    26    [#7](/bitcoin-bitcoin/7/) 0x0001057c1aa8 in main+0x24 (fuzz:arm64+0x103795aa8)
    27    [#8](/bitcoin-bitcoin/8/) 0x00018ce70270  (<unknown module>)
    28    [#9](/bitcoin-bitcoin/9/) 0xf3547ffffffffffc  (<unknown module>)
    29
    30HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_container_overflow=0.
    31If you suspect a false positive see also: https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow.
    32SUMMARY: AddressSanitizer: container-overflow (fuzz:arm64+0x100048ef0) in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::__init_copy_ctor_external(char const*, unsigned long)+0x1c4
    33Shadow bytes around the buggy address:
    34  0x60800002bf80: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fd
    35  0x60800002c000: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 fa
    36  0x60800002c080: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fd
    37  0x60800002c100: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 fa
    38  0x60800002c180: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fd
    39=>0x60800002c200: fa fa fa fa 00 00 00 00 00 00 00 00 00[fc]fc fc
    40  0x60800002c280: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 fa
    41  0x60800002c300: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00
    42  0x60800002c380: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 fa
    43  0x60800002c400: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
    44  0x60800002c480: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
    45Shadow byte legend (one shadow byte represents 8 application bytes):
    46  Addressable:           00
    47  Partially addressable: 01 02 03 04 05 06 07 
    48  Heap left redzone:       fa
    49  Freed heap region:       fd
    50  Stack left redzone:      f1
    51  Stack mid redzone:       f2
    52  Stack right redzone:     f3
    53  Stack after return:      f5
    54  Stack use after scope:   f8
    55  Global redzone:          f9
    56  Global init order:       f6
    57  Poisoned by user:        f7
    58  Container overflow:      fc
    59  Array cookie:            ac
    60  Intra object redzone:    bb
    61  ASan internal:           fe
    62  Left alloca redzone:     ca
    63  Right alloca redzone:    cb
    64==36574==ABORTING
    65[3]    36574 abort      FUZZ=process_message build_fuzz/bin/fuzz 
    

    when running with without corpus , the fuzz test runs fine.

     0 FUZZ=process_message build_fuzz/bin/fuzz                                                                                       ─╯
     1INFO: Running with entropic power schedule (0xFF, 100).
     2INFO: Seed: 85124989
     3INFO: Loaded 1 modules   (1252320 inline 8-bit counters): 1252320 [0x10672c000, 0x10685dbe0), 
     4INFO: Loaded 1 PC tables (1252320 PCs): 1252320 [0x10685dbe0,0x107b799e0), 
     5INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
     6INFO: A corpus is not provided, starting from an empty corpus
     7[#2](/bitcoin-bitcoin/2/)      INITED cov: 2748 ft: 2747 corp: 1/1b exec/s: 0 rss: 193Mb
     8[#6](/bitcoin-bitcoin/6/)      NEW    cov: 2754 ft: 2848 corp: 2/2b lim: 4 exec/s: 0 rss: 193Mb L: 1/1 MS: 4 ChangeBinInt-ChangeBit-CopyPart-ChangeByte-
     9[#8](/bitcoin-bitcoin/8/)      NEW    cov: 2754 ft: 2851 corp: 3/4b lim: 4 exec/s: 0 rss: 194Mb L: 2/2 MS: 2 CopyPart-InsertByte-
    10[#11](/bitcoin-bitcoin/11/)     NEW    cov: 2757 ft: 2858 corp: 4/5b lim: 4 exec/s: 0 rss: 194Mb L: 1/2 MS: 3 ChangeBit-ChangeBinInt-ChangeBit-
    11[#26](/bitcoin-bitcoin/26/)     NEW    cov: 2757 ft: 2859 corp: 5/7b lim: 4 exec/s: 0 rss: 194Mb L: 2/2 MS: 5 CrossOver-ChangeBit-ChangeByte-CrossOver-CrossOver-
    12[#27](/bitcoin-bitcoin/27/)     NEW    cov: 2758 ft: 2878 corp: 6/8b lim: 4 exec/s: 0 rss: 194Mb L: 1/2 MS: 1 ChangeByte-
    13[#53](/bitcoin-bitcoin/53/)     NEW    cov: 2758 ft: 2879 corp: 7/12b lim: 4 exec/s: 0 rss: 195Mb L: 4/4 MS: 1 CopyPart-
    14[#278](/bitcoin-bitcoin/278/)    NEW    cov: 2759 ft: 2881 corp: 8/17b lim: 6 exec/s: 0 rss: 198Mb L: 5/5 MS: 5 ShuffleBytes-ChangeByte-EraseBytes-CrossOver-CrossOver-
    15[#364](/bitcoin-bitcoin/364/)    NEW    cov: 2759 ft: 2882 corp: 9/18b lim: 6 exec/s: 0 rss: 200Mb L: 1/5 MS: 1 ChangeByte-
    16[#615](/bitcoin-bitcoin/615/)    NEW    cov: 2759 ft: 2890 corp: 10/20b lim: 8 exec/s: 0 rss: 204Mb L: 2/5 MS: 1 InsertByte-
    17[#657](/bitcoin-bitcoin/657/)    NEW    cov: 2759 ft: 2892 corp: 11/27b lim: 8 exec/s: 0 rss: 204Mb L: 7/7 MS: 2 ChangeByte-CopyPart-
    18[#692](/bitcoin-bitcoin/692/)    NEW    cov: 2759 ft: 2893 corp: 12/34b lim: 8 exec/s: 0 rss: 205Mb L: 7/7 MS: 5 InsertRepeatedBytes-InsertByte-EraseBytes-ChangeBinInt-InsertRepeatedBytes-
    19[#1013](/bitcoin-bitcoin/1013/)   NEW    cov: 2759 ft: 2895 corp: 13/45b lim: 11 exec/s: 0 rss: 210Mb L: 11/11 MS: 1 InsertRepeatedBytes-
    20[#1341](/bitcoin-bitcoin/1341/)   NEW    cov: 2764 ft: 2901 corp: 14/58b lim: 14 exec/s: 0 rss: 215Mb L: 13/13 MS: 3 ChangeByte-InsertRepeatedBytes-InsertRepeatedBytes-
    21[#1347](/bitcoin-bitcoin/1347/)   NEW    cov: 2765 ft: 2902 corp: 15/61b lim: 14 exec/s: 0 rss: 215Mb L: 3/13 MS: 1 CrossOver-
    22[#1378](/bitcoin-bitcoin/1378/)   NEW    cov: 2765 ft: 2905 corp: 16/75b lim: 14 exec/s: 0 rss: 216Mb L: 14/14 MS: 1 InsertByte-
    23[#1716](/bitcoin-bitcoin/1716/)   NEW    cov: 2765 ft: 2908 corp: 17/91b lim: 17 exec/s: 0 rss: 221Mb L: 16/16 MS: 3 CrossOver-InsertRepeatedBytes-InsertRepeatedBytes-
    24[#1754](/bitcoin-bitcoin/1754/)   NEW    cov: 2765 ft: 2911 corp: 18/106b lim: 17 exec/s: 0 rss: 222Mb L: 15/16 MS: 3 InsertByte-ChangeBit-CopyPart-
    25[#1982](/bitcoin-bitcoin/1982/)   NEW    cov: 2766 ft: 2912 corp: 19/110b lim: 17 exec/s: 0 rss: 226Mb L: 4/16 MS: 3 ChangeBit-EraseBytes-ChangeBit-
    26[#2405](/bitcoin-bitcoin/2405/)   NEW    cov: 2767 ft: 2915 corp: 20/130b lim: 21 exec/s: 0 rss: 232Mb L: 20/20 MS: 3 InsertByte-InsertRepeatedBytes-InsertRepeatedBytes-
    27[#2418](/bitcoin-bitcoin/2418/)   NEW    cov: 2769 ft: 2917 corp: 21/151b lim: 21 exec/s: 0 rss: 233Mb L: 21/21 MS: 3 InsertRepeatedBytes-InsertByte-CrossOver-
    28[#2629](/bitcoin-bitcoin/2629/)   REDUCE cov: 2769 ft: 2917 corp: 21/150b lim: 21 exec/s: 0 rss: 236Mb L: 6/21 MS: 1 EraseBytes-
    29        NEW_FUNC[1/19]: 0x0001034cb5bc in CNetAddr::IsRFC1918() const+0x0 (fuzz:arm64+0x100f3b5bc)
    30        NEW_FUNC[2/19]: 0x0001034cbd94 in CNetAddr::IsRFC2544() const+0x0 (fuzz:arm64+0x100f3bd94)
    31[#3051](/bitcoin-bitcoin/3051/)   NEW    cov: 2881 ft: 3227 corp: 22/173b lim: 25 exec/s: 0 rss: 244Mb L: 23/23 MS: 2 InsertRepeatedBytes-InsertRepeatedBytes-
    32[#3071](/bitcoin-bitcoin/3071/)   REDUCE cov: 2881 ft: 3227 corp: 22/170b lim: 25 exec/s: 0 rss: 244Mb L: 3/23 MS: 5 ChangeBit-CrossOver-CMP-CrossOver-EraseBytes- DE: "\377\377\377\377"-
    33        NEW_FUNC[1/11]: 0x0001025a7a5c in std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>::shrink_to_fit()+0x0 (fuzz:arm64+0x100017a5c)
    34        NEW_FUNC[2/11]: 0x0001025a8070 in std::__1::vector<unsigned char, 
    

    Expected behaviour

    To run the fuzz tests without any error and relevant log output.

    Steps to reproduce

    0git clone https://github.com/bitcoin-core/qa-assets
    1cmake --preset=libfuzzer \
    2   -DCMAKE_C_COMPILER="$(brew --prefix llvm)/bin/clang" \
    3   -DCMAKE_CXX_COMPILER="$(brew --prefix llvm)/bin/clang++" \
    4   -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld"
    5
    6cmake --build build_fuzz -j$(sysctl -n hw.ncpu)
    7FUZZ=process_message build_fuzz/bin/fuzz qa-assets/fuzz_corpora/process_message/      
    

    Relevant log output

    NA

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    master @83a9e55ae1

    Operating system and version

    MacOS 15.3.1

    Machine specifications

    No response

  2. Prabhat1308 commented at 9:08 am on March 18, 2025: contributor

    I tried running with the

    0ASAN_OPTIONS=detect_container_overflow=0 FUZZ=process_message build_fuzz/bin/fuzz qa-assets/fuzz_corpora/process_message/
    

    It crashes with the following log

     0INFO: Running with entropic power schedule (0xFF, 100).
     1INFO: Seed: 917199606
     2INFO: Loaded 1 modules   (1252320 inline 8-bit counters): 1252320 [0x109024000, 0x109155be0), 
     3INFO: Loaded 1 PC tables (1252320 PCs): 1252320 [0x109155be0,0x10a4719e0), 
     4INFO:     4126 files found in qa-assets/fuzz_corpora/process_message/
     5INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 981836 bytes
     6INFO: seed corpus: files: 4126 min: 1b max: 981836b total: 141648651b rss: 195Mb
     7libc++abi: terminating due to uncaught exception of type std::__1::ios_base::failure: DataStream::read(): end of data: unspecified iostream_category error
     8==36931== ERROR: libFuzzer: deadly signal
     9    [#0](/bitcoin-bitcoin/0/) 0x00010c34d248 in __sanitizer_print_stack_trace+0x28 (libclang_rt.asan_osx_dynamic.dylib:arm64+0x5d248)
    10    [#1](/bitcoin-bitcoin/1/) 0x00010861d0a4 in fuzzer::PrintStackTrace()+0x2c (fuzz:arm64+0x1037950a4)
    11    [#2](/bitcoin-bitcoin/2/) 0x000108610a58 in fuzzer::Fuzzer::CrashCallback()+0x54 (fuzz:arm64+0x103788a58)
    12    [#3](/bitcoin-bitcoin/3/) 0x00018d226de0 in _sigtramp+0x34 (libsystem_platform.dylib:arm64+0x3de0)
    13    [#4](/bitcoin-bitcoin/4/) 0x9e2380018d1eff6c  (<unknown module>)
    14    [#5](/bitcoin-bitcoin/5/) 0xc23900018d0fc904  (<unknown module>)
    15    [#6](/bitcoin-bitcoin/6/) 0x493e80018d1a6448  (<unknown module>)
    16    [#7](/bitcoin-bitcoin/7/) 0x166a80018d194a20  (<unknown module>)
    17    [#8](/bitcoin-bitcoin/8/) 0xfc5480018ce3d3f0  (<unknown module>)
    18    [#9](/bitcoin-bitcoin/9/) 0x135b80018d1a570c  (<unknown module>)
    19    [#10](/bitcoin-bitcoin/10/) 0xd05000018d1a8cd8  (<unknown module>)
    20    [#11](/bitcoin-bitcoin/11/) 0x633f80018d1a8c80  (<unknown module>)
    21    [#12](/bitcoin-bitcoin/12/) 0x9a7e0001050aac24  (<unknown module>)
    22    [#13](/bitcoin-bitcoin/13/) 0x0001050bf008 in unsigned long long ReadCompactSize<DataStream>(DataStream&, bool)+0x110 (fuzz:arm64+0x100237008)
    23    [#14](/bitcoin-bitcoin/14/) 0x000107720fbc in void VectorFormatter<DefaultFormatter>::Unser<DataStream, std::__1::vector<CInv, std::__1::allocator<CInv>>>(DataStream&, std::__1::vector<CInv, std::__1::allocator<CInv>>&)+0x1e8 (fuzz:arm64+0x102898fbc)
    24    [#15](/bitcoin-bitcoin/15/) 0x000107652d3c in (anonymous namespace)::PeerManagerImpl::ProcessMessage(CNode&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, DataStream&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000l>>, std::__1::atomic<bool> const&)+0x3cb4 (fuzz:arm64+0x1027cad3c)
    25    [#16](/bitcoin-bitcoin/16/) 0x00010767f794 in (anonymous namespace)::PeerManagerImpl::ProcessMessages(CNode*, std::__1::atomic<bool>&)+0x24b0 (fuzz:arm64+0x1027f7794)
    26    [#17](/bitcoin-bitcoin/17/) 0x000105647fa0 in process_message_fuzz_target(std::__1::span<unsigned char const, 18446744073709551615ul>)+0xaf8 (fuzz:arm64+0x1007bffa0)
    27    [#18](/bitcoin-bitcoin/18/) 0x000105b366ec in LLVMFuzzerTestOneInput+0x198 (fuzz:arm64+0x100cae6ec)
    28    [#19](/bitcoin-bitcoin/19/) 0x000108612004 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long)+0x12c (fuzz:arm64+0x10378a004)
    29    [#20](/bitcoin-bitcoin/20/) 0x000108611884 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*)+0x3c (fuzz:arm64+0x103789884)
    30    [#21](/bitcoin-bitcoin/21/) 0x0001086133c4 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__1::vector<fuzzer::SizedFile, std::__1::allocator<fuzzer::SizedFile>>&)+0x470 (fuzz:arm64+0x10378b3c4)
    31    [#22](/bitcoin-bitcoin/22/) 0x0001086137fc in fuzzer::Fuzzer::Loop(std::__1::vector<fuzzer::SizedFile, std::__1::allocator<fuzzer::SizedFile>>&)+0x98 (fuzz:arm64+0x10378b7fc)
    32    [#23](/bitcoin-bitcoin/23/) 0x00010860a1b4 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long))+0x1dd0 (fuzz:arm64+0x1037821b4)
    33    [#24](/bitcoin-bitcoin/24/) 0x00010861daa8 in main+0x24 (fuzz:arm64+0x103795aa8)
    34    [#25](/bitcoin-bitcoin/25/) 0x00018ce70270  (<unknown module>)
    35    [#26](/bitcoin-bitcoin/26/) 0x475cfffffffffffc  (<unknown module>)
    36
    37NOTE: libFuzzer has rudimentary signal handlers.
    38      Combine libFuzzer with AddressSanitizer or similar for better crash reports.
    39SUMMARY: libFuzzer: deadly signal
    40MS: 0 ; base unit: 0000000000000000000000000000000000000000
    410x67,0x65,0x74,0x64,0x61,0x74,0x61,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x91,0x28,0x67,0x1,0x5c,0x9,0x5c,0x78,0x1,0x0,0x5e,0x78,0xc0,0x87,0x27,0xd8,0x9c,0xff,0xff,0xff,0xff,0x0,0xff,0xff,0x0,0x47,0x8b,0x0,0x82,0x7d,0x8b,0x7d,0x82,0x7d,0x82,0x1,0x0,0x0,0x0,0xa1,0x7d,0x82,0x7d,0xff,0xff,0xe9,0x7d,0x0,0x8b,0x8b,0x0,0x82,0xff,0xff,0x7d,0x7e,0x7d,0x82,0x1,0x0,0x0,0x0,0x73,0x65,0x6e,0x64,0x61,0x64,0x64,0x1c,0x0,0xb5,
    42getdata\000\000\000\000\000\000\200\221(g\001\\\011\\x\001\000^x\300\207'\330\234\377\377\377\377\000\377\377\000G\213\000\202}\213}\202}\202\001\000\000\000\241}\202}\377\377\351}\000\213\213\000\202\377\377}~}\202\001\000\000\000sendadd\034\000\265
    43artifact_prefix='./'; Test unit written to ./crash-88926609e7277110e77b9c19c108b9df4835d6e7
    44Base64: Z2V0ZGF0YQAAAAAAAICRKGcBXAlceAEAXnjAhyfYnP////8A//8AR4sAgn2LfYJ9ggEAAAChfYJ9///pfQCLiwCC//99fn2CAQAAAHNlbmRhZGQcALU=
    

    however this seems to be specific to process_message target only . when I run it with tx_package_eval this works fine.

    0ASAN_OPTIONS=detect_container_overflow=0 FUZZ=tx_package_eval build_fuzz/bin/fuzz  qa-assets/fuzz_corpora/tx_package_eval 
    
    0INFO: Running with entropic power schedule (0xFF, 100).
    1INFO: Seed: 1122799189
    2INFO: Loaded 1 modules   (1252320 inline 8-bit counters): 1252320 [0x106cdc000, 0x106e0dbe0), 
    3INFO: Loaded 1 PC tables (1252320 PCs): 1252320 [0x106e0dbe0,0x1081299e0), 
    4INFO:     2435 files found in qa-assets/fuzz_corpora/tx_package_eval
    5INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 999203 bytes
    6INFO: seed corpus: files: 2435 min: 1b max: 999203b total: 112736936b rss: 192Mb
    7[#1024](/bitcoin-bitcoin/1024/)   pulse  cov: 12171 ft: 64557 corp: 629/83Kb exec/s: 256 rss: 286Mb
    
  3. brunoerg commented at 1:03 pm on March 18, 2025: contributor

    I could reproduce it following the same steps on MacOS 14.3

     0FUZZ=process_message build_fuzz/bin/fuzz qa-assets/fuzz_corpora/process_message/
     1fuzz(56832,0x1e31a5c40) malloc: nano zone abandoned due to inability to reserve vm space.
     2INFO: Running with entropic power schedule (0xFF, 100).
     3INFO: Seed: 2192399851
     4INFO: Loaded 1 modules   (1252322 inline 8-bit counters): 1252322 [0x104c38000, 0x104d69be2),
     5INFO: Loaded 1 PC tables (1252322 PCs): 1252322 [0x104d69be8,0x106085a08),
     6=================================================================
     7==56832==ERROR: AddressSanitizer: container-overflow on address 0x60800002ca68 at pc 0x000100adcef4 bp 0x00016f36aa20 sp 0x00016f36aa18
     8WRITE of size 8 at 0x60800002ca68 thread T0
     9    [#0](/bitcoin-bitcoin/0/) 0x000100adcef0 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::__init_copy_ctor_external(char const*, unsigned long)+0x1c4 (fuzz:arm64+0x100048ef0)
    10    [#1](/bitcoin-bitcoin/1/) 0x00010421b5bc in fuzzer::ListFilesInDirRecursive(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, long*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>*, bool)+0x26c (fuzz:arm64+0x1037875bc)
    11    [#2](/bitcoin-bitcoin/2/) 0x00010421a884 in fuzzer::GetSizedFilesFromDir(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<fuzzer::SizedFile, std::__1::allocator<fuzzer::SizedFile>>*)+0x2c (fuzz:arm64+0x103786884)
    12    [#3](/bitcoin-bitcoin/3/) 0x0001042163fc in fuzzer::ReadCorpora(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&)+0x4c (fuzz:arm64+0x1037823fc)
    13    [#4](/bitcoin-bitcoin/4/) 0x000104216264 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long))+0x1dbc (fuzz:arm64+0x103782264)
    14    [#5](/bitcoin-bitcoin/5/) 0x000104229b6c in main+0x24 (fuzz:arm64+0x103795b6c)
    15    [#6](/bitcoin-bitcoin/6/) 0x00018c5590dc  (<unknown module>)
    16    [#7](/bitcoin-bitcoin/7/) 0x9f697ffffffffffc  (<unknown module>)
    

    For reference: https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow#false-positives

  4. maflcko added the label macOS on Mar 18, 2025
  5. maflcko added the label Tests on Mar 18, 2025
  6. maflcko added the label Upstream on Mar 18, 2025
  7. maflcko commented at 1:08 pm on March 18, 2025: member
    I presume the libfuzzer-nosan preset works fine?
  8. Prabhat1308 commented at 1:16 pm on March 18, 2025: contributor

    I presume the libfuzzer-nosan preset works fine?

    Works fine. I do get these warning though on the start of the run .

    0WARNING: Failed to find function "__sanitizer_acquire_crash_state". Reason dlsym(RTLD_DEFAULT, __sanitizer_acquire_crash_state): symbol not found.
    1WARNING: Failed to find function "__sanitizer_print_stack_trace". Reason dlsym(RTLD_DEFAULT, __sanitizer_print_stack_trace): symbol not found.
    2WARNING: Failed to find function "__sanitizer_set_death_callback". Reason dlsym(RTLD_DEFAULT, __sanitizer_set_death_callback): symbol not found.
    
  9. brunoerg commented at 10:51 pm on March 18, 2025: contributor
    Worth adding this “false positive” information to the documentation?
  10. maflcko commented at 7:35 pm on March 19, 2025: member

    libc++abi: terminating due to uncaught exception of type std::__1::ios_base::failure: DataStream::read(): end of data: unspecified iostream_category error

    This looks like an upstream packaging bug or asan bug on your platform, given that it passes fine when asan is disabled on your platform.

  11. maflcko commented at 7:24 am on March 27, 2025: member

    Does the issue happen with all clang versions from brew? (clang-16 to clang-20)?

    Does the issue happen when compiling clang from source?

  12. Prabhat1308 commented at 10:10 am on March 27, 2025: contributor

    I suspect this issue is because of the -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" flag.

    Other than my default llvm19 , I used llvm@18 downloaded via brew which comes with clang 18 I used 2 different configs

    0make --preset=libfuzzer \                                                                                                       
    1    -DCMAKE_C_COMPILER="$(brew --prefix llvm@18)/bin/clang" \
    2    -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@18)/bin/clang++" \
    3    -DAPPEND_LDFLAGS="-Wl,-no_warn_duplicate_libraries" \
    4    -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS"
    
     0
     1/opt/homebrew/opt/llvm@18/bin/../include/c++/v1/variant:495:12: runtime error: call to function decltype(auto) std::__1::__variant_detail::__visitation::__base::__dispatcher<0ul, 0ul>::__dispatch[abi:ne180100]<void std::__1::__variant_detail::__ctor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>>::__generic_construct[abi:ne180100]<std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>>(std::__1::__variant_detail::__ctor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>>&, std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>&&)::'lambda'(std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>&, auto&&)&&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&&>(std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&&) through pointer to incorrect function type 'void (*)((lambda at /opt/homebrew/opt/llvm@18/bin/../include/c++/v1/variant:814:11) &&, std::__variant_detail::__base<std::__variant_detail::_Trait::_Available, RPCArg::Optional, std::string, UniValue> &, std::__variant_detail::__base<std::__variant_detail::_Trait::_Available, RPCArg::Optional, std::string, UniValue> &&)'
     2variant:532: note: decltype(auto) std::__1::__variant_detail::__visitation::__base::__dispatcher<0ul, 0ul>::__dispatch[abi:ne180100]<void std::__1::__variant_detail::__ctor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>>::__generic_construct[abi:ne180100]<std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>>(std::__1::__variant_detail::__ctor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>>&, std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>&&)::'lambda'(std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>&, auto&&)&&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&&>(std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&&) defined here
     3SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /opt/homebrew/opt/llvm@18/bin/../include/c++/v1/variant:495:12 
     4/Users/prabhatverma/projects/bitcoin/src/rpc/server.h:100:15: runtime error: call to function getblockchaininfo() through pointer to incorrect function type 'RPCHelpMan (*)()'
     5blockchain.cpp:1291: note: getblockchaininfo() defined here
     6SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/prabhatverma/projects/bitcoin/src/rpc/server.h:100:15 
     7/Users/prabhatverma/projects/bitcoin/src/rpc/server.h:102:15: runtime error: call to function getblockchaininfo() through pointer to incorrect function type 'RPCHelpMan (*)()'
     8blockchain.cpp:1291: note: getblockchaininfo() defined here
     9SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/prabhatverma/projects/bitcoin/src/rpc/server.h:102:15 
    10/Users/prabhatverma/projects/bitcoin/src/tinyformat.h:544:13: runtime error: call to function void tinyformat::detail::FormatArg::formatImpl<char [13]>(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, char const*, char const*, int, void const*) through pointer to incorrect function type 'void (*)(std::ostream &, const char *, const char *, int, const void *)'
    11tinyformat.h:558: note: void tinyformat::detail::FormatArg::formatImpl<char [13]>(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, char const*, char const*, int, void const*) defined here
    12SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/prabhatverma/projects/bitcoin/src/tinyformat.h:544:13 
    13INFO: Running with entropic power schedule (0xFF, 100).
    14INFO: Seed: 1206976568
    15INFO: Loaded 1 modules   (1257184 inline 8-bit counters): 1257184 [0x103ed4a48, 0x104007928), 
    16INFO: Loaded 1 PC tables (1257184 PCs): 1257184 [0x104007928,0x105336728), 
    17INFO:     4374 files found in qa-assets/fuzz_corpora/process_message/
    18INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 981836 bytes
    19INFO: seed corpus: files: 4374 min: 1b max: 981836b total: 152590538b rss: 195Mb
    20[#2048](/bitcoin-bitcoin/2048/)   pulse  cov: 14987 ft: 33197 corp: 969/143Kb exec/s: 1024 rss: 435Mb
    21[#4096](/bitcoin-bitcoin/4096/)   pulse  cov: 17387 ft: 57266 corp: 1814/795Kb exec/s: 1024 rss: 435Mb
    22^C==35105== libFuzzer: run interrupted; exiting
    

    This is what the initial response was before this PR where the exe flag was added .

    Using the new config with llvm@18

    0cmake --preset=libfuzzer \
    1    -DCMAKE_C_COMPILER="$(brew --prefix llvm@18)/bin/clang" \
    2    -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@18)/bin/clang++" \
    3    -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld"
    
     0
     1/opt/homebrew/opt/llvm@18/bin/../include/c++/v1/variant:495:12: runtime error: call to function decltype(auto) std::__1::__variant_detail::__visitation::__base::__dispatcher<0ul, 0ul>::__dispatch[abi:ne180100]<void std::__1::__variant_detail::__ctor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>>::__generic_construct[abi:ne180100]<std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>>(std::__1::__variant_detail::__ctor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>>&, std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>&&)::'lambda'(std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>&, auto&&)&&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&&>(std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&&) through pointer to incorrect function type 'void (*)((lambda at /opt/homebrew/opt/llvm@18/bin/../include/c++/v1/variant:814:11) &&, std::__variant_detail::__base<std::__variant_detail::_Trait::_Available, RPCArg::Optional, std::string, UniValue> &, std::__variant_detail::__base<std::__variant_detail::_Trait::_Available, RPCArg::Optional, std::string, UniValue> &&)'
     2(fuzz:arm64+0x101536194): note: decltype(auto) std::__1::__variant_detail::__visitation::__base::__dispatcher<0ul, 0ul>::__dispatch[abi:ne180100]<void std::__1::__variant_detail::__ctor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>>::__generic_construct[abi:ne180100]<std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>>(std::__1::__variant_detail::__ctor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>>&, std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>&&)::'lambda'(std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>&, auto&&)&&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&&>(std::__1::__variant_detail::__move_constructor<std::__1::__variant_detail::__traits<RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>, (std::__1::__variant_detail::_Trait)1>, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&, std::__1::__variant_detail::__base<(std::__1::__variant_detail::_Trait)1, RPCArg::Optional, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, UniValue>&&) defined here
     3SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /opt/homebrew/opt/llvm@18/bin/../include/c++/v1/variant:495:12 
     4/Users/prabhatverma/projects/bitcoin/src/rpc/server.h:100:15: runtime error: call to function getblockchaininfo() through pointer to incorrect function type 'RPCHelpMan (*)()'
     5(fuzz:arm64+0x1020d8d8c): note: getblockchaininfo() defined here
     6SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/prabhatverma/projects/bitcoin/src/rpc/server.h:100:15 
     7/Users/prabhatverma/projects/bitcoin/src/rpc/server.h:102:15: runtime error: call to function getblockchaininfo() through pointer to incorrect function type 'RPCHelpMan (*)()'
     8(fuzz:arm64+0x1020d8d8c): note: getblockchaininfo() defined here
     9SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/prabhatverma/projects/bitcoin/src/rpc/server.h:102:15 
    10/Users/prabhatverma/projects/bitcoin/src/tinyformat.h:544:13: runtime error: call to function void tinyformat::detail::FormatArg::formatImpl<char [13]>(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, char const*, char const*, int, void const*) through pointer to incorrect function type 'void (*)(std::ostream &, const char *, const char *, int, const void *)'
    11(fuzz:arm64+0x100b9c7cc): note: void tinyformat::detail::FormatArg::formatImpl<char [13]>(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, char const*, char const*, int, void const*) defined here
    12SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/prabhatverma/projects/bitcoin/src/tinyformat.h:544:13 
    13INFO: Running with entropic power schedule (0xFF, 100).
    14INFO: Seed: 1461236862
    15INFO: Loaded 1 modules   (1257184 inline 8-bit counters): 1257184 [0x107780000, 0x1078b2ee0), 
    16INFO: Loaded 1 PC tables (1257184 PCs): 1257184 [0x1078b2ee0,0x108be1ce0), 
    17=================================================================
    18==41097==ERROR: AddressSanitizer: container-overflow on address 0x60800002c268 at pc 0x000104784be4 bp 0x00016b6c2710 sp 0x00016b6c2708
    19WRITE of size 8 at 0x60800002c268 thread T0
    20    [#0](/bitcoin-bitcoin/0/) 0x104784be0 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::__init_copy_ctor_external(char const*, unsigned long)+0x2b4 (fuzz:arm64+0x100048be0)
    21    [#1](/bitcoin-bitcoin/1/) 0x106ed8d2c in fuzzer::ListFilesInDirRecursive(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, long*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>*, bool)+0x21c (fuzz:arm64+0x10279cd2c)
    22    [#2](/bitcoin-bitcoin/2/) 0x106ed80dc in fuzzer::GetSizedFilesFromDir(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<fuzzer::SizedFile, std::__1::allocator<fuzzer::SizedFile>>*)+0x2c (fuzz:arm64+0x10279c0dc)
    23    [#3](/bitcoin-bitcoin/3/) 0x106ed3848 in fuzzer::ReadCorpora(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&)+0x4c (fuzz:arm64+0x102797848)
    24    [#4](/bitcoin-bitcoin/4/) 0x106ed36b0 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long))+0x1c80 (fuzz:arm64+0x1027976b0)
    25    [#5](/bitcoin-bitcoin/5/) 0x106ee7848 in main+0x24 (fuzz:arm64+0x1027ab848)
    26    [#6](/bitcoin-bitcoin/6/) 0x18ce70270  (<unknown module>)
    27    [#7](/bitcoin-bitcoin/7/) 0x1a2c7ffffffffffc  (<unknown module>)
    28
    290x60800002c268 is located 72 bytes inside of 96-byte region [0x60800002c220,0x60800002c280)
    30allocated by thread T0 here:
    31    [#0](/bitcoin-bitcoin/0/) 0x10a7ececc in _Znwm+0x6c (libclang_rt.asan_osx_dynamic.dylib:arm64+0x60ecc)
    32    [#1](/bitcoin-bitcoin/1/) 0x104cad68c in std::__1::__split_buffer<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>&)+0xf0 (fuzz:arm64+0x10057168c)
    33    [#2](/bitcoin-bitcoin/2/) 0x104f26814 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>* std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>::__push_back_slow_path<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)+0x230 (fuzz:arm64+0x1007ea814)
    34    [#3](/bitcoin-bitcoin/3/) 0x106ed8cb8 in fuzzer::ListFilesInDirRecursive(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, long*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>*, bool)+0x1a8 (fuzz:arm64+0x10279ccb8)
    35    [#4](/bitcoin-bitcoin/4/) 0x106ed80dc in fuzzer::GetSizedFilesFromDir(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<fuzzer::SizedFile, std::__1::allocator<fuzzer::SizedFile>>*)+0x2c (fuzz:arm64+0x10279c0dc)
    36    [#5](/bitcoin-bitcoin/5/) 0x106ed3848 in fuzzer::ReadCorpora(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&)+0x4c (fuzz:arm64+0x102797848)
    37    [#6](/bitcoin-bitcoin/6/) 0x106ed36b0 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long))+0x1c80 (fuzz:arm64+0x1027976b0)
    38    [#7](/bitcoin-bitcoin/7/) 0x106ee7848 in main+0x24 (fuzz:arm64+0x1027ab848)
    39    [#8](/bitcoin-bitcoin/8/) 0x18ce70270  (<unknown module>)
    40    [#9](/bitcoin-bitcoin/9/) 0x1a2c7ffffffffffc  (<unknown module>)
    41
    42HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_container_overflow=0.
    43If you suspect a false positive see also: https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow.
    44SUMMARY: AddressSanitizer: container-overflow (fuzz:arm64+0x100048be0) in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::__init_copy_ctor_external(char const*, unsigned long)+0x2b4
    45Shadow bytes around the buggy address:
    46  0x60800002bf80: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fd
    47  0x60800002c000: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 fa
    48  0x60800002c080: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fd
    49  0x60800002c100: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 fa
    50  0x60800002c180: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fd fd
    51=>0x60800002c200: fa fa fa fa 00 00 00 00 00 00 00 00 00[fc]fc fc
    52  0x60800002c280: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 fa
    53  0x60800002c300: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00
    54  0x60800002c380: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 fa
    55  0x60800002c400: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
    56  0x60800002c480: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
    57Shadow byte legend (one shadow byte represents 8 application bytes):
    58  Addressable:           00
    59  Partially addressable: 01 02 03 04 05 06 07 
    60  Heap left redzone:       fa
    61  Freed heap region:       fd
    62  Stack left redzone:      f1
    63  Stack mid redzone:       f2
    64  Stack right redzone:     f3
    65  Stack after return:      f5
    66  Stack use after scope:   f8
    67  Global redzone:          f9
    68  Global init order:       f6
    69  Poisoned by user:        f7
    70  Container overflow:      fc
    71  Array cookie:            ac
    72  Intra object redzone:    bb
    73  ASan internal:           fe
    74  Left alloca redzone:     ca
    75  Right alloca redzone:    cb
    76==41097==ABORTING
    77[2]    41097 abort      FUZZ=process_message build_fuzz/bin/fuzz 
    

    Although not completely sure if this is the right config since runtime errors still appears but the bug is introduced in llvm18 also because of this.

    Can reproduce this with llvm16 too using

    0cmake --preset=libfuzzer \                                                                                                 
    1    -DCMAKE_C_COMPILER="$(brew --prefix llvm@16)/bin/clang" \
    2    -DCMAKE_CXX_COMPILER="$(brew --prefix llvm@16)/bin/clang++" \
    3    -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld"
    
  13. Crypt-iQ commented at 5:18 pm on April 2, 2025: contributor

    I was able to run the fuzz tests with sanitizers + corpus on macOS 15.4 with the following:

    0cmake -B build -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DBUILD_FOR_FUZZING=ON -DSANITIZERS="undefined,address,fuzzer"
    1cmake --build build -j8
    2FUZZ=process_message build/bin/fuzz process-message-corpus
    

    I did get some ubsan errors before it started fuzzing, but then it worked smoothly after that. My clang is aliased to brew-installed clang and I didn’t need to use -fuse-ld=lld.

  14. Prabhat1308 commented at 5:34 pm on April 2, 2025: contributor

    I was able to run the fuzz tests with sanitizers + corpus on macOS 15.4 with the following:

    cmake -B build -DCMAKE_C_COMPILER=“clang” -DCMAKE_CXX_COMPILER=“clang++” -DBUILD_FOR_FUZZING=ON -DSANITIZERS=“undefined,address,fuzzer” cmake –build build -j8 FUZZ=process_message build/bin/fuzz process-message-corpus I did get some ubsan errors before it started fuzzing, but then it worked smoothly after that. My clang is aliased to brew-installed clang and I didn’t need to use -fuse-ld=lld.

    I am running on macOS with 15.3.1 and running your command I get linker error while building. Can you share more about your clang versions and other dependencies ?

  15. Crypt-iQ commented at 5:55 pm on April 2, 2025: contributor

    I am running on macOS with 15.3.1 and running your command I get linker error while building. Can you share more about your clang versions and other dependencies ?

    I’m using clang 18.1.8, what linker errors are you getting?

      0eugenesiegel@Eugenes-MacBook-Air-2 bitcoin % cmake -B build -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DBUILD_FOR_FUZZING=ON -DSANITIZERS="undefined,address,fuzzer"
      1CMake Warning at CMakeLists.txt:216 (message):
      2  BUILD_FOR_FUZZING=ON will disable all other targets and force
      3  BUILD_FUZZ_BINARY=ON.
      4
      5
      6-- Performing Test CXX_SUPPORTS__FSANITIZE_UNDEFINED_ADDRESS_FUZZER_NO_LINK
      7-- Performing Test CXX_SUPPORTS__FSANITIZE_UNDEFINED_ADDRESS_FUZZER_NO_LINK - Success
      8-- Performing Test LINKER_SUPPORTS__FSANITIZE_UNDEFINED_ADDRESS_FUZZER_NO_LINK_6231
      9-- Performing Test LINKER_SUPPORTS__FSANITIZE_UNDEFINED_ADDRESS_FUZZER_NO_LINK_6231 - Success
     10-- Could NOT find Python3 (missing: Python3_EXECUTABLE Interpreter) (Required is at least version "3.10")
     11    Reason given by package: 
     12        Interpreter: Wrong version for the interpreter "/usr/bin/python3"
     13
     14-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE dot) 
     15
     16Configuring secp256k1 subtree...
     17-- Could NOT find Valgrind (missing: Valgrind_INCLUDE_DIR Valgrind_WORKS) 
     18
     19
     20secp256k1 configure summary
     21===========================
     22Build artifacts:
     23  library type ........................ Static
     24Optional modules:
     25  ECDH ................................ OFF
     26  ECDSA pubkey recovery ............... ON
     27  extrakeys ........................... ON
     28  schnorrsig .......................... ON
     29  musig ............................... OFF
     30  ElligatorSwift ...................... ON
     31Parameters:
     32  ecmult window size .................. 15
     33  ecmult gen table size ............... 86 KiB
     34Optional features:
     35  assembly ............................ OFF
     36  external callbacks .................. OFF
     37Optional binaries:
     38  benchmark ........................... OFF
     39  noverify_tests ...................... OFF
     40  tests ............................... OFF
     41  exhaustive tests .................... OFF
     42  ctime_tests ......................... OFF
     43  examples ............................ OFF
     44
     45Cross compiling ....................... FALSE
     46Valgrind .............................. OFF
     47Preprocessor defined macros ........... ENABLE_MODULE_ELLSWIFT=1 ENABLE_MODULE_SCHNORRSIG=1 ENABLE_MODULE_EXTRAKEYS=1 ENABLE_MODULE_RECOVERY=1 ECMULT_WINDOW_SIZE=15 COMB_BLOCKS=43 COMB_TEETH=6
     48C compiler ............................ Clang 18.1.8, /opt/homebrew/Cellar/llvm@18/18.1.8/bin/clang
     49CFLAGS ................................ 
     50Compile options ....................... -pedantic -Wall -Wcast-align -Wconditional-uninitialized -Wextra -Wnested-externs -Wno-long-long -Wno-overlength-strings -Wno-unused-function -Wreserved-identifier -Wshadow -Wstrict-prototypes -Wundef
     51Build type:
     52 - CMAKE_BUILD_TYPE ................... RelWithDebInfo
     53 - CFLAGS ............................. -O2 -g 
     54 - LDFLAGS for executables ............ 
     55 - LDFLAGS for shared libraries ....... 
     56SECP256K1_APPEND_CFLAGS ............... -fsanitize=undefined,address,fuzzer-no-link
     57SECP256K1_APPEND_LDFLAGS .............. -fsanitize=undefined,address,fuzzer-no-link
     58
     59
     60
     61Configure summary
     62=================
     63Executables:
     64  bitcoind ............................ OFF
     65  bitcoin-node (multiprocess) ......... OFF
     66  bitcoin-qt (GUI) .................... OFF
     67  bitcoin-gui (GUI, multiprocess) ..... OFF
     68  bitcoin-cli ......................... OFF
     69  bitcoin-tx .......................... OFF
     70  bitcoin-util ........................ OFF
     71  bitcoin-wallet ...................... OFF
     72  bitcoin-chainstate (experimental) ... OFF
     73  libbitcoinkernel (experimental) ..... OFF
     74Optional features:
     75  wallet support ...................... ON
     76   - legacy wallets (Berkeley DB) ..... OFF
     77  external signer ..................... OFF
     78  ZeroMQ .............................. OFF
     79  USDT tracing ........................ OFF
     80  QR code (GUI) ....................... OFF
     81  DBus (GUI, Linux only) .............. OFF
     82Tests:
     83  test_bitcoin ........................ OFF
     84  test_bitcoin-qt ..................... OFF
     85  bench_bitcoin ....................... OFF
     86  fuzz binary ......................... ON
     87
     88Cross compiling ....................... FALSE
     89C++ compiler .......................... Clang 18.1.8, /opt/homebrew/Cellar/llvm@18/18.1.8/bin/clang++
     90CMAKE_BUILD_TYPE ...................... RelWithDebInfo
     91Preprocessor defined macros ........... FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION OBJC_OLD_DISPATCH_PROTOTYPES=0
     92C++ compiler flags .................... -O2 -g -std=c++20 -fPIC -fdebug-prefix-map=/Users/eugenesiegel/btc/bitcoin/src=. -fmacro-prefix-map=/Users/eugenesiegel/btc/bitcoin/src=. -fsanitize=undefined,address,fuzzer-no-link -Wall -Wextra -Wgnu -Wformat -Wformat-security -Wvla -Wshadow-field -Wthread-safety -Wloop-analysis -Wredundant-decls -Wunused-member-function -Wdate-time -Wconditional-uninitialized -Woverloaded-virtual -Wsuggest-override -Wimplicit-fallthrough -Wunreachable-code -Wdocumentation -Wself-assign -Wundef -Wno-unused-parameter -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -Wstack-protector -fstack-protector-all -mbranch-protection=bti
     93Linker flags .......................... -O2 -g -Wl,-dead_strip -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -fsanitize=undefined,address,fuzzer-no-link -fstack-protector-all -Wl,-fixup_chains -fPIE -Xlinker -pie
     94
     95NOTE: The summary above may not exactly match the final applied build flags
     96      if any additional CMAKE_* or environment variables have been modified.
     97      To see the exact flags applied, build with the --verbose option.
     98
     99Attempt to harden executables ......... ON
    100Treat compiler warnings as errors ..... OFF
    101Use ccache for compiling .............. OFF
    102
    103
    104  ******
    105
    106CMake Warning at CMakeLists.txt:702 (message):
    107  Minimum required Python not found.  Utils and rpcauth tests are disabled.
    108
    109
    110  ******
    111
    112-- Configuring done (0.6s)
    113-- Generating done (0.1s)
    114-- Build files have been written to: /Users/eugenesiegel/btc/bitcoin/build
    
  16. Prabhat1308 commented at 6:02 pm on April 2, 2025: contributor

    I am running on macOS with 15.3.1 and running your command I get linker error while building. Can you share more about your clang versions and other dependencies ?

    I’m using clang 18.1.8, what linker errors are you getting?

    Output of the cmake -B build step

    The error is when I run cmake --build build -j$(sysctl -n hw.ncpu)

     0[  0%] Building CXX object src/crypto/CMakeFiles/bitcoin_crypto.dir/aes.cpp.o
     1...
     2...
     3...
     4[100%] Linking CXX executable ../../../bin/fuzz
     5ld: warning: ignoring duplicate libraries: '-lc++', '../../../lib/libbitcoin_common.a', '../../../lib/libbitcoin_util.a', '../../libleveldb.a', '../../libminisketch.a', '../../secp256k1/lib/libsecp256k1.a', '../../univalue/libunivalue.a'
     6ld: multiple errors: invalid r_symbolnum=1 in '/Users/prabhatverma/projects/bitcoin/build/src/test/fuzz/CMakeFiles/fuzz.dir/overflow.cpp.o'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_cli.a[2](stdin.cpp.o)'; invalid r_symbolnum=1 in '../../libcrc32c.a[4](crc32c_arm64.cc.o)'; invalid r_symbolnum=1 in '../../libcrc32c.a[3](crc32c_portable.cc.o)'; invalid r_symbolnum=1 in '../../libcrc32c.a[2](crc32c.cc.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_consensus.a[11](script_error.cpp.o)'; invalid r_symbolnum=18 in '../../../lib/libbitcoin_crypto.a[19](sha256_arm_shani.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_crypto.a[15](sha3.cpp.o)'; invalid r_symbolnum=1 in '../../libleveldb.a[37](logging.cc.o)'; invalid r_symbolnum=1 in '../../libleveldb.a[35](hash.cc.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_crypto.a[10](poly1305.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_crypto.a[5](hex_base.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_util.a[29](randomenv.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libtest_util.a[13](str.cpp.o)'; invalid r_symbolnum=1 in '../../libleveldb.a[31](crc32c.cc.o)'; invalid r_symbolnum=1 in '../../libleveldb.a[27](bloom.cc.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_consensus.a[5](hash.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_util.a[27](logging.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_util.a[24](threadnames.cpp.o)'; invalid r_symbolnum=1 in '../../libleveldb.a[8](filename.cc.o)'; invalid r_symbolnum=1 in '../../../lib/libtest_util.a[5](index.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_util.a[16](serfloat.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libtest_util.a[3](coins.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_util.a[15](readwritefile.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_util.a[14](rbf.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_common.a[48](parsing.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_util.a[9](feefrac.cpp.o)'; invalid r_symbolnum=1 in '../../libleveldb.a[2](builder.cc.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_util.a[6](chaintype.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_common.a[43](request.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_common.a[39](pow.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_node.a[85](torcontrol.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_common.a[31](merkleblock.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_common.a[25](deploymentinfo.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_common.a[22](compressor.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_common.a[21](url.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_common.a[17](run_command.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_node.a[64](fees_args.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_node.a[53](peerman_args.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_node.a[50](miner.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_node.a[49](mempool_persist_args.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_node.a[42](database_args.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_node.a[40](connection_types.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_node.a[39](coins_view_args.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_node.a[38](coin.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_node.a[37](chainstatemanager_args.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_node.a[35](caches.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_node.a[33](blockmanager_args.cpp.o)'; invalid r_symbolnum=3 in '../../../lib/libbitcoin_node.a[30](net_processing.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_node.a[27](mempool_removal_reason.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_node.a[22](checks.cpp.o)'; invalid r_symbolnum=1 in '../../../lib/libbitcoin_node.a[21](chain.cpp.o)'
     7clang++: error: linker command failed with exit code 1 (use -v to see invocation)
     8make[2]: *** [bin/fuzz] Error 1
     9make[1]: *** [src/test/fuzz/CMakeFiles/fuzz.dir/all] Error 2
    10make: *** [all] Error 2
    
  17. Crypt-iQ commented at 1:29 pm on April 3, 2025: contributor
    What version of ld are you using?
  18. Prabhat1308 commented at 3:08 pm on April 3, 2025: contributor

    What version of ld are you using?

    16.0.0

  19. Crypt-iQ commented at 3:43 pm on April 3, 2025: contributor

    16.0.0

    This matches my ld – can you share the output of the configure step when running the above command?

  20. Prabhat1308 commented at 3:49 pm on April 3, 2025: contributor

    Running

    0cmake -B build -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DBUILD_FOR_FUZZING=ON -DSANITIZERS="undefined,address,fuzzer"
    
      0
      1-- The CXX compiler identification is Clang 19.1.7
      2-- Detecting CXX compiler ABI info
      3-- Detecting CXX compiler ABI info - done
      4-- Check for working CXX compiler: /opt/homebrew/opt/llvm/bin/clang++ - skipped
      5-- Detecting CXX compile features
      6-- Detecting CXX compile features - done
      7-- Setting build type to "RelWithDebInfo" as none was specified
      8-- Performing Test CXX_SUPPORTS__WERROR
      9-- Performing Test CXX_SUPPORTS__WERROR - Success
     10-- Performing Test CXX_SUPPORTS__G3
     11-- Performing Test CXX_SUPPORTS__G3 - Success
     12-- Performing Test LINKER_SUPPORTS__G3
     13-- Performing Test LINKER_SUPPORTS__G3 - Success
     14-- Performing Test CXX_SUPPORTS__FTRAPV
     15-- Performing Test CXX_SUPPORTS__FTRAPV - Success
     16-- Performing Test LINKER_SUPPORTS__FTRAPV
     17-- Performing Test LINKER_SUPPORTS__FTRAPV - Success
     18-- Found SQLite3: /Library/Developer/CommandLineTools/SDKs/MacOSX15.2.sdk/usr/include (found suitable version "3.43.2", minimum required is "3.7.17")
     19CMake Warning at CMakeLists.txt:216 (message):
     20  BUILD_FOR_FUZZING=ON will disable all other targets and force
     21  BUILD_FUZZ_BINARY=ON.
     22
     23
     24-- Performing Test LINKER_SUPPORTS__WL__FATAL_WARNINGS
     25-- Performing Test LINKER_SUPPORTS__WL__FATAL_WARNINGS - Success
     26-- Performing Test LINKER_SUPPORTS__WL__DEAD_STRIP
     27-- Performing Test LINKER_SUPPORTS__WL__DEAD_STRIP - Success
     28-- Performing Test LINKER_SUPPORTS__WL__DEAD_STRIP_DYLIBS
     29-- Performing Test LINKER_SUPPORTS__WL__DEAD_STRIP_DYLIBS - Success
     30-- Performing Test LINKER_SUPPORTS__WL__HEADERPAD_MAX_INSTALL_NAMES
     31-- Performing Test LINKER_SUPPORTS__WL__HEADERPAD_MAX_INSTALL_NAMES - Success
     32-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
     33-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
     34-- Found Threads: TRUE
     35-- Performing Test CXX_SUPPORTS__FSANITIZE_UNDEFINED_ADDRESS_FUZZER_NO_LINK
     36-- Performing Test CXX_SUPPORTS__FSANITIZE_UNDEFINED_ADDRESS_FUZZER_NO_LINK - Success
     37-- Performing Test LINKER_SUPPORTS__FSANITIZE_UNDEFINED_ADDRESS_FUZZER_NO_LINK_6231
     38-- Performing Test LINKER_SUPPORTS__FSANITIZE_UNDEFINED_ADDRESS_FUZZER_NO_LINK_6231 - Success
     39-- Performing Test FUZZ_BINARY_LINKS_WITHOUT_MAIN_FUNCTION
     40-- Performing Test FUZZ_BINARY_LINKS_WITHOUT_MAIN_FUNCTION - Success
     41-- Found Boost: /opt/homebrew/include (found suitable version "1.87.0", minimum required is "1.73.0")
     42-- Performing Test NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE
     43-- Performing Test NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE - Failed
     44-- Found PkgConfig: /opt/homebrew/bin/pkg-config (found version "2.3.0")
     45-- Found Libevent: /opt/homebrew/Cellar/libevent/2.1.12_1/lib (found suitable version "2.1.12-stable", minimum required is "2.1.8")
     46-- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR
     47-- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR - Failed
     48-- Looking for C++ include sys/prctl.h
     49-- Looking for C++ include sys/prctl.h - not found
     50-- Looking for C++ include sys/resources.h
     51-- Looking for C++ include sys/resources.h - not found
     52-- Looking for C++ include sys/vmmeter.h
     53-- Looking for C++ include sys/vmmeter.h - found
     54-- Looking for C++ include vm/vm_param.h
     55-- Looking for C++ include vm/vm_param.h - not found
     56-- Looking for O_CLOEXEC
     57-- Looking for O_CLOEXEC - found
     58-- Looking for fdatasync
     59-- Looking for fdatasync - not found
     60-- Looking for fork
     61-- Looking for fork - found
     62-- Looking for pipe2
     63-- Looking for pipe2 - not found
     64-- Looking for setsid
     65-- Looking for setsid - found
     66-- Looking for C++ include sys/types.h
     67-- Looking for C++ include sys/types.h - found
     68-- Looking for C++ include ifaddrs.h
     69-- Looking for C++ include ifaddrs.h - found
     70-- Performing Test IFADDR_LINKS_WITHOUT_LIBSOCKET
     71-- Performing Test IFADDR_LINKS_WITHOUT_LIBSOCKET - Success
     72-- Performing Test STD_ATOMIC_LINKS_WITHOUT_LIBATOMIC
     73-- Performing Test STD_ATOMIC_LINKS_WITHOUT_LIBATOMIC - Success
     74-- Looking for std::system
     75-- Looking for std::system - found
     76-- Looking for ::_wsystem
     77-- Looking for ::_wsystem - not found
     78-- Performing Test STRERROR_R_CHAR_P
     79-- Performing Test STRERROR_R_CHAR_P - Failed
     80-- Looking for malloc_info
     81-- Looking for malloc_info - not found
     82-- Performing Test HAVE_MALLOPT_ARENA_MAX
     83-- Performing Test HAVE_MALLOPT_ARENA_MAX - Failed
     84-- Performing Test HAVE_POSIX_FALLOCATE
     85-- Performing Test HAVE_POSIX_FALLOCATE - Failed
     86-- Performing Test HAVE_STRONG_GETAUXVAL
     87-- Performing Test HAVE_STRONG_GETAUXVAL - Failed
     88-- Performing Test HAVE_SOCKADDR_UN
     89-- Performing Test HAVE_SOCKADDR_UN - Success
     90-- Performing Test HAVE_GETRANDOM
     91-- Performing Test HAVE_GETRANDOM - Failed
     92-- Performing Test HAVE_GETENTROPY_RAND
     93-- Performing Test HAVE_GETENTROPY_RAND - Success
     94-- Performing Test HAVE_SYSCTL
     95-- Performing Test HAVE_SYSCTL - Success
     96-- Performing Test HAVE_SYSCTL_ARND
     97-- Performing Test HAVE_SYSCTL_ARND - Failed
     98-- Performing Test HAVE_SSE41
     99-- Performing Test HAVE_SSE41 - Failed
    100-- Performing Test HAVE_AVX2
    101-- Performing Test HAVE_AVX2 - Failed
    102-- Performing Test HAVE_X86_SHANI
    103-- Performing Test HAVE_X86_SHANI - Failed
    104-- Performing Test HAVE_ARM_SHANI
    105-- Performing Test HAVE_ARM_SHANI - Success
    106-- Performing Test CXX_SUPPORTS__WALL
    107-- Performing Test CXX_SUPPORTS__WALL - Success
    108-- Performing Test CXX_SUPPORTS__WEXTRA
    109-- Performing Test CXX_SUPPORTS__WEXTRA - Success
    110-- Performing Test CXX_SUPPORTS__WGNU
    111-- Performing Test CXX_SUPPORTS__WGNU - Success
    112-- Performing Test CXX_SUPPORTS__WFORMAT__WFORMAT_SECURITY
    113-- Performing Test CXX_SUPPORTS__WFORMAT__WFORMAT_SECURITY - Success
    114-- Performing Test CXX_SUPPORTS__WVLA
    115-- Performing Test CXX_SUPPORTS__WVLA - Success
    116-- Performing Test CXX_SUPPORTS__WSHADOW_FIELD
    117-- Performing Test CXX_SUPPORTS__WSHADOW_FIELD - Success
    118-- Performing Test CXX_SUPPORTS__WTHREAD_SAFETY
    119-- Performing Test CXX_SUPPORTS__WTHREAD_SAFETY - Success
    120-- Performing Test CXX_SUPPORTS__WLOOP_ANALYSIS
    121-- Performing Test CXX_SUPPORTS__WLOOP_ANALYSIS - Success
    122-- Performing Test CXX_SUPPORTS__WREDUNDANT_DECLS
    123-- Performing Test CXX_SUPPORTS__WREDUNDANT_DECLS - Success
    124-- Performing Test CXX_SUPPORTS__WUNUSED_MEMBER_FUNCTION
    125-- Performing Test CXX_SUPPORTS__WUNUSED_MEMBER_FUNCTION - Success
    126-- Performing Test CXX_SUPPORTS__WDATE_TIME
    127-- Performing Test CXX_SUPPORTS__WDATE_TIME - Success
    128-- Performing Test CXX_SUPPORTS__WCONDITIONAL_UNINITIALIZED
    129-- Performing Test CXX_SUPPORTS__WCONDITIONAL_UNINITIALIZED - Success
    130-- Performing Test CXX_SUPPORTS__WDUPLICATED_BRANCHES
    131-- Performing Test CXX_SUPPORTS__WDUPLICATED_BRANCHES - Failed
    132-- Performing Test CXX_SUPPORTS__WDUPLICATED_COND
    133-- Performing Test CXX_SUPPORTS__WDUPLICATED_COND - Failed
    134-- Performing Test CXX_SUPPORTS__WLOGICAL_OP
    135-- Performing Test CXX_SUPPORTS__WLOGICAL_OP - Failed
    136-- Performing Test CXX_SUPPORTS__WOVERLOADED_VIRTUAL
    137-- Performing Test CXX_SUPPORTS__WOVERLOADED_VIRTUAL - Success
    138-- Performing Test CXX_SUPPORTS__WSUGGEST_OVERRIDE
    139-- Performing Test CXX_SUPPORTS__WSUGGEST_OVERRIDE - Success
    140-- Performing Test CXX_SUPPORTS__WIMPLICIT_FALLTHROUGH
    141-- Performing Test CXX_SUPPORTS__WIMPLICIT_FALLTHROUGH - Success
    142-- Performing Test CXX_SUPPORTS__WUNREACHABLE_CODE
    143-- Performing Test CXX_SUPPORTS__WUNREACHABLE_CODE - Success
    144-- Performing Test CXX_SUPPORTS__WDOCUMENTATION
    145-- Performing Test CXX_SUPPORTS__WDOCUMENTATION - Success
    146-- Performing Test CXX_SUPPORTS__WSELF_ASSIGN
    147-- Performing Test CXX_SUPPORTS__WSELF_ASSIGN - Success
    148-- Performing Test CXX_SUPPORTS__WBIDI_CHARS_ANY
    149-- Performing Test CXX_SUPPORTS__WBIDI_CHARS_ANY - Failed
    150-- Performing Test CXX_SUPPORTS__WUNDEF
    151-- Performing Test CXX_SUPPORTS__WUNDEF - Success
    152-- Performing Test CXX_SUPPORTS__WUNUSED_PARAMETER
    153-- Performing Test CXX_SUPPORTS__WUNUSED_PARAMETER - Success
    154-- Performing Test CXX_SUPPORTS__FNO_EXTENDED_IDENTIFIERS
    155-- Performing Test CXX_SUPPORTS__FNO_EXTENDED_IDENTIFIERS - Failed
    156-- Performing Test CXX_SUPPORTS__FDEBUG_PREFIX_MAP_A_B
    157-- Performing Test CXX_SUPPORTS__FDEBUG_PREFIX_MAP_A_B - Success
    158-- Performing Test CXX_SUPPORTS__FMACRO_PREFIX_MAP_A_B
    159-- Performing Test CXX_SUPPORTS__FMACRO_PREFIX_MAP_A_B - Success
    160-- Performing Test CXX_SUPPORTS__FSTACK_REUSE_NONE
    161-- Performing Test CXX_SUPPORTS__FSTACK_REUSE_NONE - Failed
    162-- Performing Test CXX_SUPPORTS__U_FORTIFY_SOURCE__D_FORTIFY_SOURCE_3_cc10
    163-- Performing Test CXX_SUPPORTS__U_FORTIFY_SOURCE__D_FORTIFY_SOURCE_3_cc10 - Success
    164-- Performing Test LINKER_SUPPORTS__U_FORTIFY_SOURCE__D_FORTIFY_SOURCE_3_cc10
    165-- Performing Test LINKER_SUPPORTS__U_FORTIFY_SOURCE__D_FORTIFY_SOURCE_3_cc10 - Success
    166-- Performing Test CXX_SUPPORTS__WSTACK_PROTECTOR
    167-- Performing Test CXX_SUPPORTS__WSTACK_PROTECTOR - Success
    168-- Performing Test CXX_SUPPORTS__FSTACK_PROTECTOR_ALL
    169-- Performing Test CXX_SUPPORTS__FSTACK_PROTECTOR_ALL - Success
    170-- Performing Test LINKER_SUPPORTS__FSTACK_PROTECTOR_ALL
    171-- Performing Test LINKER_SUPPORTS__FSTACK_PROTECTOR_ALL - Success
    172-- Performing Test CXX_SUPPORTS__FCF_PROTECTION_FULL
    173-- Performing Test CXX_SUPPORTS__FCF_PROTECTION_FULL - Failed
    174-- Performing Test CXX_SUPPORTS__FSTACK_CLASH_PROTECTION
    175-- Performing Test CXX_SUPPORTS__FSTACK_CLASH_PROTECTION - Failed
    176-- Performing Test CXX_SUPPORTS__MBRANCH_PROTECTION_BTI
    177-- Performing Test CXX_SUPPORTS__MBRANCH_PROTECTION_BTI - Success
    178-- Performing Test LINKER_SUPPORTS__WL___ENABLE_RELOC_SECTION
    179-- Performing Test LINKER_SUPPORTS__WL___ENABLE_RELOC_SECTION - Failed
    180-- Performing Test LINKER_SUPPORTS__WL___DYNAMICBASE
    181-- Performing Test LINKER_SUPPORTS__WL___DYNAMICBASE - Failed
    182-- Performing Test LINKER_SUPPORTS__WL___NXCOMPAT
    183-- Performing Test LINKER_SUPPORTS__WL___NXCOMPAT - Failed
    184-- Performing Test LINKER_SUPPORTS__WL___HIGH_ENTROPY_VA
    185-- Performing Test LINKER_SUPPORTS__WL___HIGH_ENTROPY_VA - Failed
    186-- Performing Test LINKER_SUPPORTS__WL__Z_RELRO
    187-- Performing Test LINKER_SUPPORTS__WL__Z_RELRO - Failed
    188-- Performing Test LINKER_SUPPORTS__WL__Z_NOW
    189-- Performing Test LINKER_SUPPORTS__WL__Z_NOW - Failed
    190-- Performing Test LINKER_SUPPORTS__WL__Z_SEPARATE_CODE
    191-- Performing Test LINKER_SUPPORTS__WL__Z_SEPARATE_CODE - Failed
    192-- Performing Test LINKER_SUPPORTS__WL__FIXUP_CHAINS
    193-- Performing Test LINKER_SUPPORTS__WL__FIXUP_CHAINS - Success
    194-- Found Python3: /opt/homebrew/bin/python3 (found suitable version "3.13.2", minimum required is "3.10") found components: Interpreter
    195-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
    196-- Performing Test HAVE_BUILTIN_PREFETCH
    197-- Performing Test HAVE_BUILTIN_PREFETCH - Success
    198-- Performing Test HAVE_MM_PREFETCH
    199-- Performing Test HAVE_MM_PREFETCH - Failed
    200-- Performing Test HAVE_SSE42
    201-- Performing Test HAVE_SSE42 - Failed
    202-- Performing Test HAVE_ARM64_CRC32C
    203-- Performing Test HAVE_ARM64_CRC32C - Success
    204-- Looking for F_FULLFSYNC
    205-- Looking for F_FULLFSYNC - found
    206-- Performing Test HAVE_CLMUL
    207-- Performing Test HAVE_CLMUL - Failed
    208
    209Configuring secp256k1 subtree...
    210-- The C compiler identification is Clang 19.1.7
    211-- Detecting C compiler ABI info
    212-- Detecting C compiler ABI info - done
    213-- Check for working C compiler: /opt/homebrew/opt/llvm/bin/clang - skipped
    214-- Detecting C compile features
    215-- Detecting C compile features - done
    216-- Performing Test HAVE_X86_64_ASM
    217-- Performing Test HAVE_X86_64_ASM - Failed
    218-- Could NOT find Valgrind (missing: Valgrind_INCLUDE_DIR Valgrind_WORKS) 
    219-- Performing Test C_SUPPORTS__PEDANTIC
    220-- Performing Test C_SUPPORTS__PEDANTIC - Success
    221-- Performing Test C_SUPPORTS__WALL
    222-- Performing Test C_SUPPORTS__WALL - Success
    223-- Performing Test C_SUPPORTS__WCAST_ALIGN
    224-- Performing Test C_SUPPORTS__WCAST_ALIGN - Success
    225-- Performing Test C_SUPPORTS__WCAST_ALIGN_STRICT
    226-- Performing Test C_SUPPORTS__WCAST_ALIGN_STRICT - Failed
    227-- Performing Test C_SUPPORTS__WCONDITIONAL_UNINITIALIZED
    228-- Performing Test C_SUPPORTS__WCONDITIONAL_UNINITIALIZED - Success
    229-- Performing Test C_SUPPORTS__WEXTRA
    230-- Performing Test C_SUPPORTS__WEXTRA - Success
    231-- Performing Test C_SUPPORTS__WNESTED_EXTERNS
    232-- Performing Test C_SUPPORTS__WNESTED_EXTERNS - Success
    233-- Performing Test C_SUPPORTS__WNO_LONG_LONG
    234-- Performing Test C_SUPPORTS__WNO_LONG_LONG - Success
    235-- Performing Test C_SUPPORTS__WNO_OVERLENGTH_STRINGS
    236-- Performing Test C_SUPPORTS__WNO_OVERLENGTH_STRINGS - Success
    237-- Performing Test C_SUPPORTS__WNO_UNUSED_FUNCTION
    238-- Performing Test C_SUPPORTS__WNO_UNUSED_FUNCTION - Success
    239-- Performing Test C_SUPPORTS__WRESERVED_IDENTIFIER
    240-- Performing Test C_SUPPORTS__WRESERVED_IDENTIFIER - Success
    241-- Performing Test C_SUPPORTS__WSHADOW
    242-- Performing Test C_SUPPORTS__WSHADOW - Success
    243-- Performing Test C_SUPPORTS__WSTRICT_PROTOTYPES
    244-- Performing Test C_SUPPORTS__WSTRICT_PROTOTYPES - Success
    245-- Performing Test C_SUPPORTS__WUNDEF
    246-- Performing Test C_SUPPORTS__WUNDEF - Success
    247
    248
    249secp256k1 configure summary
    250===========================
    251Build artifacts:
    252  library type ........................ Static
    253Optional modules:
    254  ECDH ................................ OFF
    255  ECDSA pubkey recovery ............... ON
    256  extrakeys ........................... ON
    257  schnorrsig .......................... ON
    258  musig ............................... OFF
    259  ElligatorSwift ...................... ON
    260Parameters:
    261  ecmult window size .................. 15
    262  ecmult gen table size ............... 86 KiB
    263Optional features:
    264  assembly ............................ OFF
    265  external callbacks .................. OFF
    266Optional binaries:
    267  benchmark ........................... OFF
    268  noverify_tests ...................... OFF
    269  tests ............................... OFF
    270  exhaustive tests .................... OFF
    271  ctime_tests ......................... OFF
    272  examples ............................ OFF
    273
    274Cross compiling ....................... FALSE
    275Valgrind .............................. OFF
    276Preprocessor defined macros ........... ENABLE_MODULE_ELLSWIFT=1 ENABLE_MODULE_SCHNORRSIG=1 ENABLE_MODULE_EXTRAKEYS=1 ENABLE_MODULE_RECOVERY=1 ECMULT_WINDOW_SIZE=15 COMB_BLOCKS=43 COMB_TEETH=6
    277C compiler ............................ Clang 19.1.7, /opt/homebrew/opt/llvm/bin/clang
    278CFLAGS ................................ 
    279Compile options ....................... -pedantic -Wall -Wcast-align -Wconditional-uninitialized -Wextra -Wnested-externs -Wno-long-long -Wno-overlength-strings -Wno-unused-function -Wreserved-identifier -Wshadow -Wstrict-prototypes -Wundef
    280Build type:
    281 - CMAKE_BUILD_TYPE ................... RelWithDebInfo
    282 - CFLAGS ............................. -O2 -g 
    283 - LDFLAGS for executables ............ 
    284 - LDFLAGS for shared libraries ....... 
    285SECP256K1_APPEND_CFLAGS ............... -fsanitize=undefined,address,fuzzer-no-link
    286SECP256K1_APPEND_LDFLAGS .............. -fsanitize=undefined,address,fuzzer-no-link
    287
    288
    289
    290Configure summary
    291=================
    292Executables:
    293  bitcoind ............................ OFF
    294  bitcoin-node (multiprocess) ......... OFF
    295  bitcoin-qt (GUI) .................... OFF
    296  bitcoin-gui (GUI, multiprocess) ..... OFF
    297  bitcoin-cli ......................... OFF
    298  bitcoin-tx .......................... OFF
    299  bitcoin-util ........................ OFF
    300  bitcoin-wallet ...................... OFF
    301  bitcoin-chainstate (experimental) ... OFF
    302  libbitcoinkernel (experimental) ..... OFF
    303Optional features:
    304  wallet support ...................... ON
    305   - legacy wallets (Berkeley DB) ..... OFF
    306  external signer ..................... OFF
    307  ZeroMQ .............................. OFF
    308  USDT tracing ........................ OFF
    309  QR code (GUI) ....................... OFF
    310  DBus (GUI, Linux only) .............. OFF
    311Tests:
    312  test_bitcoin ........................ OFF
    313  test_bitcoin-qt ..................... OFF
    314  bench_bitcoin ....................... OFF
    315  fuzz binary ......................... ON
    316
    317Cross compiling ....................... FALSE
    318C++ compiler .......................... Clang 19.1.7, /opt/homebrew/opt/llvm/bin/clang++
    319CMAKE_BUILD_TYPE ...................... RelWithDebInfo
    320Preprocessor defined macros ........... FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION OBJC_OLD_DISPATCH_PROTOTYPES=0
    321C++ compiler flags .................... -O2 -g -std=c++20 -fPIC -fdebug-prefix-map=/Users/prabhatverma/projects/bitcoin/src=. -fmacro-prefix-map=/Users/prabhatverma/projects/bitcoin/src=. -fsanitize=undefined,address,fuzzer-no-link -Wall -Wextra -Wgnu -Wformat -Wformat-security -Wvla -Wshadow-field -Wthread-safety -Wloop-analysis -Wredundant-decls -Wunused-member-function -Wdate-time -Wconditional-uninitialized -Woverloaded-virtual -Wsuggest-override -Wimplicit-fallthrough -Wunreachable-code -Wdocumentation -Wself-assign -Wundef -Wno-unused-parameter -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -Wstack-protector -fstack-protector-all -mbranch-protection=bti
    322Linker flags .......................... -O2 -g -Wl,-dead_strip -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -fsanitize=undefined,address,fuzzer-no-link -fstack-protector-all -Wl,-fixup_chains -fPIE -Xlinker -pie
    323
    324NOTE: The summary above may not exactly match the final applied build flags
    325      if any additional CMAKE_* or environment variables have been modified.
    326      To see the exact flags applied, build with the --verbose option.
    327
    328Attempt to harden executables ......... ON
    329Treat compiler warnings as errors ..... OFF
    330Use ccache for compiling .............. OFF
    331
    332
    333-- Configuring done (10.6s)
    334-- Generating done (0.1s)
    335-- Build files have been written to: /Users/prabhatverma/projects/bitcoin/build
    
  21. Crypt-iQ commented at 4:00 pm on April 3, 2025: contributor
    Does the issue occur with clang 18?
  22. Prabhat1308 commented at 4:15 pm on April 3, 2025: contributor

    Does the issue occur with clang 18?

    works with clang 18 but its bringing back https://github.com/bitcoin/bitcoin/issues/31591

  23. Crypt-iQ commented at 6:14 pm on April 8, 2025: contributor

    works with clang 18 but its bringing back #31591

    Ahh, I see. That’s annoying. I’m just ignoring the errors for now and it seems to work as expected. I’ve historically had a bit of trouble with macOS fuzzing and sometimes things just tend to break.


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: 2025-04-19 06:12 UTC

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