Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Unaligned access
@ 2003-03-06  6:27 Emmanuel STAPF [ISE]
  0 siblings, 0 replies; 21+ messages in thread
From: Emmanuel STAPF [ISE] @ 2003-03-06  6:27 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 21+ messages in thread
* Unaligned access
@ 2000-03-31  5:00 Kraisit Vittinanon
  2000-04-04  4:00 ` Oisin McGuinness
  0 siblings, 1 reply; 21+ messages in thread
From: Kraisit Vittinanon @ 2000-03-31  5:00 UTC (permalink / raw)


Hi,
    I am wondered what is the cause of the message
        Unaligned access to .....
    We got this message when running an inhouse program.  After we got this
message for a short time the system crash there is a message show that there
is memory fault occured.
    If you have any ideas about this, please give me any advice
Thank you,
Kraisit Vittinanon





^ permalink raw reply	[flat|nested] 21+ messages in thread
* Unaligned access
@ 1998-03-31  5:00 Allen M. Cohen
  1998-04-01  5:00 ` Joe Mario
  0 siblings, 1 reply; 21+ messages in thread
From: Allen M. Cohen @ 1998-03-31  5:00 UTC (permalink / raw)



We get many unaligned access errors from a AP when built under Dec Unix
4.0-D and as:
"cc -non_shared -Wf,_p8 -O -std -Olimit 3000"
When we build with as just "cc -g", there are no unaligned access
errors!
Is this a compiler bug?
Should I use uac to ignore unaligned access errors?
--
The views expressed are the author's and do not necessarily reflect the
official position of GTE or any of its subsidiaries.





^ permalink raw reply	[flat|nested] 21+ messages in thread
* unaligned access
@ 1996-11-15  5:00 gautam
  1996-11-16  5:00 ` Dirk Grunwald
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: gautam @ 1996-11-15  5:00 UTC (permalink / raw)



Hi,
	I know this question must already have been asked. I have 
searched the net, but nothing usefull. We are porting our product
to Digitals unix. We are getting unaligned accesses. We have
tried to do the following , we get the value of "pc" from the message
on the screen , eg    pc = 12345678  We the start "dbx" with our exe,
$dbx prog 	( where prog is the name of the exe)
inside dbx we do
0x12345678/i

this gives a name of the function, but the function is not part of
our code. We cant figure out who is calling this function.

So basically how do we figure out where the unaligned accesses
are occuring.

Also I have head there are sources existing, which when you link
with your exe, will cause a core dump to be generated at the
point where the unaligned access occurs. This would help.

Any input will be appreciated.
Thanks,

Gautam



^ permalink raw reply	[flat|nested] 21+ messages in thread
* unaligned access
@ 1995-05-20  4:00 Adrian Wenden
  1995-05-22  4:00 ` Eric Osborne
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Adrian Wenden @ 1995-05-20  4:00 UTC (permalink / raw)


Can anyone help?

I am running OSF 3.0 on an Alpha 400 and compiling using the native 5.0 C++ 
compiler.

The application:

One process creates an object (A). One of A's data members is a pointer to 
another object, B. Object A is then streamed to another process. The
receiving process performs some operations on Object A, obviously ignoring
the Object B pointer, and sends Object A back to the sending process.

When the application used to run on a 32-bit architecture, we cast Object
B's pointer to an unsigned long and used the network functions htonl to
convert the byte ordering before streaming, and ntohl on the receiving side
to alter the byte ordering back to the machine format. All worked fine, 
until we tried to port it to a 64-bit architecture.

The problem:

What happens now is that the htonl function only reads the first 4 bytes, 
and therefore corrupts Object B's 8 byte pointer value, making it useless
when Object A is returned to us. We then tried using a64l, and l64a functions
to convert the 64-bit address into a base64 string, and stream the string
instead of the unsigned representation. As far as the contents of Object 
A is concerned it is reconstructed correctly when it is returned from the
the remote process, however when we attempt to use the object we get 
'Unaligned Access pid=<pid no> = <exe name> va=332e31386bde pc = 120179b9c
ra = 120179b78 type = ldq. 

