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/11266] New: var_expanding_visitor barfs on non-assignment lvalues


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.


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