This is the mail archive of the frysk@sourceware.org mailing list for the frysk 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]

Re: [patch] Signal frame tests and fix


Mark,

Sounds more than worthy of a news entry!

Andrew

Mark Wielaard wrote:
Hi,

This adds a couple of tests for unwinding when signals are involved. We
would like to unwind as if at the interrupted place in the program the
unwind stack frames continue from the signal handler (and anything
called from the signal handler). The first test
(testFirstFrameInSignalHandler) exposed an bug in the ptrace handling of
single stepping. We detect when the stepping flag isn't set in a couple
of special cases, but then forgot to inform the Instruction observer,
which made us miss the first instruction and frame of the signal
handler. The fix is easy and included. The second test
(testReturnFrameAfterSignalHandler) works on x86_64, but seems to expose
a kernel bug on x86. Filed as bug #6044 and created a ptrace-testsuite
reproducer so hopefully Roland can help me out there. The last test
finally shows the issue why I started this work
(testStepSignalCallAllFrames). It steps through the whole signal handler
and checks the call frame is correct on every step. It works on x86_64
which had debug (eh) frame info everywhere, but fails on x86 where we
have to detect the signal trampoline code by hand to produce a good
unwind (similar to how we handle unwinding from PLT entries).

frysk-core/frysk/pkglibdir/ChangeLog
2008-04-07  Mark Wielaard  <mwielaard@redhat.com>

* funit-loop-signal.c: New test.

frysk-core/frysk/proc/live/ChangeLog
2008-04-07  Mark Wielaard  <mwielaard@redhat.com>

* LinuxPtraceTaskState.java (Stepping.handleTrappedEvent):
Explicitly notify Instruction observers in special "no step bit set" cases.


frysk-core/frysk/stack/ChangeLog
2008-04-07  Mark Wielaard  <mwielaard@redhat.com>

* TestSignalStepFrame.java: New tests.

All tests PASS on x86_64. The last two are marked unresolved on x86.
Working on that. And adding some more tests (for using sigaltstack and
nested signals).

Committed and pushed. No Regressions on x86 and x86_64 (fedora 8).

Mark


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