Skip to content

test: p2p_message_capture.py fails with GCC 13-15 & undefined sanitizer #32016

Closed

Description

@fanquake

Using Fedora 41:

# gcc (GCC) 15.1.1 20250521 (Red Hat 15.1.1-2)

dnf install git cmake gcc-c++ make python3 libevent-devel boost-devel sqlite-devel zeromq-devel systemtap-sdt-devel ccache
git clone https://github.com/bitcoin/bitcoin
cd bitcoin
cmake -B build -DSANITIZERS=undefined
cmake --build build
./build/test/functional/test_runner.py p2p_message_capture.py
./build/test/functional/test_runner.py p2p_message_capture.py
<snip>
stdout:
2025-06-24T13:21:52.543212Z TestFramework (INFO): PRNG seed is: 7493633970328004406
2025-06-24T13:21:52.545101Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20250624_132152/p2p_message_capture_0
2025-06-24T13:21:52.970276Z TestFramework (INFO): Stopping nodes


stderr:
Traceback (most recent call last):
  File "/root/bitcoin/build/test/functional/p2p_message_capture.py", line 72, in <module>
    MessageCaptureTest(__file__).main()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 214, in main
    exit_code = self.shutdown()
  File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 376, in shutdown
    self.stop_nodes()
    ~~~~~~~~~~~~~~~^^
  File "/root/bitcoin/test/functional/test_framework/test_framework.py", line 625, in stop_nodes
    node.wait_until_stopped()
    ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/root/bitcoin/test/functional/test_framework/test_node.py", line 460, in wait_until_stopped
    self.wait_until(lambda: self.is_node_stopped(**kwargs), timeout=timeout)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/bitcoin/test/functional/test_framework/test_node.py", line 862, in wait_until
    return wait_until_helper_internal(test_function, timeout=timeout, timeout_factor=self.timeout_factor, check_interval=check_interval)
  File "/root/bitcoin/test/functional/test_framework/util.py", line 314, in wait_until_helper_internal
    if predicate():
       ~~~~~~~~~^^
  File "/root/bitcoin/test/functional/test_framework/test_node.py", line 460, in <lambda>
    self.wait_until(lambda: self.is_node_stopped(**kwargs), timeout=timeout)
                            ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/root/bitcoin/test/functional/test_framework/test_node.py", line 445, in is_node_stopped
    raise AssertionError("Unexpected stderr {} != {}".format(stderr, expected_stderr))
AssertionError: Unexpected stderr /root/bitcoin/src/streams.cpp:85:24: runtime error: null pointer passed as argument 1, which is declared to never be null != 
[node 0] Cleaning up leftover process

Activity

  1. dergoegge commented on Mar 7, 2025

    @dergoegge
    Member

    Maybe related: #28761

  2. instagibbs commented on Mar 27, 2025

    @instagibbs
    Member

    I'm seeing this on 13.3.0 fwiw

  3. maflcko commented on Mar 27, 2025

    @maflcko
    Member

    Maybe related: #28761

    Yeah, it is the same one. It was fixed upstream in the standard as of this year, see https://www.open-std.org/JTC1/SC22/WG14/www/docs/n3466.pdf

  4. changed the title [-]test: `p2p_message_capture.py` fails with GCC 14 & undefined sanitizer[/-] [+]test: `p2p_message_capture.py` fails with GCC 13-15 & undefined sanitizer[/+] on Jun 24, 2025
  5. fanquake commented on Feb 5, 2026

    @fanquake
    MemberAuthor

    This is no-longer reproducing for me (gcc (GCC) 16.0.1 20260127 (Red Hat 16.0.1-0)).

  6. maflcko commented on Jul 9, 2026

    @maflcko
    Member

    This is no-longer reproducing for me (gcc (GCC) 16.0.1 20260127 (Red Hat 16.0.1-0)).

    Not to myself: This issue is about fwrite, fixed in GCC 16.1. Godbolt: https://godbolt.org/z/YzGdfvvdW

    Looks like memcpy is still broken even in GCC 16.1/Clang 22?

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions