public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "jistone at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sources.redhat.com
Subject: [Bug translator/11360] New: Bad interaction between -L and @defined
Date: Tue, 09 Mar 2010 02:17:00 -0000	[thread overview]
Message-ID: <20100309021709.11360.jistone@redhat.com> (raw)

$ 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.

             reply	other threads:[~2010-03-09  2:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09  2:17 jistone at redhat dot com [this message]
2010-03-09  2:34 ` [Bug translator/11360] " jistone at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100309021709.11360.jistone@redhat.com \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).