Help:

Has anyone had either, any experience of streaming 64-bit numbers across 
the network or come across an unaligned access message, and can explain to
me how I can determine what has become unaligned and how I could correct it?

Many thanks

Adrian Wenden



adrian@expersoft.com
 
Expersoft Corporation
San Diego, CA

(619) 546 4100 x45



^ permalink raw reply	[flat|nested] 21+ messages in thread
* unaligned access
@ 1994-02-05 21:21 Stefan Monnier
  1994-02-06  9:39 ` Jarkko Hietaniemi
  0 siblings, 1 reply; 21+ messages in thread
From: Stefan Monnier @ 1994-02-05 21:21 UTC (permalink / raw)



That will probably sound stupid, but I just can't get my programs to
stop when making an unaligned access. They just print a nice warning,
but that's all. No signals sent, nothing.

How can I make my programs to stop (or core dump) when making an
unaligned access ?


	Stefan
-- 

-----------------------------------------------------
-- On the average, people seem to be acting normal --
-----------------------------------------------------


^ permalink raw reply	[flat|nested] 21+ messages in thread
* unaligned access...
@ 1993-11-30 22:25 Roland Schemers
  1993-11-30 23:25 ` Matt Thomas
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Roland Schemers @ 1993-11-30 22:25 UTC (permalink / raw)


How do I track down an unligned accesses? I'm getting messages
like:

Unaligned access pid=1342 <tcl> va=14001651c pc=12001e420 ra=12001e3dc type=stq
Unaligned access pid=1342 <tcl> va=140016514 pc=12001e3f0 ra=12001e3dc type=ldq

I know I can turn off those messages with "uac", but I'd rather fix them.

thanks. Roland




-- 
Roland J. Schemers III            |    Networking Systems 
Systems Programmer                |    414 Sweet Hall  +1 (415) 723-6740 
Distributed Systems Operations    |    Stanford, CA 94305-3090
Stanford University               |    schemers@Slapshot.Stanford.EDU 


^ permalink raw reply	[flat|nested] 21+ messages in thread
* Unaligned access
@ 1993-02-23 15:55 Byron Jennings
  0 siblings, 0 replies; 21+ messages in thread
From: Byron Jennings @ 1993-02-23 15:55 UTC (permalink / raw)



Hello

I have been trying to get ghostscript working an Alpha running OSF1. With a bit
of playing I have got it to compile and it works --- except that it generates
hundred of Unaligned access messages when running on some files. I do mean
hundreds of messages. The generation and display signifcantly slows down the
speed of display.

Two questions.

1) Has anyone got ghostscript to work without the Unaligned access messages?

2) How does one turn off the Unaligned access message? A simple redirect of
stderr and stdout does not help.

Byron Jennings


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2003-03-06  6:27 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-06  6:27 Unaligned access Emmanuel STAPF [ISE]
  -- strict thread matches above, loose matches on Subject: below --
2000-03-31  5:00 Kraisit Vittinanon
2000-04-04  4:00 ` Oisin McGuinness
1998-03-31  5:00 Allen M. Cohen
1998-04-01  5:00 ` Joe Mario
1996-11-15  5:00 unaligned access gautam
1996-11-16  5:00 ` Dirk Grunwald
1996-11-20  5:00 ` Jeff Denham
1996-11-22  5:00   ` Curt Smith
1996-11-21  5:00 ` Anthony Berent
1995-05-20  4:00 Adrian Wenden
1995-05-22  4:00 ` Eric Osborne
1995-05-24  4:00 ` Vepa V Sirish
1995-05-25  4:00 ` John Wood
1994-02-05 21:21 Stefan Monnier
1994-02-06  9:39 ` Jarkko Hietaniemi
1993-11-30 22:25 Roland Schemers
1993-11-30 23:25 ` Matt Thomas
1993-12-01 12:06 ` Burkhard Neidecker-Lutz
1993-12-07  1:27 ` Jim Hurst
1993-02-23 15:55 Unaligned access Byron Jennings

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