public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Jim Wilson <wilson@cygnus.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] Unwind problem for __attribute__ noreturn
Date: Wed, 21 Mar 2001 07:12:49 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590693005312@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590693005303@msgid-missing>

I disagree that de-optimizing the compiler output is the obvious solution.

In the case you describe, the return address will be equal to the end of
the scsi_malloc function and the beginning of the scsi_free function.  In 
that case, it should be obvious that we came from the scsi_malloc function.

You mention that the kernel sets b0 in some places.  But if the kernel is
setting b0 differently than a call instruction does, then the kernel must
be broken.  If the kernel is setting b0 to point someplace else to optimize
away a branch, then I don't understand how unwinding could work anyways,
because the unwind info will likely be different at the target than where
we are coming from.  I would need a really good description of what the
kernel is doing here before I could accept this as a valid reason to
de-optimize code.  If what the kernel is doing is valid, then why not
suggest that the kernel be modified to insert nops before the places where
the funny b0 stuff is done, so that b0-1 is still valid.

gdb does not use unwind info as yet, as far as I know.

We use the unwind info for C++ exceptions, but there would be no problem
there I think, because we already subtract one from the return address before
using it.

If I had enough time, I think I could create counterexamples showing that the
problem is not just noreturn calls.  What happens if we have a call immediately
followed by something like .body/.copy_state.  That would be pretty unlikly,
but it probably isn't impossible.  If you use the return address directly,
then you get the wrong unwind state.

Jim




  parent reply	other threads:[~2001-03-21  7:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-20  2:10 [Linux-ia64] Unwind problem for __attribute__ noreturn Keith Owens
2001-03-21  0:24 ` Jim Wilson
2001-03-21  6:03 ` Keith Owens
2001-03-21  6:53 ` David Mosberger
2001-03-21  7:12 ` Jim Wilson [this message]
2001-03-21  7:54 ` David Mosberger
2001-03-21  8:54 ` Keith Owens
2001-03-21 17:54 ` David Mosberger
2001-03-21 18:48 ` Cary Coutant
2001-03-21 19:07 ` Jim Wilson
2001-03-21 19:13 ` David Mosberger
2001-03-21 19:13 ` Jim Wilson
2001-03-21 19:26 ` Cary Coutant
2001-03-21 19:40 ` Jim Wilson
2001-03-21 19:58 ` David Mosberger
2001-03-21 20:00 ` Jim Wilson
2001-03-21 20:38 ` Jim Wilson
2001-03-21 22:54 ` David Mosberger
2001-03-21 23:42 ` Cary Coutant
2001-03-22 17:00 ` Rich Altmaier
2001-03-23 20:28 ` Jim Wilson
2001-03-24  0:58 ` Cary Coutant
2001-03-24  1:27 ` Keith Owens
2001-03-24  1:37 ` Jim Wilson
2001-03-26 22:06 ` DE-DINECHIN,CHRISTOPHE (HP-Cupertino,ex1)
2001-03-26 22:58 ` Cary Coutant

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=marc-linux-ia64-105590693005312@msgid-missing \
    --to=wilson@cygnus.com \
    --cc=linux-ia64@vger.kernel.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