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/2634] New: printf incorrectly pushes arguments to %p formats on i686


$ stap -e 'probe begin{ printf("%p %d\n",-1,0) exit() }'
ffffffff 4294967295

It is apparant that -1 is being pushed on the stack as a 64-bit value, and then
the printf internals are pulling off only 32-bits for a pointer.  Thus when it
gets to the %d it is at the wrong position on the stack.

The translator needs to cast the -1 down to the pointer size in the call to
_stp_printf / _stp_sprintf.

-- 
           Summary: printf incorrectly pushes arguments to %p formats on
                    i686
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: joshua dot i dot stone at intel dot com


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

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