[Spread-users] solaris SIGBUS

Ed Holyat eholyat at olf.com
Wed Jan 24 15:32:51 EST 2007


I am getting a bus error on Solaris, I believe the area of the problem
is in the change listed below.  A SIGBUS usually indicates an alignment
error.

< #  define stdhcode_sfh_get16bits(d) ( ((stduint16) *((const stduint8
*)(d) + 1) << 8) + *(const stduint8 *)(d) )
---
> #  define stdhcode_sfh_get16bits(d) ( ((stduint32) *((const stduint8
*)(d) + 1) << 8) | *(const stduint32 *)(d) )

You will get away with it on a Little Endian (intel), but breaks on a
Big Endian (sparc). 
stdhcode_sfh_get16bits should be changed as below?

> #  define stdhcode_sfh_get16bits(d) ( ((stduint32) *((const stduint8
*)(d) + 1) << 8) | *(const stduint8 *)(d) )



Ed Holyat
Open Link Financial, Inc.
(516) 227-6600 x 231
www.olf.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.spread.org/pipermail/spread-users/attachments/20070124/c8e854ec/attachment.html 


More information about the Spread-users mailing list