[Bug runtime/5648] Unaligned access to memory in _stp_vsnprintf() on ia64
joshua dot i dot stone at intel dot com
sourceware-bugzilla@sourceware.org
Wed Apr 30 21:13:00 GMT 2008
------- Additional Comments From joshua dot i dot stone at intel dot com 2008-04-30 20:58 -------
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > Thanks, the patch was committed.
> >
> > Was the patch tested on any big-endian machines?
>
> No, unfortunately, I don't have any big-endian machines.
Neither do I, but maybe some of the IBM folks can try this out on PowerPC...
> > I think that the memcpys are assuming little-endian layout...
>
> Really? as far as I know, memcpy() is defined on each architecture. So I think
> it can work correctly on those machines.
I mean the way we're calling memcpy with &num. For size=8 this is ok, but on
smaller sizes I think this will fail. On a big-endian machine, this will copy
the most-significant bytes instead of the least. That's a much different result
than casting an uint64_t to a smaller size.
Or put another way, (uint32_t)num != *(uint32_t *)&num on a big-endian machine.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=5648
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Systemtap
mailing list