Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: dougd@dhome.iadfw.net (Doug Davis)
Subject: Re: Strange COFF format verion encountered
Date: 1998/09/06	[thread overview]
Message-ID: <3B8CF867A761F6A6.26664BA25912FACA.7CAE9F5F6DDD871E@library-proxy.airnews.net> (raw)
In-Reply-To: Pine.OSF.3.96.980905205501.24185A-100000@olympus.office.aol.com

In article <Pine.OSF.3.96.980905205501.24185A-100000@olympus.office.aol.com>,
Steve Rountree  <loki614@aol.net> wrote:
>> /s97_cgi.exe 
>> Unaligned access pid=22598 <s97_cgi.exe> va=0x12000000079 pc=0x3ff80005d20 
>> ra=0x3ff80005ce0 inst=0xa40b0010
>> Segmentation fault
>
>  I don't have an answer for you on your COFF version number strangeness but,
>I have had problems in the past with with some programs that I have written for
>DEC Unix 4.0x that produced similar error messages.  The suggestion from our
>Digital support was to compile with the -assume noaligned_objects.  In most
>cases this solved that error.  Hope this helps.


That will work, but it will make the code run way slow and possibly
obscure an actual coding error.. read on.....

Basically the alpha processor expects to do 64bit fetches all the
time.  When a pointer references something which can't be easily
fetched with a single memory access the processor generates an
unaligned trap and doesn't do the fetch.    The "noaligned_objects"
embeds code to go ahead and handle the alignment issue by invalidating
the data cache and fetching the required value across the misaligned
address(s).

Generally this is found when you reference a pointer into a structure
using a different type than the original reference.  Example:

struct fiz {
        char baz;
        short bar;
        short biz;
} foo;

main()
{
	long *biz;

        biz = (long *) &foo.bar;
        *biz = 1;
}



Get a copy of the alpha processor manual, it goes into great detail
on this activity.






  reply	other threads:[~1998-09-06  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-03  4:00 Strange COFF format verion encountered Marc Elsen
1998-09-05  4:00 ` Steve Rountree
1998-09-06  4:00   ` Doug Davis [this message]
1998-09-08  4:00     ` Bob Koehler
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox