This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug uprobes/6912] New: uretprobes support for longjmp/exceptions
- From: "fche at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 23 Sep 2008 02:49:18 -0000
- Subject: [Bug uprobes/6912] New: uretprobes support for longjmp/exceptions
- Reply-to: sourceware-bugzilla at sourceware dot org
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.