You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "toske (Commented) (JIRA)" <xe...@xml.apache.org> on 2012/02/01 06:28:59 UTC

[jira] [Commented] (XERCESC-1976) SIGSEGV during init on SUSE11 when LANG is unset

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

toske commented on XERCESC-1976:
--------------------------------

hello.

this issue is that segmentation fault occured in iconv() API.

iconv_open() must be called with locale parameter (in this case, IconvGNUTransService::fLocalCP) before iconv() is called.
iconv_open() is called in IconvGNUTransService::IconvGNUTransService and return handle.
the handle is passed to iconv() as first parameter.

please check below before iconv() (actually wrapped as IconvGNUWrapper::iconvTo) is called at xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp:717

i'm afraid that i don't have environment SUSE11 ,but it seems good to add debug dump of below before 
xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp:717.

1) is fields in IconvGNUTransService valid ?
  fLocalCP (should be locale string)
  fCDTo (should not be -1)

2) these parameters of IconvGNUWrapper::iconvTo is valid?
  ptr, len, pTmpArr, gTempBuffArraySize

thanks.
                
> SIGSEGV during init on SUSE11 when LANG is unset
> ------------------------------------------------
>
>                 Key: XERCESC-1976
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1976
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Miscellaneous
>    Affects Versions: 3.1.1
>         Environment: SUSE11
>            Reporter: Uri Moszkowicz
>
> 1. Unset LANG variable
> 2. Run executable using Xerces.
> 3. Crash with the following stack:
>   #36 0x00000000010422f8 in __gconv ()
>   #37 0x000000000104199b in iconv ()
>   #38 0x0000000000f25bef in xercesc_3_1::IconvGNULCPTranscoder::calcRequiredSize (this=0x4c4cab0, srcText=Variable "srcText" is not available.
>   ) at xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp:401
>   #39 0x0000000000f23dcb in xercesc_3_1::IconvGNULCPTranscoder::transcode (this=0x4c4cab0, toTranscode=0x4c8a7d8, manager=0x4c38e98) at xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp:747
>   #40 0x0000000000e6b98f in xercesc_3_1::XMLString::parseInt (toConvert=Variable "toConvert" is not available.
>   ) at xercesc/util/XMLString.cpp:1457
>   #41 0x0000000000f8066d in xercesc_3_1::AbstractStringValidator::assignFacet (this=0x4c8a700, manager=0x4c38e98) at xercesc/validators/datatype/AbstractStringValidator.cpp:152
>   #42 0x0000000000f80a52 in xercesc_3_1::AbstractStringValidator::init (this=0x4c8a700, enums=Variable "enums" is not available.
>   ) at xercesc/validators/datatype/AbstractStringValidator.cpp:100
>   #43 0x0000000000edcd07 in ListDatatypeValidator (this=0x4c8a700, baseValidator=0x4c8a070, facets=Variable "facets" is not available.
>   ) at xercesc/validators/datatype/ListDatatypeValidator.cpp:61
>   #44 0x0000000000ed019b in xercesc_3_1::DatatypeValidatorFactory::createDatatypeValidator (this=Variable "this" is not available.
>   ) at xercesc/validators/datatype/DatatypeValidatorFactory.cpp:643
>   #45 0x0000000000ed3b26 in xercesc_3_1::DatatypeValidatorFactory::expandRegistryToFullSchemaSet (this=0x4c87af0) at xercesc/validators/datatype/DatatypeValidatorFactory.cpp:312
>   #46 0x0000000000ed5ac0 in xercesc_3_1::XMLInitializer::initializeDatatypeValidatorFactory () at xercesc/validators/datatype/DatatypeValidatorFactory.cpp:135
>   #47 0x0000000000e69415 in xercesc_3_1::XMLInitializer::initializeStaticData () at xercesc/util/XMLInitializer.cpp:61
>   #48 0x000000000068571b in main (argc=23, argv=0x7fff3a9175e8, env=0x7fff3a9176a8) at Main.cc:100
> This is from the first line of the program, which calls XMLPlatformUtils::Initialize() so simply try this program:
> int main(int argc, char* argv[], char* env[]) {
>   XMLPlatformUtils::Initialize();
> }
> Note that the crash doesn't occur on SUSE10 or any of the Redhat platforms.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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