You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by xe...@xml.apache.org on 2004/09/16 16:54:38 UTC

[jira] Resolved: (XERCESC-1271) Problems parsing large XML strings

Message:

   The following issue has been resolved as INCOMPLETE.

   Resolver: Alberto Massari
       Date: Thu, 16 Sep 2004 7:52 AM

Hi Fred,
from what I can see, the problem lies in your code.

The last lines in the stack trace are

AXISTRANSPORT_D! 00398db9()
AXISTRANSPORT_D! 003828a8()
AXISXMLPARSER_D! 0032453e()
xercesc_2_2::XMLReader::refreshRawBuffer() line 1547 + 46 bytes
xercesc_2_2::XMLReader::xcodeMoreChars(unsigned short * const 0x00ffe5e4, unsigned 

so it means that you installed a custom entity resolver, that refreshRawBuffer is invoking with a call to

fStream->readBytes(&fRawByteBuf[bytesLeft], kRawBufSize - bytesLeft)

I guess that the fStream object is reading from the network and storing the entire packet it got into the provided buffer, ignoring the value of the second argument that tells you the maximum amount of data that should be stored in the buffer.
You should check for that value and queue the extra data for a later retrieval.

If you think I am wrong, please reopen the bug and post the source code for the InputSource-derived object you are using.

Alberto
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESC-1271

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1271
    Summary: Problems parsing large XML strings
       Type: Bug

     Status: Resolved
   Priority: Major
 Resolution: INCOMPLETE

    Project: Xerces-C++

   Assignee: 
   Reporter: Fred Preston

    Created: Fri, 10 Sep 2004 5:00 AM
    Updated: Thu, 16 Sep 2004 7:52 AM
Environment: n/a

Description:
When testing with large XML strings, xerces falls over when the size of the XML exceeds the 16 * 1024 limit that is hardwired into the XMLReader.hpp file (375:kCharBufSize        = 16 * 1024).  Would it be possible to dynamically allocate space for this and other buffers (fCharBuf and fCharSizeBuf) and then to extend them using the realloc function when necessary.  This also applies to the fRawByteBuf buffer that is also limited in size.


---------------------------------------------------------------------
JIRA INFORMATION:
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: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org