[
https://issues.apache.org/jira/browse/XERCESC-1809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Boris Kolpackov updated XERCESC-1809:
-------------------------------------
Fix Version/s: 2.9.0
> seg fault on 64bit
> ------------------
>
> Key: XERCESC-1809
> URL: https://issues.apache.org/jira/browse/XERCESC-1809
> Project: Xerces-C++
> Issue Type: Bug
> Affects Versions: 2.8.0
> Environment: Gentoo-Linux (emerge --version -> Portage 2.1.4.4
> (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.21-gentoo-r4
> x86_64))
> Reporter: Guido Jäkel
> Fix For: 2.9.0
>
>
> I try to advance the Gentoo ebuild for dbxml to 2.4.13. For that, Xerces-C
> 2.8.0 and XQuilla is a prerequesite. The Gentoo ebuild for Xerces-C have been
> tweeked to include the patches for XQilla this days. Now i'm able to build
> dbxml on 32bit and 64bit. On 32bit it seems to work from the first tests, but
> on 64bit even a simple "dbxml -v" dies with an segmentation fault.
> With gdb, i got the following stack trace:
> #0 0x00002abcb1fe6c2c in ?? () from /lib/libc.so.6
> #1 0x00002abcb14f5de0 in xercesc_2_8::XMLString::parseInt () from
> /usr/lib/libxerces-c.so.28
> #2 0x00002abcb13b3bbd in xercesc_2_8::AbstractStringValidator::assignFacet ()
> from /usr/lib/libxerces-c.so.28
> #3 0x00002abcb13b411d in xercesc_2_8::AbstractStringValidator::init () from
> /usr/lib/libxerces-c.so.28
> #4 0x00002abcb144cfe0 in
> xercesc_2_8::ListDatatypeValidator::ListDatatypeValidator () from
> /usr/lib/libxerces-c.so.28
> #5 0x00002abcb141837e in
> xercesc_2_8::DatatypeValidatorFactory::createDatatypeValidator () from
> /usr/lib/libxerces-c.so.28
> #6 0x00002abcb14198f9 in
> xercesc_2_8::DatatypeValidatorFactory::expandRegistryToFullSchemaSet ()
> from /usr/lib/libxerces-c.so.28
> #7 0x00002abcb097e733 in XQillaPlatformUtils::initialize () from
> /usr/lib/libxqilla.so.4
> #8 0x00002abcb00d9fff in DbXml::Globals::initializeXmlPlatform () from
> /usr/lib/libdbxml-2.4.so
> #9 0x00002abcb00da53f in DbXml::Globals::initialize () from
> /usr/lib/libdbxml-2.4.so
> #10 0x00002abcb00df043 in DbXml::Manager::Manager () from
> /usr/lib/libdbxml-2.4.so
> #11 0x00002abcb00d8fca in DbXml::XmlManager::XmlManager () from
> /usr/lib/libdbxml-2.4.so
> #12 0x000000000040c259 in ?? ()
> #13 0x00002abcb1fd0b74 in __libc_start_main () from /lib/libc.so.6
> #14 0x000000000040ba39 in ?? ()
> #15 0x00007ffffad47148 in ?? ()
> #16 0x0000000000000000 in ?? ()
> From that, i *guess* that it break's HERE, because this looks like a
> libc-call to me.
> .../xerces-c-src/src/xercesc/util/XMLString.cpp:
> int XMLString::parseInt(const XMLCh* const toConvert
> , MemoryManager* const manager)
> {
> // If no string, or empty string, then it is a failure
> if ((!toConvert) || (!*toConvert))
> ThrowXMLwithMemMgr(NumberFormatException,
> XMLExcepts::XMLNUM_null_ptr, manager);
> XMLCh* trimmedStr = XMLString::replicate(toConvert, manager);
> ArrayJanitor<XMLCh> jan1(trimmedStr, manager);
> XMLString::trim(trimmedStr);
> unsigned int trimmedStrLen = XMLString::stringLen(trimmedStr);
> if ( !trimmedStrLen )
> ThrowXMLwithMemMgr(NumberFormatException,
> XMLExcepts::XMLNUM_null_ptr, manager);
> //the errno set by previous run is NOT automatically cleared
> errno = 0;
> char *nptr = XMLString::transcode(trimmedStr, manager);
> ArrayJanitor<char> jan2(nptr, manager);
> char *endptr;
> long retVal = strtol(nptr, &endptr, 10); <-----[HERE]
> // check if all chars are valid char
> if ( (endptr - nptr) != (int) trimmedStrLen)
> ThrowXMLwithMemMgr(NumberFormatException,
> XMLExcepts::XMLNUM_Inv_chars, manager);
> // check if overflow/underflow occurs
> if (errno == ERANGE)
> ThrowXMLwithMemMgr(NumberFormatException,
> XMLExcepts::Str_ConvertOverflow, manager);
> //
> // REVISIT: conversion of (long) to (int)
> // may truncate value on IA64
> return (int) retVal;
> }
> May please anybody give me a hint how to get it running on 64bit? Feel free
> to ask for further information you'll need,
> thank you
> Guido
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]