public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug uprobes/6912] New: uretprobes support for longjmp/exceptions
@ 2008-09-23  2:50 fche at redhat dot com
  2008-09-23 17:50 ` [Bug uprobes/6912] " jkenisto at us dot ibm dot com
  0 siblings, 1 reply; 2+ messages in thread
From: fche at redhat dot com @ 2008-09-23  2:50 UTC (permalink / raw)
  To: systemtap

uretprobes probably needs to learn how to deal with userspace
longjmp and c++ exceptions, at least to the extent of letting
simple tracing scripts produce reasonable output.

# stap para-callgraph.stp 'process("...").function("...")'

is a simple way of tracing function entry/exit pairs, but when
functions return abnormally, we lose notifications and the
nesting loses its balance.

One possibility is to have a hack that is similar to emulated-alloca,
where if the system notices that a new breakpoint is being hit in a
thread that has known uretprobes outstanding, it can check whether
the stack pointer at those pending ureprobes is deeper than the current
hit.  If so, the system can infer that the returns were skipped over,
and ought to be emulated / cleaned up.

uretprobes could fire synthetically at such a time (with pt_regs = NULL
to indicate that we never had current registers).  At least, the uretprobes
instances need to be freed to avoid memory leaks.

Alternately, it may be possible to work around missed uretprobes at the
script level by doing the SP value-based heuristic with a bunch more
systemtap script code.  But this would not help with the possible memory
leak issue above.

-- 
           Summary: uretprobes support for longjmp/exceptions
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: uprobes
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: fche at redhat dot com


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug uprobes/6912] uretprobes support for longjmp/exceptions
  2008-09-23  2:50 [Bug uprobes/6912] New: uretprobes support for longjmp/exceptions fche at redhat dot com
@ 2008-09-23 17:50 ` jkenisto at us dot ibm dot com
  0 siblings, 0 replies; 2+ messages in thread
From: jkenisto at us dot ibm dot com @ 2008-09-23 17:50 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jkenisto at us dot ibm dot com  2008-09-23 17:49 -------


*** This bug has been marked as a duplicate of 5274 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

end of thread, other threads:[~2008-09-23 17:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-23  2:50 [Bug uprobes/6912] New: uretprobes support for longjmp/exceptions fche at redhat dot com
2008-09-23 17:50 ` [Bug uprobes/6912] " jkenisto at us dot ibm 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).