[Bug 278551] pthread_join() kills the process with a return code of 134
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 24 Apr 2024 16:39:36 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278551
--- Comment #5 from Ed Maste <emaste@freebsd.org> ---
I can reproduce this with GCC 10, 11, 12, and 13. I cannot reproduce this with
Clang 16 or 17.
$ clang++16 -std=c++20 -static-libgcc -static-libstdc++ -static -pthread -O3
"main.cpp" -o "main_clang++" && ./main_clang++
clang-16: warning: argument unused during compilation: '-static-libgcc'
[-Wunused-command-line-argument]
clang-16: warning: argument unused during compilation: '-static-libstdc++'
[-Wunused-command-line-argument]
kernel
FreeBSD RELEASE 14.0 doesn't reach here.
$ clang++17 -std=c++20 -static-libgcc -static-libstdc++ -static -pthread -O3
"main.cpp" -o "main_clang++" && ./main_clang++
clang++: warning: argument unused during compilation: '-static-libgcc'
[-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-static-libstdc++'
[-Wunused-command-line-argument]
kernel
FreeBSD RELEASE 14.0 doesn't reach here.
It's reproducible with any exception with GCC:
static-except.cc:
int fn(void) { throw (int)0; }
int main(int argc, char *argv[])
{
try {
fn();
} catch (int i) {
return 0;
}
return 1;
}
$ g++13 -static static-except.cc -o static-except && ./static-except
Abort trap (core dumped)
I'll change this to a lang/gcc bug
--
You are receiving this mail because:
You are the assignee for the bug.