Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

no mapping at the fault address error while accessing the string variable

807575Jun 17 2008 — edited Jul 1 2008
Hi
we have a application which runs fine on AIX and HP but is throwing error on SOLARIS.
the application runs well (and use of string variables are also working fine ) till it hits Zone.cpp file
where the string variable is not getting initialized and throws no mapping at the fault address


the code snippet is as follows

#include <string>
#include <vector>

const string ZONE_ATTR_TYPE_ZN("ZN");
const string ZONE_ATTR_TYPE_FC("FC");
const string ZONE_ATTR_TYPE_ST("ST");


void Zone::AddAttributeValueAndCountryCode(const string &attributeValue,
Int attribSeq,
const string &countryCode,
ZoneSearchLocMap& zoneSearchLocMap)
{
string key = "";

...........

if ((_attributeType == ZONE_ATTR_TYPE_FC) ||
(_attributeType == ZONE_ATTR_TYPE_CT))
{
key = _attributeType+DELIM+attributeValue;


we are running it on
CC: Sun C++ 5.9 SunOS_sparc Patch 124863-04 2008/04/16

compiled with these option
-g0 -xspace -KPIC -D_XPG5 -m32 -xarch=sparcvis -mt -DNCURSES -DEXC_HANDLING -DRW_NO_BOOL

and the created the execuatble with these option
-i -z rescan -g0 -xspace -mt -D_XPG5 -m32 -xarch=sparcvis -mt -DNCURSES -DEXC_HANDLING -DRW_NO_BOOL -lpthread -lsocket -lnsl -ldl -lposix4 -lCrun -lCstd -lc -lm -lnsl -lsocket

the dbx output

t@1 (l@1) program terminated by signal SEGV (no mapping at the fault address)
where -h
Current function is Zone::AddAttributeValueAndCountryCode
56 if ((_attributeType == ZONE_ATTR_TYPE_FC) ||
(dbx) where -h
current thread: t@1
=>[1] Zone::AddAttributeValueAndCountryCode(this = 0x194c088, attributeValue = CLASS, attribSeq = 1, countryCode = CLASS, zoneSearchLocMap = CLASS), line 56 in "Zone.cpp"
[2] ZoneLoader::Load(trans = CLASS, zoneList = CLASS, prZoneList = CLASS, zoneSearchLocMap = STRUCT, planningCompany = 0x1890f20), line 90 in "ZoneLoader.cpp"
[3] ZoneManager::ZoneManager(this = 0x1933e28, shipperId = 1000, consDBConnection = CLASS), line 24 in "ZoneManager.cpp"
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 29 2008
Added on Jun 17 2008
10 comments
899 views