This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/5648] Unaligned access to memory in _stp_vsnprintf() on ia64
- From: "joshua dot i dot stone at intel dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 30 Apr 2008 20:58:30 -0000
- Subject: [Bug runtime/5648] Unaligned access to memory in _stp_vsnprintf() on ia64
- References: <20080119000650.5648.mhiramat@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- 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.