You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/05/12 19:12:14 UTC

DO NOT REPLY [Bug 8840] - SAX out of memory if external-SchemaLocation not used in instance

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8840>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8840

SAX out of memory if external-SchemaLocation not used in instance





------- Additional Comments From maxhearn@aol.com  2002-05-12 17:12 -------
The bug appears to me to be in org.apache.xerces.impl.xs.XMLSchemaValidator.

In the handleStartElement method, on line 1771, there is a

   return augs;

statement that returns from the middle of the method.  This
appears to be executed whenever the element declaration is not
found.

This path through the code never resets fBuffer. The normal
path through the method executes

    fBuffer.setLength(0); on line 1839

Because fBuffer is never reset, it ultimately ends up holding
nearly the entire instance document.  That defeats the entire
purpose of using SAX in the first place.

It looks to me like there are other paths through
handleStartElement that have the same problem.  There may also
be some other cleanup code besides the fBuffer.setLength(0)
that should be executed.  But the method and class are
extremely large, and I'm completely unfamiliar with the code,
so it is difficult to know what is supposed to be done.

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