[Spread-users] unaligned int access on sparc solaris
drago.krznaric at se.transport.bombardier.com
drago.krznaric at se.transport.bombardier.com
Mon Aug 20 10:35:44 EDT 2007
Hi all,
I just downloaded spread-4.0.0 and compiled it for sun sparc solaris.
Unfortunately, I got a bus error when starting spread daemon, caused by
the following
macro in stdutil.c:
# define stdhcode_sfh_get16bits(d) ( ((stduint32) *((const stduint8 *)(d)
+ 1) << 8) | *(const stduint32 *)(d) )
It is the ' *(const stduint32 *)(d) ' that sparc doesn't like when d
doesn't point to an aligned integer.
For me it looks as if one tries to flip the bytes in a short (big endian
to little endian), in which case the following
should do the same thing but without the bus error:
# define stdhcode_sfh_get16bits(d) ( ((stduint32) *((const stduint8 *)(d)
+ 1) << 8) | (stduint32)*(const stduint8 *)(d) )
Has anybody else done a similar change?
/Drago
_______________________________________________________________________________________________________________
This e-mail communication (and any attachment/s) may contain confidential
or privileged information and is intended only for the individual(s) or
entity named above and to others who have been specifically authorized to
receive it. If you are not the intended recipient, please do not read,
copy, use or disclose the contents of this communication to others. Please
notify the sender that you have received this e-mail in error by reply
e-mail, and delete the e-mail subsequently. Please note that in order to
protect the security of our information systems an AntiSPAM solution is in
use and will browse through incoming emails.
Thank you.
_________________________________________________________________________________________________________________
Ce message (ainsi que le(s) fichier/s), transmis par courriel, peut
contenir des renseignements confidentiels ou protégés et est destiné à
l?usage exclusif du destinataire ci-dessus. Toute autre personne est par
les présentes avisée qu?il est strictement interdit de le diffuser, le
distribuer ou le reproduire. Si vous l?avez reçu par inadvertance,
veuillez nous en aviser et détruire ce message. Veuillez prendre note
qu'une solution antipollupostage (AntiSPAM) est utilisée afin d'assurer la
sécurité de nos systems d'information et qu'elle furètera les courriels
entrant.
Merci.
_________________________________________________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.spread.org/pipermail/spread-users/attachments/20070820/d9f28f4d/attachment.html
More information about the Spread-users
mailing list