[jira] [Commented] (XERCESC-2154) "terminate called after throwing an instance of 'xercesc_3_2::XMLErrs::Codes'" crash on Solaris x86 with invalid xml input (c++11)

2018-10-10 Thread Scott Cantor (JIRA)


[ 
https://issues.apache.org/jira/browse/XERCESC-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16645045#comment-16645045
 ] 

Scott Cantor commented on XERCESC-2154:
---

Officially unless a maintainer for Solaris appears, it has been considered 
unsupported since the 3.1 release. I do no testing on it and will never again 
spend a second on Solaris. Just want that to be 100% clear. Patches are always 
welcome.

> "terminate called after throwing an instance of 
> 'xercesc_3_2::XMLErrs::Codes'" crash on Solaris x86 with invalid xml input 
> (c++11)
> --
>
> Key: XERCESC-2154
> URL: https://issues.apache.org/jira/browse/XERCESC-2154
> Project: Xerces-C++
>  Issue Type: Bug
>  Components: DOM
>Affects Versions: 3.2.1, 3.2.2
> Environment: Oracle compiler version (supports c++11):
> [hostname]/: /opt/developerstudio12.6/bin/CC -V
> CC: Studio 12.6 Sun C++ 5.15 SunOS_i386 2017/05/30
> OS version:
> [hostname]/: uname -a
> SunOS hostname 5.10 Generic_150401-61 i86pc i386 i86pc
>Reporter: Grzegorz Majka
>Priority: Major
> Attachments: xml_broken.xml, xml_ok.xml
>
>
> Hi,
> I have a problem running xerces on Solaris x86 platform compiled with 
> '-std=c++11' flag using Oracle developer studio 12.6. The compilation is fine 
> and the library works fine in all positive scenarios, but it fails with Abort 
> signal (core dumped) when an XML content to process is broken ending with the 
> error message:
> "terminate called after throwing an instance of 'xercesc_3_2::XMLErrs::Codes'"
> I was able to isolate the problem by using DOMPrint example run with a file 
> with an invalid xml content.
> The positive scenario:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> export 
> LD_LIBRARY_PATH=/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/src/.libs:/opt/developerstudio12.6/lib/compilers/CC-gcc/lib
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples:
>  ./.libs/DOMPrint xml_ok.xml
> 
>     
>     
>     
>     
>     
> 
> The negative scenario:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples:
>  ./.libs/DOMPrint xml_broken.xml
> Fatal Error at file 
> "/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples/xml_broken.xml",
>  line 5, column 1
>    Message: input ended before all started tags were ended; last tag started 
> is 'Hardware'
> terminate called after throwing an instance of 'xercesc_3_2::XMLErrs::Codes'
> Abort (core dumped)
> I attach both xml_ok.xml and xml_broken.xml files for your reference.
> Details:
> 1)
> Xerces version 3.2.1 (I also tried with 3.2.2 with the same behavior)
> 2)
> Oracle compiler version (supports c++11):
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> /opt/developerstudio12.6/bin/CC -V
> CC: Studio 12.6 Sun C++ 5.15 SunOS_i386 2017/05/30
> OS version:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> uname -a
> SunOS hostname 5.10 Generic_150401-61 i86pc i386 i86pc
> 3)
> Configure options:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> chmod +x ./configure.solaris; chmod +x config/install-sh; ./configure.solaris 
> CXX="/opt/developerstudio12.6/bin/CC" CC="/opt/developerstudio12.6/bin/cc" 
> LD="/opt/developerstudio12.6/bin/CC" LDFLAGS="-std=c++11 
> -L/opt/developerstudio12.6/lib/compilers/CC-gcc/lib -lstdc++ -lgcc_s -lCrunG3 
> -s" CFLAGS="-xO2 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Kpic -mt" 
> CXXFLAGS="-xO2 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Kpic -mt 
> -std=c++11" --disable-static --enable-xmlch-uint16_t 
> AR="/opt/developerstudio12.6/bin/CC -xar" ARFLAGS=-o --enable-transcoder-iconv
> ...
> ...
> configure.solaris: Report:
> configure.solaris:   File Manager: POSIX
> configure.solaris:   Mutex Manager: standard
> configure.solaris:   Transcoder: iconv
> configure.solaris:   NetAccessor: socket
> configure.solaris:   Message Loader: inmemory
> configure.solaris:   XMLCh Type: uint16_t
> 4)
> "ldd" outputs:
> Initially I had issues with "terminate called after throwing an instance ..." 
> because I mistakenly linked to both 
> - c++11 libraries: stdc++ gcc_s CrunG3
> - and standard libraries: Cstd stlport4 stdcxx4 Crun iostream libraries
> which is not allowed.
> Xerces compiled, but failed in almost all scenarios with similar "terminate 
> called..." crashes. After fixing the issue (getting rid of linking to 
> standard (Cstd and Crun) libraries) all test cases passed except the negative 
> ones.
> Here is the list of "ldd" outputs:
> 

