EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: ca_test bus error on solaris-sparc-gnu + fix
From: "Jeff Hill" <[email protected]>
To: "'Till Straumann'" <[email protected]>, <[email protected]>
Date: Tue, 9 Apr 2002 14:05:52 -0600
Till,

I think that we already eradicated that one along the way to the next
R3.14 release. See attached. Nevertheless, thanks for the heads up.

Jeff


----------------------------
Revision : 1.23
Date : 2002/1/15 20:2:45
Author : 'jhill'
State : 'Exp'
Lines : +2 -2
Description :
fixed to preserve 8 byte alignment

cvs diff -r 1.23 -r 1.22 tsFreeList.h (in directory
D:\users\hill\epicsDvl\epics\base\src\libCom\cxxTemplates\)
Index: tsFreeList.h
===================================================================
RCS file:
/net/phoebus/epicsmgr/cvsroot/epics/base/src/libCom/cxxTemplates/tsFreeL
ist.h,v
retrieving revision 1.23
retrieving revision 1.22
diff -r1.23 -r1.22
2c2
< /*  $Id: tsFreeList.h,v 1.23 2002/01/15 20:02:45 jhill Exp $
---
> /*  $Id: tsFreeList.h,v 1.22 2002/01/15 16:46:11 jhill Exp $
75d74
<     char pad[ sizeof ( T ) ];
76a76
>     char pad[ sizeof ( T ) ];

*****CVS exited normally with code 1*****


> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Till Straumann
> Sent: Thursday, April 04, 2002 9:04 PM
> To: [email protected]
> Cc: [email protected]
> Subject: ca_test bus error on solaris-sparc-gnu + fix
> 
> Hi all.
> 
> We got a SIGBUS (due to an alignment violation)
> running ca_test (and other apps)
> 
> EPICS:      3.14.0.beta1
> system:    solaris-sparc-gnu
> compiler: egcs-2.91.66
> 
> I found that
> 
> void *
> tsFreeList<T,N,DEBUG_LEVEL>::allocate(size_t)
> 
> may return improperly aligned memory:
> Because 'items' are declared
> 
> union {
>    tsFreeListItem<T,...> *pNext;
>    char                           pad[sizeof(T)];
> }
> 
> the compiler only makes sure 'items' fulfill
> the alignment requirements of pNext.
> 
> However, 'items' may need stricter alignment
> (which goes unnoticed because the 'item' pointer
> is later cast to (void*)): e.g. it may contain a double
> which on sparc needs to be 8byte aligned...
> 
> The proposed fix is to put the 'items' into a
> chunk first, so they get the chunk's alignment.
> 
> Unfortunately, this fix breaks binary compatibility
> - everything needs to be rebuilt.
> 
> Regards,
> 
> -- Till


Replies:
Re: ca_test bus error on solaris-sparc-gnu + fix Till Straumann
References:
ca_test bus error on solaris-sparc-gnu + fix Till Straumann

Navigate by Date:
Prev: Re: AO Record: New Drive Limit Mode? Andrew Johnson
Next: waveform record question Pedro Gigoux
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: ca_test bus error on solaris-sparc-gnu + fix Till Straumann
Next: Re: ca_test bus error on solaris-sparc-gnu + fix Till Straumann
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·