core dump after having built with -AA option (377 Views)
Reply
Occasional Advisor
Venkat Chandrasekaran
Posts: 10
Registered: ‎09-18-2003
Message 1 of 10 (377 Views)
Accepted Solution

core dump after having built with -AA option

I get a segmentation fault when running a program built with -AA option, HP-UX 11.0, compiler version 3.33. any clues? TIA.

$gdb dm_encrypt_password core
(gdb)where

#0 0xc152c5dc in pthread_mutex_destroy () from /usr/lib/libpthread.1
#1 0xc0208900 in __thread_mutex_free () from /usr/lib/libc.2
#2 0xc4135470 in _HPMutexWrapper::~_HPMutexWrapper () from /usr/lib/libstd_v2.2
#3 0x7ec5c in __rw::__string_ref,std::allocator>::~__string_ref,std::allocator> () from ./dm_encrypt_password
#4 0x7e5b8 in std::basic_string,std::allocator>::_C_getRep (this=0x7b031250, __cap=128,
__len=1) at /opt/aCC/include_std/string.cc:70
#5 0xc40a28b8 in std::basic_string,std::allocator>::basic_string,std::allocator> () from /usr/lib/libstd_v2.2
#6 0xc40fea08 in std::locale::name () from /usr/lib/libstd_v2.2
#7 0xc40a1bd0 in std::ctype::_C_initfacet () from /usr/lib/libstd_v2.2
#8 0xc40ff1ec in std::locale::_C_install_facet () from /usr/lib/libstd_v2.2
#9 0xc40fef64 in std::locale::_C_make_facet () from /usr/lib/libstd_v2.2
#10 0xc40f97cc in std::ios_base::Init::Init () from /usr/lib/libstd_v2.2
#11 0x7f9e0 in __sinit_main_cxx___3stdFv ()
from ./dm_encrypt_password
#12 0xc1ef77c4 in __mainHelper () from /usr/lib/libCsup_v2.2
#13 0xc1ef7b6c in _main () from /usr/lib/libCsup_v2.2
Please use plain text.
Esteemed Contributor
ranganath ramachandra
Posts: 375
Registered: ‎05-16-2003
Message 2 of 10 (377 Views)

Re: core dump after having built with -AA option

was the application built with the -mt compiler option ?
Please use plain text.
Occasional Advisor
Venkat Chandrasekaran
Posts: 10
Registered: ‎09-18-2003
Message 3 of 10 (377 Views)

Re: core dump after having built with -AA option

When I compile my source with -mt and -D_RWSTD_MULTI_THREAD flags for aCC, I get the following error:

Error 698: Exact position unknown; near ["dmobject.cxx", line 1239]. # The declarations "void *__throwTp_Q2_4__rw17__rw_thread_error[5]" and "void
*std::__throwTp_Q2_4__rw17__rw_thread_error[5]" are both visible and neither is preferred under the name lookup rules.
Error 698: Exact position unknown; near ["dmobject.cxx", line 1239]. # The declarations "void *__throwTp_Q2_4__rw17__rw_thread_error[5]" and "void
*std::__throwTp_Q2_4__rw17__rw_thread_error[5]" are both visible and neither is preferred under the name lookup rules.
Error 698: Exact position unknown; near ["dmobject.cxx", line 1239]. # The declarations "void *__throwTp_Q2_4__rw17__rw_thread_error[5]" and "void
*std::__throwTp_Q2_4__rw17__rw_thread_error[5]" are both visible and neither is preferred under the name lookup rules.
Error 698: Exact position unknown; near ["dmobject.cxx", line 1239]. # The declarations "void *__throwTp_Q2_4__rw17__rw_thread_error[5]" and "void
*std::__throwTp_Q2_4__rw17__rw_thread_error[5]" are both visible and neither is preferred under the name lookup rules.

Can anyone tell me how do i fix this?

Thanks!
Please use plain text.
Esteemed Contributor
ranganath ramachandra
Posts: 375
Registered: ‎05-16-2003
Message 4 of 10 (377 Views)

Re: core dump after having built with -AA option

i guess its obvious to you that this is a problem in the roguewave include files under /usr/include_std/rw. have you made any progress on this ?

