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/11360] New: Bad interaction between -L and @defined


$ stap -l syscall.poll
syscall.poll

$ stap -L syscall.poll
semantic error: unable to find local 'timeout' near pc 0xffffffff8112ccab in
sys_poll(fs/select.c) (alternatives: ufds nfds timeout_msecs end_time to ret):
identifier '$timeout' at /usr/local/share/systemtap/tapset/syscalls2.stp:353:57
        source: 	timeout = (@defined($timeout_msecs) ? $timeout_msecs : $timeout)
                	                                                       ^
semantic error: unable to find local 'timeout' near pc 0xffffffff8112ccab in
sys_poll(fs/select.c) (alternatives: ufds nfds timeout_msecs end_time to ret):
identifier '$timeout' at :355:48
        source: 		(@defined($timeout_msecs) ? $timeout_msecs : $timeout))
                		                                             ^
semantic error: probe_1906 with unresolved type: identifier 'timeout' at :353:2
        source: 	timeout = (@defined($timeout_msecs) ? $timeout_msecs : $timeout)
                	^
semantic error: probe_1906 with unresolved type: identifier 'argstr' at :354:2
        source: 	argstr = sprintf("%p, %d, %d", $ufds, $nfds,
                	^
syscall.poll name:string ufds_uaddr:long nfds:long timeout:unknown
argstr:unknown $ufds:struct pollfd* $nfds:unsigned int $timeout_msecs:long int
[1]

(The [1] is my shell prompt reporting the non-zero exit code)

The problem stems from the option parser:

  case 'L':
    s.listing_mode_vars = true;
    s.unoptimized = true; // This causes retention of variables for listing_mode

Without optimization, expressions like the ternary "@defined(x)?x:y" won't strip
out whichever of x or y is invalid, and the type-resolution phase takes notice.

-- 
           Summary: Bad interaction between -L and @defined
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: jistone at redhat dot com


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

------- 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]