Operating System - HP-UX
1753852 Members
8074 Online
108808 Solutions
New Discussion

reg: Data Alignment Issues with HP ANSI C compiler B3910B A.05.50 [Jan 06 2003] on HP Itanium

 
SOLVED
Go to solution
Srikrishna Erra
Advisor

reg: Data Alignment Issues with HP ANSI C compiler B3910B A.05.50 [Jan 06 2003] on HP Itanium

Hello all,
We are getting Coredump(Bus Error) when our application is trying use one of our product's API.

Coredump occured when the application is passing an unligned data.

But the product which is used by our application is built by having +u1 -- allow unaligned data(in the compile & link command).

We are using HPUX IA Machine having below confifuration.

$ uname -a
HP-UX eshpx800 B.11.23 U ia64 0091977010 unlimited-user license
$ /vob/hpux-intel/opt/ansic/bin/cc -V
/cc: HP aC++/ANSI C B3910B A.05.50 [Jan 06 2003]


But when we execute our application on other HPUX IA machine which have Compiler of latest version then there is no Coredump(Bus Error).

Misaligned data is allowed as our product uses "+u1".

Here is the configuration of second machine that have latest compiler.
# uname -a
HP-UX hyitnm02 B.11.23 U ia64 0125848204 unlimited-user license

# /opt/ansic/bin/cc -V
cc: HP aC++/ANSI C B3910B A.06.05 [Jul 25 2005]
#

Here difference between two machines is the compiler. Second machine has latest version of compiler i.e. HP aC++/ANSI C B3910B A.06.05.

My concern is
Are there any Data Alignment issues OR issues with using "+u1" option with Compiler version "HP aC++/ANSI C B3910B A.05.50" where the same got fixed with latest compiler version i.e. "HP aC++/ANSI C B3910B A.06.05."

Please let me know if there are any issues with using "+u1" flag with "HP aC++/ANSI C B3910B A.05.50" Compiler.
1 REPLY 1
Dennis Handly
Acclaimed Contributor
Solution

Re: reg: Data Alignment Issues with HP ANSI C compiler B3910B A.05.50 [Jan 06 2003] on HP Itanium

>is built by having +u1 - allow unaligned data.

(This doesn't work if you pass the unaligned data to some other shlib that wasn't compiled with +u1.)

A.05.50 (aCC5) is NOT supported! The latest version is A.06.24 with A.06.25 coming out shortly.

>that have latest compiler. ... A.06.05 [Jul 25 2005]

This is also obsolete.

>Are there any data alignment issues OR issues with using "+u1" option with A.05.50

Very possible, especially with complex, multi-level dereferencing expressions.

>Please let me know if there are any issues with using "+u1" flag with A.05.50.

It appears you found one.
I recommend you upgrade your compiler to the latest.