Dear Friends,
I need some help regarding to port our C++ Solaris 9, Studio 8 application to HP-UNIX 11i aCC environment.
Our same code in Solaris, after porting to HP-UNIX, exiting by the SIGBUS signal at some strange point, at the line, where we are doing "memset" of one of our 'big' structure (local variable, 74120 Bytes)
--------------------------------------
Program received signal SIGBUS, Bus error
si_code: 0 - BUS_UNKNOWN - Unknown Error.
[Switching to thread 3 (system thread 6992034)]
0x77f021f8 in <unknown_procedure> + 0xc0 () from /usr/lib/libc.2
(gdb) bt
#0 0x77f021f8 in <unknown_procedure> + 0xc0 () from /usr/lib/libc.2
#1 0x1664d0 in DIA_UTIL::_memset (s=0x77231248, c=0, n=74120)
at AAAOSWrapper.cpp:28
#2 0x104b44 in AAADiaMsgHandler::handleDiameterMessage (this=0x401b0128,
buffer=0x77230168 "\001", len=260, fd=14) at AAADiaMsgHandler.cpp:83
#3 0x628dc in AAAIfHandler::serviceRequest (this=0x40065668,
buffer=0x77230168 "\001", len=260, fd=14) at AAAIfHandler.cpp:704
#4 0x14746c in AAAThreadService::runThread (this=0x4008a0d8, inIndex=0)
--------------------------------------
Another thing we observed is that, HP gdb can not find any "code instruction" in the binary, at the line where we declared our variable, which was giving BUS error at 'memset'.
------------------------------------------------------------------------------- ---------
bash-2.03$ gdb dfn
HP gdb 5.4.0 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00
and target hppa1.1-hp-hpux11.00.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.4.0 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..
(gdb) break AAADiaMsgHandler.cpp:82
warning: Line 82 in file "AAADiaMsgHandler.cpp" does not have instructions. Plac
ing breakpoint on the next available source line.
Breakpoint 1 at 0x104b2c: file AAADiaMsgHandler.cpp, line 83 from ./obj/dfn.
------------------------------------------------------------------------------- ---------
We use the following procedure regarding Solaris to HPU porting.
1) Since we use POSIX system call, so do not face to change system API, apart from some SOCKET api signature like 'accept'.
2) compile option: aCC -g -v -DHP_UX -AA -z -ext +u1 -mt
3) link option: -lpthread -lrt -lm -lnsl
HPU Version: HP-UX telco03 B.11.23 U 9000/800 908196403 unlimited-user license
aCC Version: aCC: HP ANSI C++ B3910B A.03.70
If anyone can help me in this problem, I will be very helpful.
Thanks in advance,
Regards,
Nilanjan