[
https://issues.apache.org/jira/browse/XERCESC-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alain BOHL updated XERCESC-1933:
--------------------------------
This issue is related to null strings ("") defined as default values in the XSD
file.
These strings are loaded in the PSVI cash but it seems that Xerces cannot
release null strings ("") when the DOMLSParser object is released.
The point which seems strange in this issue is that null strings, which are
sometimes irrelevant values as default values, could result in a memory crash
issue.
The Xerces null strings involved here are strings made of a pointer on a one
XMLCh character which value is zero.
> After parsing an XML with PVI information kept, the DOMLSParser object
> crashes when released...
> -----------------------------------------------------------------------------------------------
>
> Key: XERCESC-1933
> URL: https://issues.apache.org/jira/browse/XERCESC-1933
> Project: Xerces-C++
> Issue Type: Bug
> Components: DOM, Validating Parser (XML Schema)
> Affects Versions: 3.1.1
> Environment: Windows XP SP3, Visual Studio 8 (2005), also XQuilla
> 2.2.4 (but not necessary to get the crash)
> Reporter: Alain BOHL
> Attachments: file.xml, file.xsd
>
>
> XMLPlatformUtils::Initialize();
> DOMImplementation* impl =
> DOMImplementationRegistry::getDOMImplementation(XMLString::transcode("Core"));
> m_parser = impl->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
> DOMConfiguration *config = m_parser->getDomConfig();
> config->setParameter(XMLUni::fgDOMNamespaces, true);
> config->setParameter(XMLUni::fgXercesSchema, true);
> config->setParameter(XMLUni::fgXercesHandleMultipleImports, true);
> config->setParameter(XMLUni::fgXercesSchemaFullChecking, true);
> config->setParameter(XMLUni::fgDOMComments, false);// Suppression des
> commentaires
> config->setParameter(XMLUni::fgDOMElementContentWhitespace, false);//
> Suppression des blancs
> config->setParameter(XMLUni::fgDOMValidateIfSchema, true); //
> config->setParameter(XMLUni::fgDOMValidate, true);
> // enable datatype normalization - default is off
> config->setParameter(XMLUni::fgDOMDatatypeNormalization, true);
> //************** If the following line is deleted the crash does not
> happen ****************
> config->setParameter(XMLUni::fgXercesDOMHasPSVIInfo, true);
> // Creation et installation of the error handler
> DOMReseauErrorHandler errorHandler;
> config->setParameter(XMLUni::fgDOMErrorHandler, &errorHandler);
> XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc = NULL;
> // reset document pool
> m_parser->resetDocumentPool();
> if (xsdFile.length() > 0)
> {
> Grammar* grammar;
> grammar = m_parser->loadGrammar(XMLString::transcode("file.xsd"),
> Grammar::SchemaGrammarType, true);
> //************************** grammar is not NULL
> }
> doc = m_parser->parseURI(XMLString::transcode("file.xml"));
> //***************************** No xml parser error were met
> delete m_parser; //*********************** Crash on this line
> ***********************************
--
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]