From: mooney@dogbert.cc.ndsu.NoDak.edu (Tim Mooney)
Subject: Re: Unaligned access error.
Date: 1997/02/04 [thread overview]
Message-ID: <5d6rdp$9o4@dogbert.cc.ndsu.NoDak.edu> (raw)
In-Reply-To: 32F61D97.3D6A@wlv.iipo.gtegsc.com
In article <32F61D97.3D6A@wlv.iipo.gtegsc.com>,
Allen M. Cohen <amc@wlv.iipo.gtegsc.com> wrote:
> Tim Cochran wrote:
> >
> > Hello,
> >
> > I am compiling and running a program in C++ (gcc 2.7.2) under Digital UNIX
> > 3.2c. When I run the program I get Unaligned access errors. The program
> > does not crash, just print out these errors. Does anyone know what this
> > means? (Other programs I have written don't have this problem.)
> >
> > Thanks in advance,
> > Tim
> You need to step trough the program in gdb.
To expand on what Allen said ( :-) ), `man uac' to read about unaligned
accesses. Essentially, you're accessing data that's not aligned on the proper
byte boundaries.
As Allen indicated, the best way to find out where the problems are is to
run the program under the control of a debugger (dbx and ladebug work fine
too). From your prompt, as yourself (not root), do:
uac p sigbus
to cause unaligned accesses to generate a bus error. Then run your program
under control of gdb. Gdb will catch the bus error and show you exactly where
it happened.
BTW, this is all mentioned in the FAQ for this newsgroup.
Tim
--
Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J1, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
next prev parent reply other threads:[~1997-02-04 5:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-02-03 5:00 Unaligned access error Tim Cochran
1997-02-03 5:00 ` Allen M. Cohen
1997-02-03 5:00 ` Roland Kruse
1997-02-06 5:00 ` Mark Bartelt
1997-02-04 5:00 ` Tim Mooney [this message]
1997-02-04 5:00 ` Tim Cochran
1997-02-04 5:00 ` Alexander Kogan
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