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 bu...@apache.org on 2002/01/16 00:00:01 UTC

DO NOT REPLY [Bug 5875] New: - XmlFormatter->fTmpBuf has a fixed size even after changing kTmpBufSize

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=5875>.
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=5875

XmlFormatter->fTmpBuf has a fixed size even after changing kTmpBufSize

           Summary: XmlFormatter->fTmpBuf has a fixed size even after
                    changing kTmpBufSize
           Product: Xerces-C++
           Version: 1.6.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Utilities
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: jcornado@pervasive.com


These are the relevant snippets of code:

(from XMLFormatter.hpp)

    enum Constants
    {
       kTmpBufSize     = 16 * 1024 * 2 //J Cornado added * 2
    };

Why? I need to be able to process really long SQL statements

This variable is allocated on the heap:

(from XMLFormatter.hpp)

    XMLByte                     fTmpBuf[kTmpBufSize + 4];

(from your SAX samples)

    fFormatter(encodingName, this, XMLFormatter::NoEscapes, unRepFlags),

If you put a break point before hitting this constructor and step through it, 
you will notice two things:

kTmpBufSize is 32k as it should be
fTmpBuf is 32k as it should be even just before stepping out of the constructor.

When we pop back to the SAX sample you'll notice that this->fFormatter->fTmpBuf 
is 16k!!! it's the same address!! no reallocation!!

Is this a known issue?

I'm using VC6. I reproduced this issue with xerces-c 1_4 and 1_6

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