[ http://issues.apache.org/jira/browse/XERCESC-976?page=history ]
     
David Bertoni resolved XERCESC-976:
-----------------------------------

      Assign To:     (was: Xerces-C Developers Mailing List)
     Resolution: Fixed
    Fix Version: 2.6.0

I'm not sure when this was fixed, but it's certainly fixed in 2.6.0.

> ReaderMgr may delete fCurReader twice
> -------------------------------------
>
>          Key: XERCESC-976
>          URL: http://issues.apache.org/jira/browse/XERCESC-976
>      Project: Xerces-C++
>         Type: Bug
>   Components: SAX/SAX2
>     Versions: 2.2.0
>  Environment: Operating System: Other
> Platform: Other
>     Reporter: Glen Knowles
>      Fix For: 2.6.0

>
> In the function IGXMLScanner::scanDocument(const InputSource& src), if the 
> call:
>         // Reset the reader manager to close all files, sockets, etc...
>         fReaderMgr.reset();
> throws it goes to one of the catches which calls it again, such as:
>         catch(...)
>         {
>             // Flush the reader manager and rethrow user's error
>             fReaderMgr.reset();
>             throw;
>         }
> This is a problem in the reset function because if the "delete fCurReader" 
> line throws fCurReader is not set to 0, and the second call to reset attempts 
> to delete it again.
> void ReaderMgr::reset()
> {
>     // Reset all of the flags
>     fThrowEOE = false;
>     // Delete the current reader and flush the reader stack
>     delete fCurReader;   // <--- derived class threw
>     fCurReader = 0;
> It seems that fCurReader should be set to 0 before attempting the delete.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to