[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: please cleanup your scratch space on vore

From: Camm Maguire
Subject: [Gcl-devel] Re: please cleanup your scratch space on vore
Date: 19 Jun 2002 16:05:15 -0400

Greetings!  OK, in looking at some old posts on debian-sparc, I've
found the very helpful tip:

>Compiling the failing application with the gcc-flag "-Wcast-align" may
>detect some of these problems. (The compiler itself should not misalign
>things, so casting is usually a major suspect.)

>If the application casts byte arrays into struct types (for example to
>decode packet contents for some network protocol), it might also help to
>declare the struct types as packed, using "__attribute__((__packed__))".
>Apart from avoiding padding within the struct, this will alert the
>compiler that the struct members may be misaligned. Code accessing the
>struct members will then be compiled to handle that situation.

-Wcast-aligned gives many warnings for gcl.  Is there a way I can
 globally align everything on 8 byte boundaries without having to
 modify each offending variable declaration with __attribute__

Take care,

Ben Collins <address@hidden> writes:

> On Wed, Jun 05, 2002 at 07:12:21PM -0400, Camm Maguire wrote:
> > Greetings!  Done.  BTW, did you get my note asking about alignment
> > requirements on Debian sparc?  I'm getting a SIGBUS in _IO_init when
> > gcl tries to build its image.  Pointers seem aligned on 8 byte
> > boundaries at the offending location anyway.  Puzzled...  What does
> > sparc require in terms of memory alignment?  Saw this come up with
> > dpkg recently.
> Not sure. If the pointers are 8byte aligned, all should be well. Could
> also be places where you are using casts to pointer from an integer of
> incorrect size. Have you searched for compiler warnings relating to
> that?
> -- 
> Debian     - http://www.debian.org/
> Linux 1394 - http://linux1394.sourceforge.net/
> Subversion - http://subversion.tigris.org/
> Deqo       - http://www.deqo.com/

Camm Maguire                                            address@hidden
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]