Languages and Scripting
Showing results for 
Search instead for 
Do you mean 

C++ Coredump while exiting from the program

Occasional Advisor

C++ Coredump while exiting from the program

Hi We are facing core dump problem while exiting from the program.
We have the -mt option during compilation and linking, but still we are facing this problem.

The following is gdb trace.
HP gdb 3.2 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 3.2 (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.
..
Core was generated by `zrnevhmx'.
Program terminated with signal 11, Segmentation fault.

warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.

#0 0xc004d958 in pthread_mutex_destroy+0x18 () from /usr/lib/libpthread.1
(gdb) where
#0 0xc004d958 in pthread_mutex_destroy+0x18 () from /usr/lib/libpthread.1
#1 0xc1f1cb28 in __thread_mutex_free+0x40 () from /opt/.../pf3party/irp/lib/libc.2
#2 0xc22bb62c in _HPMutexWrapper::~_HPMutexWrapper+0x34 () from /opt/.../pf3party/irp/lib/libstd_v2.2
#3 0xc22b6f24 in __rw::__null_string_ref_rep,std::allocator,__rw::__string_ref_rep<:allocator>>>::~__null_string_ref_rep,std::allocator,__rw::__string_ref_rep<:allocator>>>+0x2c () from /opt/.../pf3party/irp/lib/libstd_v2.2
#4 0xc14b55cc in __shlTerm+0x290 () from /opt/.../pf3party/irp/lib/libCsup_v2.2
#5 0xc14b56a4 in __shlInit+0x44 () from /opt/.../pf3party/irp/lib/libCsup_v2.2
#6 0xc21bae38 in _shlInit+0x20 () from /opt/.../pf3party/irp/lib/libstd_v2.2
#7 0xc14b5020 in __shlinit+0xac () from /opt/.../pf3party/irp/lib/libCsup_v2.2
#8 0xc14b5324 in __callInitFuncFromHandle+0xf0 () from /opt/.../pf3party/irp/lib/libCsup_v2.2
#9 0xc14b7288 in _niam_body+0xc0 () from /opt/.../pf3party/irp/lib/libCsup_v2.2
#10 0xc14b735c in _niam+0x1c () from /opt/.../pf3party/irp/lib/libCsup_v2.2
#11 0xc1e84574 in exit+0x74 () from /opt/.../pf3party/irp/lib/libc.2

OS details:
B.11.11 U 9000/785 2009568404 unlimited-user license
aCC version: HP aC++ B3910B A.03.52
6 REPLIES
Frequent Advisor

Re: C++ Coredump while exiting from the program

Hello,

please make sure you built ALL the object files with -AA -mt, and that you linked the executable with -AA -mt.

Can you run chatr on your executable and post the output?

Regards
Cyrille

Honored Contributor Honored Contributor

Re: C++ Coredump while exiting from the program

Hi

sigsegv is normally a sign of stack overflow or corruption

Did this ever work

Has the kernel been changed or patches added since it ran well

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Occasional Advisor

Re: C++ Coredump while exiting from the program

Hi,
We have upgraded our compiler from aCC 3.31 to 3.52. This is the first time we are running after upgrading our compiler.

We have compiled and linked all the libraries and source with -AA and -mt
Honored Contributor Honored Contributor

Re: C++ Coredump while exiting from the program

Frequent Advisor

Re: C++ Coredump while exiting from the program

Sreenivas,

can you please attach the result of:
chatr
odump -comp

Thanks
Cyrille
Highlighted
Frequent Advisor

Re: C++ Coredump while exiting from the program

Also, what's your level of aC++ runtime?
swlist | grep -i ac++

Regards
Cyrille

PS: are you compiling / running on the same host?