Bug#642762: xulrunner-6.0: console flooded with unaligned access messages on ia64 (IA-64/IPF/Itanium) platform
Émeric Maschino
emeric.maschino at gmail.com
Tue Oct 4 18:11:17 UTC 2011
Sorry for the late reply.
2011/9/28 Mike Hommey <mh at glandium.org>:
> On Tue, Sep 27, 2011 at 10:32:17PM +0200, Émeric Maschino wrote:
>
> Thanks so in fact the error is on the next line, and is due to this
> code:
> inline PRBool Equals(const nsID& other) const {
> return
> ((PRUint64*) &m0)[0] == ((PRUint64*) &other.m0)[0] &&
> ((PRUint64*) &m0)[1] == ((PRUint64*) &other.m0)[1];
> }
>
> Mike
Wow! How did you figure this? From the assembly output?
I still understand what's wrong with this code. nsID is defined as:
struct nsID {
PRUint32 m0;
PRUint16 m1;
PRUint16 m2;
PRUint8 m3[8];
...
};
It seems 64-bit aligned to me.
And if I understand Equals code correctly, (PRUint64*)[0] is a 64-bit
word with packed data of m0, m1 and m2 (32+16+16 = 64 bits) and
(PRUint64*)[1] is another 64-bit word with m3 data (8*8 = 64 bits).
Am I right? How can this be unaligned then?
Émeric
More information about the pkg-mozilla-maintainers
mailing list