[jira] [Updated] (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 Grzegorz Majka (JIRA)


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

Grzegorz Majka updated XERCESC-2154:

Summary: "terminate called after throwing an instance of 
'xercesc_3_2::XMLErrs::Codes'" crash on Solaris x86 with invalid xml input 
(c++11)  (was: "terminate called after throwing an instance of 
'xercesc_3_2::XMLErrs::Codes'" crash on Solaris x86 with invalid xml input)

> "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:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-

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

2018-10-03 Thread Grzegorz Majka (JIRA)


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

Grzegorz Majka updated XERCESC-2154:

Summary: "terminate called after throwing an instance of 
'xercesc_3_2::XMLErrs::Codes'" crash on Solaris x86 with invalid xml input  
(was: "terminate called after throwing an instance of 
'xercesc_3_2::XMLErrs::Codes'" crash on Solaris x86 with invalid xml input xml)

> "terminate called after throwing an instance of 
> 'xercesc_3_2::XMLErrs::Codes'" crash on Solaris x86 with invalid xml input
> --
>
> 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:
> [hostname]/rome/homes/cit/gmajka/xerces_tests/solaris_322/xerces-c-3.2.2/samples:
>  file