Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test crashes in aarch64 built with clang++ #607

Open
sakhnik opened this issue Jan 1, 2024 · 1 comment
Open

Test crashes in aarch64 built with clang++ #607

sakhnik opened this issue Jan 1, 2024 · 1 comment

Comments

@sakhnik
Copy link

sakhnik commented Jan 1, 2024

Expected Behavior

Test to pass

Actual Behavior

SIGSEGV is received:

Program received signal SIGSEGV, Segmentation fault.
0x0000aaaaaaf92c58 in boost::ext::ut::v2_0_0::reporter_junit<boost::ext::ut::v2_0_0::printer>::reporter_junit (
    this=0xaaaaad0267a0 <boost::ext::ut::v2_0_0::cfg<boost::ext::ut::v2_0_0::override>>) at _deps/ut-src/include/boost/ut.hpp:1611
1611      std::streambuf* cout_save = std::cout.rdbuf();

This only happened in Manjaro Linux aarch64 when I attempted to build and run https://github.com/sakhnik/adventofcode . The build on x86_64 runs fine.

Steps to Reproduce the Problem

  1. git clone https://github.com/sakhnik/adventofcode
  2. cd adventofcode
  3. ./conf.sh
  4. cmake --build BUILD
  5. ./BUILD/aoc 2023-01

Specifications

  • Version: 2.0.1
  • Platform: aarch64, Manjaro Linux
  • Compiler: clang++
  • Subsystem:

The executable doesn't crash when built with gcc!

@jmafc
Copy link

jmafc commented Feb 8, 2024

I am seeing something something similar when building/testing 2.0.1 on Debian 12 using clang++-16. I had some very simple tests (like adding integers) that worked fine with ut before. When I tried it on something somewhat more complex (tokenizing some strings) with clang++-16, I got a segfault. Retrying the same simple tests with the latter compiler also resulted in a segfault.

Since the installed version of ut had been built with gcc (12.2.0), I decided to rebuild it with clang++ (16.0.6). Now the build fails as follows:

[8/115] Linking CXX executable example/boost_ut_abort
FAILED: example/boost_ut_abort
: && /usr/bin/clang++-16   example/CMakeFiles/boost_ut_abort.dir/abort.cpp.o -o example/boost_ut_abort && cd .../ut/support/ut/build/example && .../ut/build/example/boost_ut_abort
Segmentation fault

This is really annoying because clang++ 16 AFAIK is the only compiler on Linux that currently supports C++20 modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants