This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/14310] New: better error messages on recursive alias expansion
- From: "smakarov at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Fri, 29 Jun 2012 14:01:51 +0000
- Subject: [Bug translator/14310] New: better error messages on recursive alias expansion
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=14310
Bug #: 14310
Summary: better error messages on recursive alias expansion
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
AssignedTo: systemtap@sourceware.org
ReportedBy: smakarov@redhat.com
Classification: Unclassified
When an infinite recursive alias expansion goes through an alias suffix, it is
caught correctly just as for a regular alias expansion. However, the error
messages that result can be a bit unfocused:
[root:/opt/codebase/systemtap]:stap$ cat testsuite/semko/alias_suffixes06.stp
#! stap -p2
# Test detection of indefinite recursion when suffixes are involved.
# a.b.c --> q.c --> r.c.c -> a.b.c.c -> ... -> a.b.c.c.c.c.c....
probe r = a.b { }
probe q.c = r.c.c { }
probe a.b = q { }
probe a.b.c { print("what?") }
[root:/opt/codebase/systemtap]:stap$ stap testsuite/semko/alias_suffixes06.stp
semantic error: while resolving probe point: identifier 'r' at
testsuite/semko/alias_suffixes06.stp:7:13
source: probe q.c = r.c.c { }
^
semantic error: Recursive loop in alias expansion of q.c.c at
testsuite/semko/alias_suffixes06.stp:8:13: identifier 'c' at :7:15
source: probe q.c = r.c.c { }
^
semantic error: while resolving probe point: identifier 'a' at :9:7
source: probe a.b.c { print("what?") }
^
semantic error: no match: identifier 'c' at :9:11
source: probe a.b.c { print("what?") }
^
Pass 2: analysis failed. Try again with another '--vp 01' option.
Here, the probe point reported for the "recursive loop" error is perhaps a bit
too deep down in the alias expansion, and the "no match" error is completely
unnecessary. The error handling for this case needs to be tweaked to produce
more informative output.
The ordinary recursive expansion error currently also has the same problem:
[root:/opt/codebase/systemtap]:stap$ stap -e 'probe a = b { } probe b = a { }
probe b { println("foo") }'
semantic error: while resolving probe point: identifier 'a' at <input>:1:27
source: probe a = b { } probe b = a { } probe b { println("foo") }
^
semantic error: Recursive loop in alias expansion of a at <input>:1:27
semantic error: while resolving probe point: identifier 'b' at :1:11
source: probe a = b { } probe b = a { } probe b { println("foo") }
^
semantic error: no match
semantic error: while resolving probe point: identifier 'b' at :1:39
source: probe a = b { } probe b = a { } probe b { println("foo") }
^
Pass 2: analysis failed. Try again with another '--vp 01' option.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.