Operating System - HP-UX
1753865 Members
7340 Online
108809 Solutions
New Discussion

crash in operator new when using aCC -AA

 
Venkat Chandrasekaran
Occasional Advisor

crash in operator new when using aCC -AA

compiler version aCC: HP ANSI C++ B3910B A.03.50

When running a program built with -AA -mt -D_RWSTD_MULTI_THREAD that uses a shared library built with same compiler options, I am getting a crash in operator new. any clues? TIA.

( 2) 0x7b00f598 _sigreturn [/usr/lib/libc.2]
( 3) 0x7a06f5fc operator new(unsigned long) + 0x3c [/usr/lib/libCsup.2]
( 4) 0x7a940274 dmType::dmType(const char *,dmType *,dmID,long) + 0x50 [./libdmcl40.sl]
( 5) 0x7a944654 dm_LoadType__FRQ2_3std13basic_istreamXTcTQ2_3std11char_traitsXTc__PFPcPv_P6dmTyp + 0x4d4 [./libdmcl40.sl]
( 6) 0x7a8f79d0 dmSession::ApplyForObject(long,dmID,dmObject *,dmBool &,dmBool &,dmPObjectImp *) + 0x3dc [./libdmcl40.sl]
( 7) 0x7a8f756c dmSession::ApplyForObject(const char *,dmID,dmObject *,dmBool &,dmBool &,dmPObjectImp *) + 0xf8 [./libdmcl40.sl]
( 8) 0x7a9c4de4 dmStoreCacheFetch(dmSessionCommon *,dmID) + 0x84 [./libdmcl40.sl]
( 9) 0x7a858ba0 dmNamedObjectCache::Fetch(dmSessionCommon *,dmID,dmBool,dmBool) + 0x290 [./libdmcl40.sl]
(10) 0x7aa972f0 cache_fetch_id::apply() + 0x5c [./libdmcl40.sl]
(11) 0x7a873424 dmReaderWriter::DoExclusive(dmClosure *) + 0x25c [./libdmcl40.sl]
(12) 0x7a8e9734 dmSafeCache::Fetch(dmSessionCommon *,dmID,dmBool,dmBool) + 0xd0 [./libdmcl40.sl]
(13) 0x7a8597bc dmNamedObjectCache::FetchName(dmSessionCommon *,dmID,dmBool) + 0xc0 [./libdmcl40.sl]
(14) 0x7aa9764c fetch_name_only::apply() + 0xc0 [./libdmcl40.sl]
(15) 0x7a873424 dmReaderWriter::DoExclusive(dmClosure *) + 0x25c [./libdmcl40.sl]
(16) 0x7a8e9eb0 dmSafeCache::FetchName(dmSessionCommon *,dmID,dmBool) + 0x12c [./libdmcl40.sl]
(17) 0x7a850564 dmFindInCache(dmSessionCommon *,dmID) + 0x94 [./libdmcl40.sl]
(18) 0x7a9c5298 dmStoreNameForId(dmSession *,dmID) + 0x90 [./libdmcl40.sl]
(19) 0x7a9273d0 dmSysObject::ComputeStorageType(char *,dmBool &,dmBool) + 0x3a0 [./libdmcl40.sl]
(20) 0x7a93157c dmSysObject::IsExternalStoreType(char *,dmID) + 0x104 [./libdmcl40.sl]
(21) 0x7a92649c dmSysObject::InputContent(char *,dmCntXfrMode,char *,long,dmBool,char *) + 0x15c [./libdmcl40.sl]
(22) 0x7a988980 dmAPIConnection::Exec(int,char *,char *) + 0x37e4 [./libdmcl40.sl]
(23) 0x7a751eec dmAPIContext::Exec(dmAPIConnection *,const dmAPICmd *,char *) + 0xd10 [./libdmcl40.sl]
(24) 0x7a7264cc dmAPIExecInternal + 0x210 [./libdmcl40.sl]
(25) 0x7a72604c dmAPIExec + 0x250 [./libdmcl40.sl]
(26) 0x000093e4 start_routine(void *) + 0x230 [./sample]
(27) 0x7adbbec8 __pthread_body + 0x44 [/usr/lib/libpthread.1]
(28) 0x7adc5494 __pthread_start + 0x14 [/usr/lib/libpthread.1]


1 REPLY 1
Mike Stroyan
Honored Contributor

Re: crash in operator new when using aCC -AA

The most common cause for a crash in new is a previous error in application code that corrupted the malloc data structures. That could be done by writing past the beginning or end of a data structure allocated with new or malloc. It could be done by calling delete or free with a bad address. You could look for that kind of problem by running the application under wdb and using the "Tools"->"Memory Check" features to look for bad malloc related behaviors.