From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,cd49484d3fd9f5b3,start X-Google-Attributes: gidfa528,public X-Google-Thread: fee84,cd49484d3fd9f5b3,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 2003-03-05 22:27:32 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: manus@eiffel.com (Emmanuel STAPF [ISE]) Newsgroups: comp.unix.osf.osf1,comp.unix.tru64 Subject: Unaligned access Date: 5 Mar 2003 22:27:31 -0800 Organization: http://groups.google.com/ Message-ID: <2f47c0e6.0303052007.440571b5@posting.google.com> NNTP-Posting-Host: 192.36.1.253 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1046932052 16197 127.0.0.1 (6 Mar 2003 06:27:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 6 Mar 2003 06:27:32 GMT Xref: archiver1.google.com comp.unix.osf.osf1:164 comp.unix.tru64:9670 I'm getting an unaligned access error message in my program. Unfortunately it only occurs when `-O2' is specified. I therefore had to compile with `-O2 -g3' in order to debug it, but the location it reports the unaligned access is in a call to memcpy and there does not seem to be a way to access the value of locals and arguments. The line of code looks like: memcpy (dest, &i, sizeof(int)); where `dest' is a char *, most likely unaligned since it is an arbitrary memory area. where `i' is an argument passed to the function in which `memcpy' is called. Any hint on how to solve this, Thanks, Manu uname -a reports: OSF1 tellus.enea.se V5.1 1885 alpha gemc_cc -V reports: Compaq C V6.4-009 on Compaq Tru64 UNIX V5.1A (Rev. 1885) cc -v reports: Compaq C V6.4-214 (dtk) on Compaq Tru64 UNIX V5.1A (Rev. 1885) Compiler Driver V6.4-014 (dtk) cc Driver