public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/49404] New: ARM _Unwind_Backtrace returns _URC_FAILURE too eagerly
@ 2011-06-14 13:40 akos.pasztory at gmail dot com
  2011-07-25 14:47 ` [Bug target/49404] " ramana at gcc dot gnu.org
  2011-07-25 15:51 ` akos.pasztory at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: akos.pasztory at gmail dot com @ 2011-06-14 13:40 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: ARM _Unwind_Backtrace returns _URC_FAILURE too eagerly
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: akos.pasztory@gmail.com
              Host: i686-pc-linux-gnu
            Target: arm-none-linux-gnueabi


In the ARM implementation of _Unwind_Backtrace [1], if get_eit_entry() returns
_URC_END_OF_STACK, as it will when reaching a .cantunwind function (e.g.
_start), it is turned into _URC_FAILURE.  Thus, _Unwind_Backtrace will (almost
always?) return _URC_FAILURE, which is bad if someone relies on that return
value.

I wonder if the get_eit_entry() result should be just returned verbatim, if
it's not _URC_OK, something like:

    if ((code = get_eit_entry (ucbp, saved_vrs.core.r[R_PC])) != _URC_OK)
      break;

[1]
http://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/arm/unwind-arm.c;h=4a9e2325c39afca79d05148be46ff72663a8b5cd;hb=HEAD#l974


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/49404] ARM _Unwind_Backtrace returns _URC_FAILURE too eagerly
  2011-06-14 13:40 [Bug target/49404] New: ARM _Unwind_Backtrace returns _URC_FAILURE too eagerly akos.pasztory at gmail dot com
@ 2011-07-25 14:47 ` ramana at gcc dot gnu.org
  2011-07-25 15:51 ` akos.pasztory at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: ramana at gcc dot gnu.org @ 2011-07-25 14:47 UTC (permalink / raw)
  To: gcc-bugs

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

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ramana at gcc dot gnu.org

--- Comment #1 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2011-07-25 14:46:27 UTC ---
If I read the EHABI( IHI0038A_ehabi.pdf) from infocenter.arm.com correctly. I
see that this is the behaviour as per the ABI specification. Read section 7.3
(Phase1 Unwinding) so that's probably right.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/49404] ARM _Unwind_Backtrace returns _URC_FAILURE too eagerly
  2011-06-14 13:40 [Bug target/49404] New: ARM _Unwind_Backtrace returns _URC_FAILURE too eagerly akos.pasztory at gmail dot com
  2011-07-25 14:47 ` [Bug target/49404] " ramana at gcc dot gnu.org
@ 2011-07-25 15:51 ` akos.pasztory at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: akos.pasztory at gmail dot com @ 2011-07-25 15:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Akos PASZTORY <akos.pasztory at gmail dot com> 2011-07-25 15:51:06 UTC ---
Does that also apply to _Unwind_Backtrace?  Unfortunately the specification I
found [1] doesn't elaborate on the return values.  Would anything bad happen if
it just returned the error code unmodified?

[1]
http://refspecs.freestandards.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/baselib--unwind-backtrace.html


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-25 15:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-14 13:40 [Bug target/49404] New: ARM _Unwind_Backtrace returns _URC_FAILURE too eagerly akos.pasztory at gmail dot com
2011-07-25 14:47 ` [Bug target/49404] " ramana at gcc dot gnu.org
2011-07-25 15:51 ` akos.pasztory at gmail dot com

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).