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 translator/11504] Wrong location for inferred type conflict in error message


------- Additional Comments From chwang at redhat dot com  2010-04-16 19:36 -------
I was mistaken, size is not a global in nfs.stp. 'size' is a local parameter
taken from the probe point nfs.aop.readpages.{,return}. 

I could fix this by giving tokens an exp_type attribute, or (hand-waving) some
sort of context-filtering to determine if two tokens are visible to each other.
Not all tokens can have a sensible exp_type.

On a side note, declaring size as global in nfs.stp gets rid of this problem.
Caveat: type mismatch with size as a global creates a longer error:

semantic error: probe_1978 with type mismatch (long vs. string): identifier
'size' at /usr/local/share/systemtap/tapset/nfs.stp:875:13
        source:             size = $return
                            ^
semantic error: probe_1978 type first inferred here (string): identifier 'size'
at temp/11504.stp:2:22
        source: 	printf("size=%s\n", size);
                	                    ^
semantic error: probe_1980 with type mismatch (string vs. long): identifier
'nr_to_write' at /usr/local/share/systemtap/tapset/nfs.stp:1004:16
        source:         size = nr_to_write
                               ^
semantic error: probe_1980 type first inferred here (long): identifier
'nr_to_write' at :996:9
        source:         nr_to_write = $wbc->nr_to_write

-- 


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


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