[jira] [Commented] (XERCESC-2154) "terminate called after throwing an instance of 'xercesc_3_2::XMLErrs::Codes'" crash on Solaris x86 with invalid xml input (c++11)

2018-10-10 Thread Grzegorz Majka (JIRA)


[ 
https://issues.apache.org/jira/browse/XERCESC-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16645033#comment-16645033
 ] 

Grzegorz Majka commented on XERCESC-2154:
-

The problem does not occur with C++98.

In the meantime I requested a cmake installation on our build machine. Then I 
tried the cmake compilation (with -G "Unix Makefiles") and this time everything 
worked fine (with "-std=c++11" switch). So I guess this would be some error in 
the Autoconf/Makefile project that does not allow to compile with c++11 on 
Solaris platform in the latest Oracle Developer Studio 12.6 compiler. 
Unfortunately I wasn't able to find the root cause.

> "terminate called after throwing an instance of 
> 'xercesc_3_2::XMLErrs::Codes'" crash on Solaris x86 with invalid xml input 
> (c++11)
> --
>
> Key: XERCESC-2154
> URL: https://issues.apache.org/jira/browse/XERCESC-2154
> Project: Xerces-C++
>  Issue Type: Bug
>  Components: DOM
>Affects Versions: 3.2.1, 3.2.2
> Environment: Oracle compiler version (supports c++11):
> [hostname]/: /opt/developerstudio12.6/bin/CC -V
> CC: Studio 12.6 Sun C++ 5.15 SunOS_i386 2017/05/30
> OS version:
> [hostname]/: uname -a
> SunOS hostname 5.10 Generic_150401-61 i86pc i386 i86pc
>Reporter: Grzegorz Majka
>Priority: Major
> Attachments: xml_broken.xml, xml_ok.xml
>
>
> Hi,
> I have a problem running xerces on Solaris x86 platform compiled with 
> '-std=c++11' flag using Oracle developer studio 12.6. The compilation is fine 
> and the library works fine in all positive scenarios, but it fails with Abort 
> signal (core dumped) when an XML content to process is broken ending with the 
> error message:
> "terminate called after throwing an instance of 'xercesc_3_2::XMLErrs::Codes'"
> I was able to isolate the problem by using DOMPrint example run with a file 
> with an invalid xml content.
> The positive scenario:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> export 
> LD_LIBRARY_PATH=/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/src/.libs:/opt/developerstudio12.6/lib/compilers/CC-gcc/lib
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples:
>  ./.libs/DOMPrint xml_ok.xml
> 
>     
>     
>     
>     
>     
> 
> The negative scenario:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples:
>  ./.libs/DOMPrint xml_broken.xml
> Fatal Error at file 
> "/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples/xml_broken.xml",
>  line 5, column 1
>    Message: input ended before all started tags were ended; last tag started 
> is 'Hardware'
> terminate called after throwing an instance of 'xercesc_3_2::XMLErrs::Codes'
> Abort (core dumped)
> I attach both xml_ok.xml and xml_broken.xml files for your reference.
> Details:
> 1)
> Xerces version 3.2.1 (I also tried with 3.2.2 with the same behavior)
> 2)
> Oracle compiler version (supports c++11):
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> /opt/developerstudio12.6/bin/CC -V
> CC: Studio 12.6 Sun C++ 5.15 SunOS_i386 2017/05/30
> OS version:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> uname -a
> SunOS hostname 5.10 Generic_150401-61 i86pc i386 i86pc
> 3)
> Configure options:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> chmod +x ./configure.solaris; chmod +x config/install-sh; ./configure.solaris 
> CXX="/opt/developerstudio12.6/bin/CC" CC="/opt/developerstudio12.6/bin/cc" 
> LD="/opt/developerstudio12.6/bin/CC" LDFLAGS="-std=c++11 
> -L/opt/developerstudio12.6/lib/compilers/CC-gcc/lib -lstdc++ -lgcc_s -lCrunG3 
> -s" CFLAGS="-xO2 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Kpic -mt" 
> CXXFLAGS="-xO2 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Kpic -mt 
> -std=c++11" --disable-static --enable-xmlch-uint16_t 
> AR="/opt/developerstudio12.6/bin/CC -xar" ARFLAGS=-o --enable-transcoder-iconv
> ...
> ...
> configure.solaris: Report:
> configure.solaris:   File Manager: POSIX
> configure.solaris:   Mutex Manager: standard
> configure.solaris:   Transcoder: iconv
> configure.solaris:   NetAccessor: socket
> configure.solaris:   Message Loader: inmemory
> configure.solaris:   XMLCh Type: uint16_t
> 4)
> "ldd" outputs:
> Initially I had issues with "terminate called after throwing an instance ..." 
> because I mistakenly linked to both 
> - c++11 libraries: stdc++ gcc_s CrunG3
> - and standard libraries: Cstd stlport4 stdcxx4 Crun iostream libraries
> which is not allowed.
> Xerces compiled, but failed in almost all scenarios with similar "terminate 
> called..." crashes. 

[jira] [Commented] (XERCESC-2154) "terminate called after throwing an instance of 'xercesc_3_2::XMLErrs::Codes'" crash on Solaris x86 with invalid xml input (c++11)

2018-10-04 Thread Roger Leigh (JIRA)


[ 
https://issues.apache.org/jira/browse/XERCESC-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16638288#comment-16638288
 ] 

Roger Leigh commented on XERCESC-2154:
--

Is the problem specific to C++11 or does the problem also occur with C++98?  I 
don't think that the standard version should affect exception handling, but it 
might be worth checking.

While your LD_LIBRARY_PATH and ldd output show it to be using the libgcc_s and 
libstdc++ from _/opt/developerstudio12.6_ I'm still a bit suspicious that 
somehow there might be a version mismatch here.  It might be worth asking 
Oracle developer studio support, or on the GCC mailing list, since this is 
likely to be somewhat subtle and I don't personally have any recent Solaris 
expertise to draw upon.  Given it looks like a low level problem in the C++/C 
runtime itself, I don't think there's a fault in Xerces-C++ here, unless 
there's something we can add to the Autoconf logic for Solaris.

> "terminate called after throwing an instance of 
> 'xercesc_3_2::XMLErrs::Codes'" crash on Solaris x86 with invalid xml input 
> (c++11)
> --
>
> Key: XERCESC-2154
> URL: https://issues.apache.org/jira/browse/XERCESC-2154
> Project: Xerces-C++
>  Issue Type: Bug
>  Components: DOM
>Affects Versions: 3.2.1, 3.2.2
> Environment: Oracle compiler version (supports c++11):
> [hostname]/: /opt/developerstudio12.6/bin/CC -V
> CC: Studio 12.6 Sun C++ 5.15 SunOS_i386 2017/05/30
> OS version:
> [hostname]/: uname -a
> SunOS hostname 5.10 Generic_150401-61 i86pc i386 i86pc
>Reporter: Grzegorz Majka
>Priority: Major
> Attachments: xml_broken.xml, xml_ok.xml
>
>
> Hi,
> I have a problem running xerces on Solaris x86 platform compiled with 
> '-std=c++11' flag using Oracle developer studio 12.6. The compilation is fine 
> and the library works fine in all positive scenarios, but it fails with Abort 
> signal (core dumped) when an XML content to process is broken ending with the 
> error message:
> "terminate called after throwing an instance of 'xercesc_3_2::XMLErrs::Codes'"
> I was able to isolate the problem by using DOMPrint example run with a file 
> with an invalid xml content.
> The positive scenario:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> export 
> LD_LIBRARY_PATH=/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/src/.libs:/opt/developerstudio12.6/lib/compilers/CC-gcc/lib
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples:
>  ./.libs/DOMPrint xml_ok.xml
> 
>     
>     
>     
>     
>     
> 
> The negative scenario:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples:
>  ./.libs/DOMPrint xml_broken.xml
> Fatal Error at file 
> "/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples/xml_broken.xml",
>  line 5, column 1
>    Message: input ended before all started tags were ended; last tag started 
> is 'Hardware'
> terminate called after throwing an instance of 'xercesc_3_2::XMLErrs::Codes'
> Abort (core dumped)
> I attach both xml_ok.xml and xml_broken.xml files for your reference.
> Details:
> 1)
> Xerces version 3.2.1 (I also tried with 3.2.2 with the same behavior)
> 2)
> Oracle compiler version (supports c++11):
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> /opt/developerstudio12.6/bin/CC -V
> CC: Studio 12.6 Sun C++ 5.15 SunOS_i386 2017/05/30
> OS version:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> uname -a
> SunOS hostname 5.10 Generic_150401-61 i86pc i386 i86pc
> 3)
> Configure options:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> chmod +x ./configure.solaris; chmod +x config/install-sh; ./configure.solaris 
> CXX="/opt/developerstudio12.6/bin/CC" CC="/opt/developerstudio12.6/bin/cc" 
> LD="/opt/developerstudio12.6/bin/CC" LDFLAGS="-std=c++11 
> -L/opt/developerstudio12.6/lib/compilers/CC-gcc/lib -lstdc++ -lgcc_s -lCrunG3 
> -s" CFLAGS="-xO2 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Kpic -mt" 
> CXXFLAGS="-xO2 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Kpic -mt 
> -std=c++11" --disable-static --enable-xmlch-uint16_t 
> AR="/opt/developerstudio12.6/bin/CC -xar" ARFLAGS=-o --enable-transcoder-iconv
> ...
> ...
> configure.solaris: Report:
> configure.solaris:   File Manager: POSIX
> configure.solaris:   Mutex Manager: standard
> configure.solaris:   Transcoder: iconv
> configure.solaris:   NetAccessor: socket
> configure.solaris:   Message Loader: inmemory
> configure.solaris:   XMLCh Type: uint16_t
> 4)
> "ldd" outputs:
> Initially I had issues with "terminate called after throwing 

[jira] [Commented] (XERCESC-2154) "terminate called after throwing an instance of 'xercesc_3_2::XMLErrs::Codes'" crash on Solaris x86 with invalid xml input (c++11)

2018-10-04 Thread Grzegorz Majka (JIRA)


[ 
https://issues.apache.org/jira/browse/XERCESC-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16638274#comment-16638274
 ] 

Grzegorz Majka commented on XERCESC-2154:
-

Hi Roger,

Thanks for answering.

I used configure script and then "make all" to compile xerces - I provided the 
list of configure options I used.

I cannot do CMake, because it's not configured on the machine. I tried to 
compile cmake, but the machine was missing some required tools.

 

Indeed as you noted, it looks like a problem with exception handling, but I 
don't know what's going on.

Today I tried a simple test program with a dynamic .so library which exported a 
function throwing an exception, which I called from a main program that was 
linked against this .so library, but all worked fine - the exception thrown 
from the function was caught in catch(...) block. I included all the switches I 
used during xerces compilation.

I will do some more tests and a different combination of linker options, but no 
luck so far.

 

> "terminate called after throwing an instance of 
> 'xercesc_3_2::XMLErrs::Codes'" crash on Solaris x86 with invalid xml input 
> (c++11)
> --
>
> Key: XERCESC-2154
> URL: https://issues.apache.org/jira/browse/XERCESC-2154
> Project: Xerces-C++
>  Issue Type: Bug
>  Components: DOM
>Affects Versions: 3.2.1, 3.2.2
> Environment: Oracle compiler version (supports c++11):
> [hostname]/: /opt/developerstudio12.6/bin/CC -V
> CC: Studio 12.6 Sun C++ 5.15 SunOS_i386 2017/05/30
> OS version:
> [hostname]/: uname -a
> SunOS hostname 5.10 Generic_150401-61 i86pc i386 i86pc
>Reporter: Grzegorz Majka
>Priority: Major
> Attachments: xml_broken.xml, xml_ok.xml
>
>
> Hi,
> I have a problem running xerces on Solaris x86 platform compiled with 
> '-std=c++11' flag using Oracle developer studio 12.6. The compilation is fine 
> and the library works fine in all positive scenarios, but it fails with Abort 
> signal (core dumped) when an XML content to process is broken ending with the 
> error message:
> "terminate called after throwing an instance of 'xercesc_3_2::XMLErrs::Codes'"
> I was able to isolate the problem by using DOMPrint example run with a file 
> with an invalid xml content.
> The positive scenario:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> export 
> LD_LIBRARY_PATH=/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/src/.libs:/opt/developerstudio12.6/lib/compilers/CC-gcc/lib
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples:
>  ./.libs/DOMPrint xml_ok.xml
> 
>     
>     
>     
>     
>     
> 
> The negative scenario:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples:
>  ./.libs/DOMPrint xml_broken.xml
> Fatal Error at file 
> "/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples/xml_broken.xml",
>  line 5, column 1
>    Message: input ended before all started tags were ended; last tag started 
> is 'Hardware'
> terminate called after throwing an instance of 'xercesc_3_2::XMLErrs::Codes'
> Abort (core dumped)
> I attach both xml_ok.xml and xml_broken.xml files for your reference.
> Details:
> 1)
> Xerces version 3.2.1 (I also tried with 3.2.2 with the same behavior)
> 2)
> Oracle compiler version (supports c++11):
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> /opt/developerstudio12.6/bin/CC -V
> CC: Studio 12.6 Sun C++ 5.15 SunOS_i386 2017/05/30
> OS version:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> uname -a
> SunOS hostname 5.10 Generic_150401-61 i86pc i386 i86pc
> 3)
> Configure options:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> chmod +x ./configure.solaris; chmod +x config/install-sh; ./configure.solaris 
> CXX="/opt/developerstudio12.6/bin/CC" CC="/opt/developerstudio12.6/bin/cc" 
> LD="/opt/developerstudio12.6/bin/CC" LDFLAGS="-std=c++11 
> -L/opt/developerstudio12.6/lib/compilers/CC-gcc/lib -lstdc++ -lgcc_s -lCrunG3 
> -s" CFLAGS="-xO2 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Kpic -mt" 
> CXXFLAGS="-xO2 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Kpic -mt 
> -std=c++11" --disable-static --enable-xmlch-uint16_t 
> AR="/opt/developerstudio12.6/bin/CC -xar" ARFLAGS=-o --enable-transcoder-iconv
> ...
> ...
> configure.solaris: Report:
> configure.solaris:   File Manager: POSIX
> configure.solaris:   Mutex Manager: standard
> configure.solaris:   Transcoder: iconv
> configure.solaris:   NetAccessor: socket
> configure.solaris:   Message Loader: inmemory
> configure.solaris:   XMLCh Type: uint16_t
> 4)
> "ldd" 

[jira] [Commented] (XERCESC-2154) "terminate called after throwing an instance of 'xercesc_3_2::XMLErrs::Codes'" crash on Solaris x86 with invalid xml input (c++11)

2018-10-03 Thread Roger Leigh (JIRA)


[ 
https://issues.apache.org/jira/browse/XERCESC-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16637052#comment-16637052
 ] 

Roger Leigh commented on XERCESC-2154:
--

How exactly did you build Xerces-C++?  Did you use the Autotools configure 
script, or the CMake build?  Would it be possible to test with the other to see 
if this makes any difference?

 

With the change to the standard libraries, is there any possibility that the 
exception isn't being caught due to some problem with typeinfo or exception 
handling?  (I've seen this with GCC on FreeBSD with different libgcc versions 
in base and ports.)  Is this a possibility on Solaris?

 

By setting the error codes to different values, your _xml_broken.xml_ example 
sets the _retval_ to 4 on line 602 of _samples/src/DOMPrint/DOMPrint.cpp_.  For 
this codepath to run, _errorsOccured_ must be set to true in one of the catch 
blocks above.  On Linux, this works correctly testing locally.  On your system, 
this uncaught exception can only occur if a thrown exception was not handled by 
_any_ of the catch blocks, including *catch(...)*.  This indicates something is 
very wrong with the exception handling on your system with this build of 
Xerces-C++.

Regards,
Roger

> "terminate called after throwing an instance of 
> 'xercesc_3_2::XMLErrs::Codes'" crash on Solaris x86 with invalid xml input 
> (c++11)
> --
>
> Key: XERCESC-2154
> URL: https://issues.apache.org/jira/browse/XERCESC-2154
> Project: Xerces-C++
>  Issue Type: Bug
>  Components: DOM
>Affects Versions: 3.2.1, 3.2.2
> Environment: Oracle compiler version (supports c++11):
> [hostname]/: /opt/developerstudio12.6/bin/CC -V
> CC: Studio 12.6 Sun C++ 5.15 SunOS_i386 2017/05/30
> OS version:
> [hostname]/: uname -a
> SunOS hostname 5.10 Generic_150401-61 i86pc i386 i86pc
>Reporter: Grzegorz Majka
>Priority: Major
> Attachments: xml_broken.xml, xml_ok.xml
>
>
> Hi,
> I have a problem running xerces on Solaris x86 platform compiled with 
> '-std=c++11' flag using Oracle developer studio 12.6. The compilation is fine 
> and the library works fine in all positive scenarios, but it fails with Abort 
> signal (core dumped) when an XML content to process is broken ending with the 
> error message:
> "terminate called after throwing an instance of 'xercesc_3_2::XMLErrs::Codes'"
> I was able to isolate the problem by using DOMPrint example run with a file 
> with an invalid xml content.
> The positive scenario:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> export 
> LD_LIBRARY_PATH=/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/src/.libs:/opt/developerstudio12.6/lib/compilers/CC-gcc/lib
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples:
>  ./.libs/DOMPrint xml_ok.xml
> 
>     
>     
>     
>     
>     
> 
> The negative scenario:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples:
>  ./.libs/DOMPrint xml_broken.xml
> Fatal Error at file 
> "/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples/xml_broken.xml",
>  line 5, column 1
>    Message: input ended before all started tags were ended; last tag started 
> is 'Hardware'
> terminate called after throwing an instance of 'xercesc_3_2::XMLErrs::Codes'
> Abort (core dumped)
> I attach both xml_ok.xml and xml_broken.xml files for your reference.
> Details:
> 1)
> Xerces version 3.2.1 (I also tried with 3.2.2 with the same behavior)
> 2)
> Oracle compiler version (supports c++11):
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> /opt/developerstudio12.6/bin/CC -V
> CC: Studio 12.6 Sun C++ 5.15 SunOS_i386 2017/05/30
> OS version:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> uname -a
> SunOS hostname 5.10 Generic_150401-61 i86pc i386 i86pc
> 3)
> Configure options:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2: 
> chmod +x ./configure.solaris; chmod +x config/install-sh; ./configure.solaris 
> CXX="/opt/developerstudio12.6/bin/CC" CC="/opt/developerstudio12.6/bin/cc" 
> LD="/opt/developerstudio12.6/bin/CC" LDFLAGS="-std=c++11 
> -L/opt/developerstudio12.6/lib/compilers/CC-gcc/lib -lstdc++ -lgcc_s -lCrunG3 
> -s" CFLAGS="-xO2 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Kpic -mt" 
> CXXFLAGS="-xO2 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -Kpic -mt 
> -std=c++11" --disable-static --enable-xmlch-uint16_t 
> AR="/opt/developerstudio12.6/bin/CC -xar" ARFLAGS=-o --enable-transcoder-iconv
> ...
> ...
> configure.solaris: Report:
> configure.solaris:   File Manager: POSIX
> configure.solaris: