public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/26208]  New: Serious problem with unwinding through signal frames
@ 2006-02-10  8:22 jakub at gcc dot gnu dot org
  2006-02-10  8:23 ` [Bug other/26208] " jakub at gcc dot gnu dot org
                   ` (32 more replies)
  0 siblings, 33 replies; 34+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-02-10  8:22 UTC (permalink / raw)
  To: gcc-bugs

The attached testcase usually segfaults on i?86-linux and x86_64-linux
(and likely on most other DWARF2_UNWIND_INFO 1 targets, though the testcase
would need to be tweaked for them).
The problem is that instruction pointer saved in the signal frame is after
last successfully executed instruction and before first non-executed
instruction,
while .eh_frame and unwind-dw2.c basically expects context->ra to be after the
first non-executed instruction.
To find FDE, unwind-dw2.c uses context->ra - 1, which is good for normal
unwinding, but if e.g. a signal is sent while $pc is at the very beginning
of some function, context->ra - 1 either corresponds to a previous function
or is not covered by any FDE.
Similarly, execute_cfa_program has a loop:
  while (insn_ptr < insn_end && fs->pc < context->ra)
which is good in most cases, but when context->ra is saved IP from sigcontext
in signal frame, this means that the last set of unwind instructions will
not be executed, while it ought to (for signal frame context->ra we'd need
to also execute fs->pc == context->ra instructions).


-- 
           Summary: Serious problem with unwinding through signal frames
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org


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


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

end of thread, other threads:[~2008-07-07  8:34 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-10  8:22 [Bug other/26208] New: Serious problem with unwinding through signal frames jakub at gcc dot gnu dot org
2006-02-10  8:23 ` [Bug other/26208] " jakub at gcc dot gnu dot org
2006-02-10  8:23 ` jakub at gcc dot gnu dot org
2006-02-10  8:24 ` jakub at gcc dot gnu dot org
2006-02-10 20:00 ` uweigand at gcc dot gnu dot org
2006-02-10 20:18 ` jakub at gcc dot gnu dot org
2006-02-10 20:34 ` uweigand at gcc dot gnu dot org
2006-02-21 12:02 ` jakub at gcc dot gnu dot org
2006-02-21 12:02 ` jakub at gcc dot gnu dot org
2006-02-21 13:12 ` jakub at gcc dot gnu dot org
2006-02-21 17:52 ` jakub at gcc dot gnu dot org
2006-02-21 18:47 ` rth at gcc dot gnu dot org
2006-02-21 22:09 ` jakub at gcc dot gnu dot org
2006-02-21 23:09 ` rth at gcc dot gnu dot org
2006-02-21 23:15 ` jakub at gcc dot gnu dot org
2006-02-21 23:25 ` rth at gcc dot gnu dot org
2006-02-22  1:13 ` amodra at bigpond dot net dot au
2006-02-22  5:12 ` amodra at bigpond dot net dot au
2006-02-22  8:11 ` jakub at gcc dot gnu dot org
2006-02-22  9:57 ` uweigand at gcc dot gnu dot org
2006-02-22 10:25 ` jakub at gcc dot gnu dot org
2006-02-23  0:41 ` amodra at bigpond dot net dot au
2006-02-23  1:01 ` rth at gcc dot gnu dot org
2006-02-23  1:08 ` amodra at bigpond dot net dot au
2006-02-24 19:46 ` jakub at gcc dot gnu dot org
2006-02-24 19:56 ` jakub at gcc dot gnu dot org
2006-02-24 19:56 ` jakub at gcc dot gnu dot org
2006-02-25  1:21 ` rth at gcc dot gnu dot org
2006-02-26 22:30 ` jakub at gcc dot gnu dot org
2006-02-27 17:32 ` jakub at gcc dot gnu dot org
2006-02-28 22:33 ` jakub at gcc dot gnu dot org
2006-04-06 13:30 ` jakub at gcc dot gnu dot org
2006-09-05 14:32 ` pluto at agmk dot net
2008-07-07  8:34 ` ebotcazou at gcc dot gnu dot org

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