i'm trying to see if someone in the aCC team has an answer. you may get a direct response from the developers themselves on the cxx-dev mailing list. you can sign up at http://h21007.www2.hp.com/dspp/ml/ml_MailingLists_IDX/1,1275,,00.html#24 .
Please use plain text.
Occasional Advisor
Namrata
Posts: 5
Registered: ‎01-05-2005
Message 5 of 10 (377 Views)

Re: core dump after having built with -AA option

Hi Venkat,

I too am trying to compile & link my code on hpux and am facing similar problem. The errors that I have encountered are:

Program received signal SIGABRT, Aborted.
0x6ffae8a0 in kill+0x10 () from /usr/lib/libc.2
(gdb) where
#0 0x6ffae8a0 in kill+0x10 () from /usr/lib/libc.2
#1 0x6ff4b7bc in raise+0x24 () from /usr/lib/libc.2
#2 0x6ff8be5c in abort_C+0x16c () from /usr/lib/libc.2
#3 0x6ff8beb4 in abort+0x1c () from /usr/lib/libc.2
#4 0x6fd6b488 in std::terminate+0x38 () from /usr/lib//libCsup_v2.2
#5 0x6fd6bfa8 in RethrowException+0x88 () from /usr/lib//libCsup_v2.2
#6 0x6fd6c2f0 in __rethrow+0x134 () from /usr/lib//libCsup_v2.2
#7 0x26544 in devtech_private::::__sinit_UnicodeConvers
ion_cpp+0x60 ()
#8 0x6fd6f1a8 in __mainHelper+0x40 () from /usr/lib//libCsup_v2.2
#9 0x6fd6f4dc in _main+0xec () from /usr/lib//libCsup_v2.2

================

Compiling options:
C_MACRO = -D UNIX_ENV
OPTIMIZATION_CFLAGS = -O
OTHER_CFLAGS = -g -AA
==========
Linking options:

$(LINK) -AA -o $(TARGET_DIR)/$(TARGET) \
$(PROJECT_OBJECTS) \
-L $(PRJROOT)/external/zstring/binaries/hpux-gcc
32-release \
-lzstring \
-L $(PRJROOT)/external/cppunit/binaries/hpux \
-lcppunit \
-lcppunitconsole \
-ldebugconsole \
-lc

======================
LINK & CC being = /opt/aCC/bin/aCC

Looking at the above output, could you suggest some measures to get rid of it. Do I need to include some standard C++ libraries or the like (may be a path to libc.2 and so on).
Would be grateful if you could have a look. I have been struggling against this since quite long and my deadline is quite close.

Regards,
Namrata

Please use plain text.
Occasional Visitor
Ramesh Thummalapenta_1
Posts: 4
Registered: ‎03-07-2005
Message 6 of 10 (377 Views)

Re: core dump after having built with -AA option

Venkat/Namrata,
Could you get a resolution to this segmentation fault issue?
Please use plain text.
Esteemed Contributor
ranganath ramachandra
Posts: 375
Registered: ‎05-16-2003
Message 7 of 10 (377 Views)

Re: core dump after having built with -AA option

it seems that adding "-mt" to the compiler/link options solved the segfault problem for venkat. have you tried that ?
Please use plain text.
Occasional Advisor
Namrata
Posts: 5
Registered: ‎01-05-2005
Message 8 of 10 (377 Views)

Re: core dump after having built with -AA option

Hi Venkat/Ramesh,

I have tried using the -mt compiler option. But the problem still persists,
get a abort /dump error.

Could you please help.

Regards,
Namrata
Please use plain text.
Occasional Advisor
Venkat Chandrasekaran
Posts: 10
Registered: ‎09-18-2003
Message 9 of 10 (377 Views)

Re: core dump after having built with -AA option

Sorry, it took me a while to reply. If I remember correctly, I had to move to aCC 3.50 to get this problem resolved. I believe I was specifying the runtime libs in the linker command line that caused a conflict - just used -mt option during compile and link and aCC picked up the right set of libs to use.
Please use plain text.
Occasional Visitor
Scott Exton
Posts: 1
Registered: ‎05-02-2005
Message 10 of 10 (377 Views)

Re: core dump after having built with -AA option

I am seeing a very similar problem to that which was seen by Namrata and was just wanting to see if the move to the 3.50 version of the aCC compiler did the trick for Namrata (I am currently using version 3.30).
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation