Sriram created XERCESC-2184:
-------------------------------

             Summary: Application crashes on Solaris-Sparc 11.3 when parsing 
XML document with schema validation
                 Key: XERCESC-2184
                 URL: https://issues.apache.org/jira/browse/XERCESC-2184
             Project: Xerces-C++
          Issue Type: Bug
          Components: DOM
    Affects Versions: 3.2.2
         Environment: Solaris Sparc 11.3 with Solaris Studio 12.6 compiler tool 
set
            Reporter: Sriram


Hi,

I built Xerces-C 3.2.2 static library on Solaris Sparc 11.3 with Solaris Studio 
12.6 compiler using CMAKE build system. The static library was built, and I 
could build an executable statically linked to the Xerces-C 3.2.2 static 
library. However, when running the executable on Solaris Sparc 11.3 system, it 
immediately crashed with "abort" signal. The backtrace looks as follows. It 
appears that the parser is throwing InvalidDatatypeException, and even though 
my application has catch (...), the exception is NOT being caught. 

 

Here is the CMAKE configure command to build Xerces-C 3.2.2 on Solaris Sparc 
11.3:

cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=../solaris-sparc 
-Dnetwork:BOOL=OFF -Dxmlch-type=uint16_t -DBUILD_SHARED_LIBS:BOOL=OFF 
-DCMAKE_CXX_FLAGS:STRING="-m64 -std=c++11 -KPIC“ -DCMAKE_C_FLAGS:STRING="-m64" 
-Dtranscoder=iconv ../

 

Please find attached source code of this simple test application. 

Here is the back trace:

terminate called after throwing an instance of 
'xercesc_3_2::InvalidDatatypeValueException'

t@1 (l@1) signal ABRT (Abort) in __lwp_sigqueue at 0xffffffff7d74e894

0xffffffff7d74e894: __lwp_sigqueue+0x0008:      bcc,a,pt  
%icc,__lwp_sigqueue+0x18      ! 0xffffffff7d74e8a4

Current function is __gnu_cxx::__verbose_terminate_handler

dbx: warning: can't find file 
"/builds/ul11u3sru-gate/components/gcc7/gcc-7.3.0/libstdc++-v3/libsupc++/vterminate.cc"

dbx: warning: see `help finding-files'

(dbx) where                                           

current thread: t@1

  [1] __lwp_sigqueue(0x0, 0x1, 0x6, 0x0, 0xffffffffffffffff, 0x0), at 
0xffffffff7d74e894

  [2] raise(0x6, 0xffffffff7fffa1c0, 0x5, 0x5, 0x0, 0x0), at 0xffffffff7d6f7c94

  [3] abort(0x1, 0x1000, 0x6, 0x0, 0x1be3f4, 0x1000), at 0xffffffff7d6cbd14

=>[4] __gnu_cxx::__verbose_terminate_handler(), line 95 in "vterminate.cc"

  [5] __cxxabiv1::__terminate(handler = 0xffffffff7e45de7c = 
&__gnu_cxx::__verbose_terminate_handler()), line 47 in "eh_terminate.cc"

  [6] std::terminate(), line 57 in "eh_terminate.cc"

  [7] __cxa_throw(obj = 0x10108fda0, tinfo = 0x100d91ec8, dest = 0x1006fa050 = 
&xercesc_3_2::InvalidDatatypeValueException::~InvalidDatatypeValueException()), 
line 93 in "eh_throw.cc"

  [8] xercesc_3_2::AbstractStringValidator::checkContent(this = 0x101065688, 
content = 0x100fee7c0 "", context = 0x100fd6158, asBase = false, manager = 
0x100dedee0), line 578 in "AbstractStringValidator.cpp"

  [9] xercesc_3_2::AbstractStringValidator::validate(this = 0x101065688, 
content = 0x100fee7c0 "", context = 0x100fd6158, manager = 0x100dedee0), line 
552 in "AbstractStringValidator.cpp"

  [10] xercesc_3_2::UnionDatatypeValidator::checkContent(this = 0x101066128, 
content = 0x100fee7c0 "", context = 0x100fd6158, asBase = false, manager = 
0x100dedee0), line 257 in "UnionDatatypeValidator.cpp"

  [11] xercesc_3_2::UnionDatatypeValidator::validate(this = 0x101066128, 
content = 0x100fee7c0 "", context = 0x100fd6158, manager = 0x100dedee0), line 
231 in "UnionDatatypeValidator.hpp"

  [12] xercesc_3_2::TraverseSchema::traverseAttributeDecl(this = 
0xffffffff7fffc458, elem = 0x100fee240, typeInfo = (nil), topLevel = false), 
line 2520 in "TraverseSchema.cpp"

  [13] xercesc_3_2::TraverseSchema::traverseAttributeGroupDecl(this = 
0xffffffff7fffc458, elem = 0x100fedb28, typeInfo = (nil), topLevel = true), 
line 1837 in "TraverseSchema.cpp"

  [14] xercesc_3_2::TraverseSchema::processChildren(this = 0xffffffff7fffc458, 
root = 0x100fec0e8), line 4855 in "TraverseSchema.cpp"

  [15] xercesc_3_2::TraverseSchema::traverseInclude(this = 0xffffffff7fffc458, 
elem = 0x100ec4958), line 721 in "TraverseSchema.cpp"

  [16] xercesc_3_2::TraverseSchema::processChildren(this = 0xffffffff7fffc458, 
root = 0x100ec3428), line 4754 in "TraverseSchema.cpp"

  [17] xercesc_3_2::TraverseSchema::doTraverseSchema(this = 0xffffffff7fffc458, 
schemaRoot = 0x100ec3428), line 270 in "TraverseSchema.cpp"

  [18] xercesc_3_2::TraverseSchema::TraverseSchema(this = 0xffffffff7fffc458, 
schemaRoot = 0x100ec3428, uriStringPool = 0x100de3678, schemaGrammar = 
0x100e98348, grammarResolver = 0x100e4c948, cachedSchemaInfoList = 0x100e47328, 
schemaInfoList = 0x100e47328, xmlScanner = 0x100e4d3a8, schemaURL = 0x100e96b00 
"Cannot print the string.", entityHandler = (nil), errorReporter = 0x100e4bf40, 
manager = 0x100dedee0, multipleImport = false), line 236 in "TraverseSchema.cpp"

  [19] xercesc_3_2::IGXMLScanner::resolveSchemaGrammar(this = 0x100e4d3a8, loc 
= 0x100e55dc0 "Cannot print the string.", uri = 0x1004e5c18 "", 
ignoreLoadSchema = true), line 1979 in "IGXMLScanner2.cpp"

  [20] xercesc_3_2::IGXMLScanner::scanStartTagNS(this = 0x100e4d3a8, gotData = 
true), line 2207 in "IGXMLScanner.cpp"

  [21] xercesc_3_2::IGXMLScanner::scanContent(this = 0x100e4d3a8), line 890 in 
"IGXMLScanner.cpp"

  [22] xercesc_3_2::IGXMLScanner::scanDocument(this = 0x100e4d3a8, src = 
CLASS), line 217 in "IGXMLScanner.cpp"

  [23] xercesc_3_2::XMLScanner::scanDocument(this = 0x100e4d3a8, systemId = 
0x100e47460 "Cannot print the string."), line 402 in "XMLScanner.cpp"

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org

Reply via email to