This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Array overflow when no array is used
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Vincent Bernat <bernat at luffy dot cx>
- Cc: systemtap at sourceware dot org
- Date: Mon, 30 Sep 2013 10:28:03 -0400
- Subject: Re: Array overflow when no array is used
- Authentication-results: sourceware.org; auth=none
- References: <8738omd222 dot fsf at guybrush dot luffy dot cx> <87wqlybio8 dot fsf at guybrush dot luffy dot cx> <87k3hybe2j dot fsf at guybrush dot luffy dot cx>
bernat wrote:
> [...]
> It seems that function().return is quite unreliable: it is not reliably
> called and when it is, data when can fetch from there is bogus, most of
> the time.
A common misunderstanding of $variable access in $return probes is
what data exactly is snapshotted. See [man stapprobes] for a little
extra insight; you might find the @entry() construct more intuitive as
regards to the time & data aspects.
probe foo.return {
println ($ptr) # entry-time snapshot of ptr
println ($ptr->value) # entry-time snapshot of ptr->value
println (@entry($ptr->value)) # same, more explicit
println (@entry($ptr)->value) # exit-time ->value dereference of
# entry-time pointer
}
See also <https://sourceware.org/bugzilla/show_bug.cgi?id=5973>, which
should eventually provide a non-explicit-array based passing of data.
- FChE