public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jsm28 at gcc dot gnu dot org" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug ports/2682] On ARM EABI, exit should be marked EXIDX_CANTUNWIND
Date: Mon, 22 May 2006 14:19:00 -0000	[thread overview]
Message-ID: <20060522141921.22752.qmail@sourceware.org> (raw)
In-Reply-To: <20060521225027.2682.jsm28@gcc.gnu.org>


------- Additional Comments From jsm28 at gcc dot gnu dot org  2006-05-22 14:19 -------
Marking destructor stops doesn't suffice since the same applies to functions
registered explicitly from atexit.  Such functions can be called normally, and
throwing is then OK; they can be called from atexit, when throwing must result
in terminate being called.

Thanks for the x86_64 pointer, here's an example which does fail there.  (The
indirection about how and when exit is called is to avoid problems with the
compiler knowing that exit can't throw.)

#include <stdlib.h>
#include <stdio.h>
void f(void)
{
  puts("in atexit handler");
  throw "s";
}
volatile int v;
void e(void)
{
  if (v)
    throw "s";
  exit (0);
}
int main(void)
{
  atexit(f);
  try {
    e ();
  } catch (...) {
    puts ("caught");
    abort ();
  }
}

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2682

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


  parent reply	other threads:[~2006-05-22 14:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-21 22:50 [Bug ports/2682] New: " jsm28 at gcc dot gnu dot org
2006-05-22  3:43 ` [Bug ports/2682] " drow at sources dot redhat dot com
2006-05-22 11:34 ` jsm28 at gcc dot gnu dot org
2006-05-22 13:56 ` drow at sources dot redhat dot com
2006-05-22 14:19 ` jsm28 at gcc dot gnu dot org [this message]
2006-05-22 14:23 ` [Bug libc/2682] " drow at sources dot redhat dot com
2006-05-22 14:35 ` jsm28 at gcc dot gnu dot org
2006-05-22 14:45 ` drow at sources dot redhat dot com
2006-09-09 17:11 ` [Bug ports/2682] " drepper at redhat dot com
2006-09-09 18:25 ` drow at sources dot redhat dot com

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=20060522141921.22752.qmail@sourceware.org \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /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).