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 Stefan Hummert <St...@SCHOBER.DE> on 2002/06/05 14:08:48 UTC

xerces c++ 1.5.1 SAX2 stdinputsource memory leak?

Xerces C++ Bug Report:

Xerces-C++ version number: 	1.5.1
Platform:	 AIX
Operating system and version number: 	4.3.3 Maintenance Level 9
Compiler and version number: 	xlC 3.6.6.0
The XML document (or excerpt) that failed:	show description
The C++ application code that failed 	show description
Whether you built the Xerces-C++ library
    yourself or used the binary distribution:	both testet, same error

What happened:

As my programm runs on and on, it takes more memory while processing data.
Could it be, that the Xerces C++ 1.5.1 parser has a known memory leak for the SAX2 implementation? So that seems to me, as my processes that parses data need more and more (and they only read from stdin and give it out to e.g. stdout)
Seems to me so, is there something known about?

First C++ Code: (short parser code)

SAX2DocHandler handler;
    handler.setControl(this, pPrnDM);
    parser->setContentHandler(&handler);
    parser->setErrorHandler(&handler);
  
    try
    {
        if (inFilename.isEmpty())
        {
            StdInInputSource src;
            parser->parse(src);
        }
        else
        {
            parser->parse(inFilename.c_str());
        }
    }
    catch (const XMLException& e)
    {
        cerr << "\nError during parsing: \n"
            << "Exception message is:  \n"
            << StrX(e.getMessage()) << "\n" << endl;
        return false;
    }
    catch (...)
    {
        cerr << "\nUnexpected exception during parsing: \n";
        return false;
    }



Stefan Hummert (SIS/hu)

Schober Informationssysteme GmbH
Max-Eyth-Straße 6-10
D-71254 Ditzingen
Tel.:   07156-304-493
Fax:   07156-304-310
EMail:  stefan.hummert@schober.de


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


Re: xerces c++ 1.5.1 SAX2 stdinputsource memory leak?

Posted by Tinny Ng <tn...@ca.ibm.com>.
There are known leaks in Xerces-C++ 1.5.1.   Please upgrade to the latest
version (Xerces-C++ 1.7) and try again.

Tinny

----- Original Message -----
From: "Stefan Hummert" <St...@SCHOBER.DE>
To: <xe...@xml.apache.org>
Sent: Wednesday, June 05, 2002 8:08 AM
Subject: xerces c++ 1.5.1 SAX2 stdinputsource memory leak?


Xerces C++ Bug Report:

Xerces-C++ version number: 1.5.1
Platform: AIX
Operating system and version number: 4.3.3 Maintenance Level 9
Compiler and version number: xlC 3.6.6.0
The XML document (or excerpt) that failed: show description
The C++ application code that failed show description
Whether you built the Xerces-C++ library
    yourself or used the binary distribution: both testet, same error

What happened:

As my programm runs on and on, it takes more memory while processing data.
Could it be, that the Xerces C++ 1.5.1 parser has a known memory leak for
the SAX2 implementation? So that seems to me, as my processes that parses
data need more and more (and they only read from stdin and give it out to
e.g. stdout)
Seems to me so, is there something known about?

First C++ Code: (short parser code)

SAX2DocHandler handler;
    handler.setControl(this, pPrnDM);
    parser->setContentHandler(&handler);
    parser->setErrorHandler(&handler);

    try
    {
        if (inFilename.isEmpty())
        {
            StdInInputSource src;
            parser->parse(src);
        }
        else
        {
            parser->parse(inFilename.c_str());
        }
    }
    catch (const XMLException& e)
    {
        cerr << "\nError during parsing: \n"
            << "Exception message is:  \n"
            << StrX(e.getMessage()) << "\n" << endl;
        return false;
    }
    catch (...)
    {
        cerr << "\nUnexpected exception during parsing: \n";
        return false;
    }



Stefan Hummert (SIS/hu)

Schober Informationssysteme GmbH
Max-Eyth-Straße 6-10
D-71254 Ditzingen
Tel.:   07156-304-493
Fax:   07156-304-310
EMail:  stefan.hummert@schober.de


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



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