Based on the stack trace, the exception is thrown because a managed
buffer that is being freed isn't actually registered to the buffer manager.
This shouldn't happen, since the only way to get a buffer is to request
it from the manager in the first place.  It's possible there's a memory
corruption bug somewhere.

What I'd like to do is see what happens if the program doesn't abort at
that point.  Not freeing the buffer will lead to a memory leak, so it's
not a fix, but seeing what happens without the exception being thrown
could give useful data.

The attached patch comments out the line that throws the exception,
causing the function to simply return.  This should let the program
continue running, hopefully producing useful output (whether correct or not).

Could someone please apply the patch and rebuild?

Thanks,
Bill

diff --git a/src/xercesc/framework/XMLBufferMgr.cpp b/src/xercesc/framework/XMLBufferMgr.cpp
index 327f8de..2068233 100644
--- a/src/xercesc/framework/XMLBufferMgr.cpp
+++ b/src/xercesc/framework/XMLBufferMgr.cpp
@@ -108,7 +108,7 @@ void XMLBufferMgr::releaseBuffer(XMLBuffer& toRelease)
     }
 
     // It was not a legal buffer
-    ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::BufMgr_BufferNotInPool, fMemoryManager);
+    //ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::BufMgr_BufferNotInPool, fMemoryManager);
 }
 
 XERCES_CPP_NAMESPACE_END

Reply via email to