public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fxcoudert at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/45486] [4.8 only] throw not being caught
Date: Sat, 08 Nov 2014 21:11:00 -0000	[thread overview]
Message-ID: <bug-45486-4-R1Y626MrcD@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-45486-4@http.gcc.gnu.org/bugzilla/>

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

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-11-08
                 CC|                            |fxcoudert at gcc dot gnu.org
   Target Milestone|---                         |4.9.0
            Summary|throw not being caught      |[4.8 only] throw not being
                   |                            |caught
     Ever confirmed|0                           |1

--- Comment #2 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
This works on x86_64-apple-darwin64, both at -m32 and -m64, for g++ 4.9 and
trunk.

On 4.8, however, I get the following error, similar to the original report:

Before try block
Before throw_int.
terminate called after throwing an instance of 'int'
zsh: abort      ./a.out

with the following backtrace:

* thread #1: tid = 0x66658b, 0x00007fff917e2282
libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread',
stop reason = signal SIGABRT
  * frame #0: 0x00007fff917e2282 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff8fc2d4c3 libsystem_pthread.dylib`pthread_kill + 90
    frame #2: 0x00007fff8e38bb73 libsystem_c.dylib`abort + 129
    frame #3: 0x00000001000099fb
libstdc++.6.dylib`__gnu_cxx::__verbose_terminate_handler() + 315
    frame #4: 0x0000000100007888 libstdc++.6.dylib`__cxxabiv1::__terminate(void
(*)()) + 8
    frame #5: 0x00000001000078d3 libstdc++.6.dylib`std::terminate() + 19
    frame #6: 0x0000000100007afe libstdc++.6.dylib`__cxa_throw + 94
    frame #7: 0x00000001000016b3 a.out`A::throw_int(this=<unavailable>) const +
51 at a.C:9
    frame #8: 0x00000001000016cd a.out`B::throw_int(this=0x00007fff5fbff9bb) +
25 at a.C:20
    frame #9: 0x0000000100001559 a.out`main + 101 at a.C:31
    frame #10: 0x0000000100000fd8 a.out`_start + 230
    frame #11: 0x0000000100000ef1 a.out`start + 33


           reply	other threads:[~2014-11-08 21:11 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <bug-45486-4@http.gcc.gnu.org/bugzilla/>]

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-45486-4-R1Y626MrcD@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).