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

Scott Cantor updated XERCESC-1216:
----------------------------------
    Affects Version/s: 2.4.0

> GrammarResolver never clears internal cache of Grammar instances
> ----------------------------------------------------------------
>
>                 Key: XERCESC-1216
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1216
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Validating Parser (XML Schema)
>    Affects Versions: 2.4.0
>         Environment: All platforms
>            Reporter: David Bertoni
>            Assignee: Neil Graham
>            Priority: Blocker
>             Fix For: 2.5.0
>
>
> I may be misunderstanding how this should work, but 
> GrammarResolver::resetCachedGrammar() clears the associated XMLGrammarPool 
> instance, but does not clears its own cache of pooled grammars, stored in the 
> member variable fGrammarFromPool.  The result is a dangling pointer to a 
> Grammar instance that no longer exists.  I've applied the following patch to 
> my local copy of Xerces-C, which seems to clear up the problem.
> cvs diff GrammarResolver.cpp (in directory 
> V:\xml-xerces\c\src\xercesc\validators\common\)
> Index: GrammarResolver.cpp
> ===================================================================
> RCS file: 
> /home/cvspublic/xml-xerces/c/src/xercesc/validators/common/GrammarResolver.cpp,v
> retrieving revision 1.25
> diff -r1.25 GrammarResolver.cpp
> 403a404
> >     fGrammarFromPool->removeAll();



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
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