public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/11266] New: var_expanding_visitor barfs on non-assignment lvalues
@ 2010-02-10  0:12 jistone at redhat dot com
  2010-05-08 16:09 ` [Bug translator/11266] " jistone at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: jistone at redhat dot com @ 2010-02-10  0:12 UTC (permalink / raw)
  To: systemtap

This family of visitors tries to deal with $target variables as lvalues, but
there are more way to be an lvalue than just assignment.  "++", "--", and
"delete" also have lvalues, but aren't handled by var_expanding_visitor.

$ stap -e 'probe syscall.read { ++$fd }' -p2 -g
stap: ../tapsets.cxx:2522: virtual void
dwarf_var_expanding_visitor::visit_target_symbol(target_symbol*): Assertion
`!target_symbol_setter_functioncalls.empty()' failed.
Aborted (core dumped)

$ stap -e 'probe syscall.read { delete $fd }' -p2 -g
stap: ../tapsets.cxx:2522: virtual void
dwarf_var_expanding_visitor::visit_target_symbol(target_symbol*): Assertion
`!target_symbol_setter_functioncalls.empty()' failed.
Aborted (core dumped)

These should at least be thrown as semantic errors instead of crashing. 
("Cannot increment target variable" / "Cannot delete target variable")

You can also fool it by mixing lvalue types, e.g.

$ stap -e 'probe syscall.read { ++$fd = 42 }' -p2 -g
stap: ../tapsets.cxx:1901: virtual void
var_expanding_visitor::visit_assignment(assignment*): Assertion `new_left ==
fcall' failed.
Aborted (core dumped)

-- 
           Summary: var_expanding_visitor barfs on non-assignment lvalues
           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=11266

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug translator/11266] var_expanding_visitor barfs on non-assignment lvalues
  2010-02-10  0:12 [Bug translator/11266] New: var_expanding_visitor barfs on non-assignment lvalues jistone at redhat dot com
@ 2010-05-08 16:09 ` jistone at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: jistone at redhat dot com @ 2010-05-08 16:09 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From jistone at redhat dot com  2010-05-07 19:33 -------
commit 87214addd97c3503ea671164d252e98fd11d3ce8

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-07 19:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-10  0:12 [Bug translator/11266] New: var_expanding_visitor barfs on non-assignment lvalues jistone at redhat dot com
2010-05-08 16:09 ` [Bug translator/11266] " jistone at redhat dot com

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