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/13283] script -> C translator incorrect comparison (using ==) of kernel_string() operands


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

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
                 CC|                            |fche at redhat dot com

--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> 2011-10-12 16:31:29 UTC ---
Could you attach the actual stap script too? 
Please be aware that in a .return probe, $variables refer to entry-time
snapshots of the expression, so if those values were changed during
the function's execution, you may get misleading results.

   printf("Equal? %X\n",
      kernel_char($dev1->scsi3addr) ==
      kernel_char($dev2->scsi3addr));

You may have intended something like

      kernel_char(@entry($dev1)->scsi3addr) == 
      kernel_char(@entry($dev2)->scsi3addr)

where the scsi3addr dereferencing is explicitly done at return time.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


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