From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31478 invoked by alias); 5 Dec 2013 00:35:23 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 31460 invoked by uid 48); 5 Dec 2013 00:35:21 -0000 From: "mseaborn at chromium dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/59392] crash on throw from "unexpected exception" handler with ARM EABI unwinder Date: Thu, 05 Dec 2013 00:35:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mseaborn at chromium dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-12/txt/msg00346.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59392 Mark Seaborn changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mseaborn at chromium dot org --- Comment #1 from Mark Seaborn --- Instead of: if (catch_type->__do_catch(&bad_exc, NULL, 1)) I think this should be: // We don't have a thrown object to compare against, but since // bad_exception doesn't have virtual bases, that's OK; just pass 0. void *obj = NULL; if (catch_type->__do_catch(&bad_exc, &obj, 1)) or to avoid the comment, just: std::bad_exception ex; void *obj = &ex; if (catch_type->__do_catch(&typeid(ex), &obj, 1)) The non-EABI equivalent is the second check_exception_spec() call in __cxa_call_unexpected() in eh_personality.cc.