This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/59392] crash on throw from "unexpected exception" handler with ARM EABI unwinder


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59392

Mark Seaborn <mseaborn at chromium dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mseaborn at chromium dot org

--- Comment #1 from Mark Seaborn <mseaborn at chromium dot org> ---
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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]