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

[Bug uprobes/12275] uretprobes break exception handling


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

--- Comment #4 from Josh Stone <jistone at redhat dot com> 2010-12-01 22:45:29 UTC ---
(In reply to comment #3)
> A longjmp shouldn't cause uretprobe_instances to leak.  See
> uretprobe_bypass_instances() in uprobes.c.  Our intent was to handle longjmps
> correctly, but we didn't consider that C++ exception handling is a different
> beast.

Sorry, "leak" isn't quite the right term.  They are left in a sort of limbo
until reclaimed.  This will happen at task exit, but it's good to know that the
heuristic you point out should reclaim them much sooner.  It relies on this
claim:

  "A bypassed uretprobe_instance's stack_ptr is beyond the current stack."

This isn't strictly guaranteed, as future uretprobes that invoke this check
might be at a deeper nesting than the limbo uretprobe.  But since the stack
can't grow forever, it's a pretty good heuristic.  I expect this would work
after C++ exception handling too, if we can just get the unwinder not to trip
on the trampoline address.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


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