public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mathieu.malaterre at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/103629] Possible miscompilation triggered by pthread + exception
Date: Fri, 10 Dec 2021 13:13:08 +0000	[thread overview]
Message-ID: <bug-103629-4-ErWASGLkan@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103629-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103629

--- Comment #9 from Mathieu Malaterre <mathieu.malaterre at gmail dot com> ---
Compiling the reduce test case without pthread lead to some kind of exception:

```
(gdb) bt full
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
        set = {__val = {0 <repeats 12 times>, 8245935278387129975,
5908832823118463008, 0, 0}}
        pid = <optimized out>
        tid = <optimized out>
        ret = <optimized out>
#1  0x00007ffff7bf9536 in __GI_abort () at abort.c:79
        save_stage = 1
        act = {__sigaction_handler = {sa_handler = 0x7ffff7d925e0
<_IO_2_1_stderr_>, sa_sigaction = 0x7ffff7d925e0 <_IO_2_1_stderr_>}, sa_mask =
{__val = {140737350282933, 140737351591392, 140737351591392,
              140737351591523, 140737351595200, 3432, 140737350279750, 11, 1,
140737351591392, 93824992325712, 140737352586656, 140737488347968, 0,
140737350287193, 140737351591840}}, sa_flags = -135945484,
          sa_restorer = 0x7ffff7d927a0 <stderr>}
        sigs = {__val = {32, 0, 0, 0, 17, 9223372036854775922, 140737352422480,
140737350282933, 0, 140737350282933, 140737353353159, 140737351591392,
93824992325672, 140737351595200, 3432, 140737350279750}}
#2  0x00007ffff7e4f87a in __gnu_cxx::__verbose_terminate_handler () at
../../../../src/libstdc++-v3/libsupc++/vterminate.cc:95
        terminating = true
        t = <optimized out>
#3  0x00007ffff7e5b04a in __cxxabiv1::__terminate (handler=<optimized out>) at
../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:48
No locals.
#4  0x00007ffff7e5b0b5 in std::terminate () at
../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:58
No locals.
#5  0x00007ffff7e5b349 in __cxxabiv1::__cxa_throw (obj=<optimized out>,
tinfo=0x7ffff7fb1530 <typeinfo for std::system_error>, dest=0x7ffff7e855a0
<std::system_error::~system_error()>)
    at ../../../../src/libstdc++-v3/libsupc++/eh_throw.cc:95
        globals = <optimized out>
        header = 0x55555556aeb0
#6  0x00007ffff7e525fa in std::__throw_system_error(int) () from
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#7  0x00007ffff7fc740f in
std::call_once<Tree::treeType()::{lambda()#1}>(std::once_flag&,
Tree::treeType()::{lambda()#1}&&) (__once=..., __f=...) at
/usr/include/c++/11/mutex:784
        __e = -1
        __callable = {____f = @0x7fffffffe3ff}
        __exec = {<No data fields>}
```

I am not able to reproduce gcc behavior using clang++ (again Debian sid
version).

  parent reply	other threads:[~2021-12-10 13:13 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 13:25 [Bug c++/103629] New: Possible miscompilation triggered by -fvisibility=hidden mathieu.malaterre at gmail dot com
2021-12-09 13:30 ` [Bug c++/103629] " marxin at gcc dot gnu.org
2021-12-09 13:32 ` pinskia at gcc dot gnu.org
2021-12-09 13:38 ` mathieu.malaterre at gmail dot com
2021-12-09 13:45 ` pinskia at gcc dot gnu.org
2021-12-09 14:03 ` mathieu.malaterre at gmail dot com
2021-12-09 14:15 ` pinskia at gcc dot gnu.org
2021-12-09 14:23 ` mathieu.malaterre at gmail dot com
2021-12-10 13:11 ` mathieu.malaterre at gmail dot com
2021-12-10 13:13 ` mathieu.malaterre at gmail dot com [this message]
2021-12-10 13:20 ` [Bug c++/103629] Possible miscompilation visible using pthread + exception pinskia at gcc dot gnu.org
2021-12-10 13:22 ` [Bug libstdc++/103629] " pinskia at gcc dot gnu.org
2021-12-10 14:33 ` redi at gcc dot gnu.org
2021-12-10 15:01 ` redi at gcc dot gnu.org
2021-12-10 15:09 ` redi at gcc dot gnu.org
2021-12-10 15:10 ` redi at gcc dot gnu.org
2021-12-10 15:13 ` redi at gcc dot gnu.org
2021-12-10 15:28 ` redi at gcc dot gnu.org
2021-12-19 22:52 ` pinskia at gcc dot gnu.org
2021-12-19 22:53 ` [Bug libstdc++/103629] [11/12 Regression] " pinskia at gcc dot gnu.org
2022-01-04  9:04 ` rguenth at gcc dot gnu.org
2022-04-21  7:50 ` rguenth at gcc dot gnu.org
2022-08-24 12:14 ` [Bug libstdc++/103629] [11/12/13 " malat at debian dot org
2022-08-24 12:14 ` malat at debian dot org
2022-08-24 12:16 ` malat at debian dot org
2022-08-24 12:28 ` [Bug libstdc++/103629] [11/12/13 Regression] wrong-code when mixing mutex with visibility=hidden malat at debian dot org
2022-08-24 12:30 ` malat at debian dot org
2023-03-17  7:36 ` malat at debian dot org
2023-05-29 10:06 ` [Bug libstdc++/103629] [11/12/13/14 " jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-103629-4-ErWASGLkan@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).