semantic error: multiple addresses for ...

Roland McGrath roland@redhat.com
Fri Aug 20 20:39:00 GMT 2010


This error seems inherently wrong to me.  Multiple matches is a feature,
not an error.

Take the attached source and script.  I'm using gcc-4.4.4-10.fc13.x86_64,
but it probably doesn't matter much.

	$ gcc -g -O1 -o ip1 implicitptr.c
	$ ./run-stap implicitptr.stp ./ip1 -c ./ip1
	semantic error: multiple addresses for implicitptr.c:27 (try implicitptr.c:26 or implicitptr.c:28)
	semantic error: no match while resolving probe point process("/tmp/implicitptr-O1").statement("bar@*+4")
	semantic error: libdw failure (dwarf_entrypc): no matching address range
	semantic error: no match while resolving probe point process("/tmp/implicitptr-O1").statement("add@*+4")
	semantic error: no match while resolving probe point process("/tmp/implicitptr-O1").statement("add@*+7")
	Pass 2: analysis failed.  Try again with another '--vp 01' option.

The line in question is in an inlined function (add) that is inlined twice
into the same caller (bar).  The correct result is two probe locations, one
in each inlined instance.

Frank tells me this error diagnosis was intended for a case where a single
source line got its code spread out throughout the function so that there
would appear to be multiple probe locations for one semantic event.  I have
not seen an example of this.  IMHO, breaking the valid situations of one
source line authentically generating multiple different compiled code
locations that should be probed is far worse than failing to diagnose that
weirder case.

One possibility could be to use the is_stmt state of the line records here.
But in the absence of any of the examples that motivated the current (IMHO
wrong) behavior, it's hard to get very concrete on that.


Thanks,
Roland

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: implicitptr.c
URL: <http://sourceware.org/pipermail/systemtap/attachments/20100820/964af4f5/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: implicitptr.stp
URL: <http://sourceware.org/pipermail/systemtap/attachments/20100820/964af4f5/attachment.ksh>


More information about the Systemtap mailing list