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/07/08 21:58:08 UTC

[jira] Created: (XERCESC-1241) XMLFormatter attempts to deallocate unallocated memory

Message:

  A new issue has been created in JIRA.

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1241
    Summary: XMLFormatter attempts to deallocate unallocated memory
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Xerces-C++
 Components: 
             Utilities
   Versions:
             2.5.0

   Assignee: 
   Reporter: D. North

    Created: Thu, 8 Jul 2004 12:57 PM
    Updated: Thu, 8 Jul 2004 12:57 PM
Environment: Not needed

Description:
In line 399 of framework/XMLFormatter.cpp, there is the statement:
  fMemoryManager->deallocate(fAposRef); //delete [] fAposRef;

Unfortunately, in order for this to succeed without sigsegv'ng, fAposRef must be non-null, which is [apparently] possible only if the right stuff has been passed into a call to XMLFormatter::formatBuf(...

Reference XERCESC-71 for a related change in this area.

I can provide sample code that demonstrates the failure if needed.

Regards.
David.




---------------------------------------------------------------------
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


[jira] Commented: (XERCESC-1241) XMLFormatter attempts to deallocate unallocated memory

Posted by xe...@xml.apache.org.
The following comment has been added to this issue:

     Author: David Bertoni
    Created: Thu, 8 Jul 2004 1:52 PM
       Body:
The bug is in your code.  You are terminating Xerces-C before all Xerces-C objects are destroyed.  Try the following:

int main(int argC, char* argV[])
{
    XMLPlatformUtils::Initialize();

    {
        SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();

        fudHandlers handler(encodingName, unRepFlags, expandNamespaces);
        parser->setContentHandler(&handler);

        XERCES_STD_QUALIFIER cerr << "Nuking  parser...\n";
        delete parser;
    }

    XMLPlatformUtils::Terminate();
    return 0;
}

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XERCESC-1241?page=comments#action_36575

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1241
    Summary: XMLFormatter attempts to deallocate unallocated memory
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Xerces-C++
 Components: 
             Utilities
   Versions:
             2.5.0

   Assignee: 
   Reporter: D. North

    Created: Thu, 8 Jul 2004 12:57 PM
    Updated: Thu, 8 Jul 2004 1:52 PM
Environment: Not needed

Description:
In line 399 of framework/XMLFormatter.cpp, there is the statement:
  fMemoryManager->deallocate(fAposRef); //delete [] fAposRef;

Unfortunately, in order for this to succeed without sigsegv'ng, fAposRef must be non-null, which is [apparently] possible only if the right stuff has been passed into a call to XMLFormatter::formatBuf(...

Reference XERCESC-71 for a related change in this area.

I can provide sample code that demonstrates the failure if needed.

Regards.
David.




---------------------------------------------------------------------
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


[jira] Commented: (XERCESC-1241) XMLFormatter attempts to deallocate unallocated memory

Posted by xe...@xml.apache.org.
The following comment has been added to this issue:

     Author: D. North
    Created: Thu, 8 Jul 2004 1:58 PM
       Body:
Ok... Thanks [he said, sneaking into hiding behind the nearest large tree]....

I'm _really_ new to C++, and it is very clear I have missed something really important here... I'll now go figure out the difference.

Very sorry for the interruption ... please close ticket.

Thanks again!

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XERCESC-1241?page=comments#action_36576

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1241
    Summary: XMLFormatter attempts to deallocate unallocated memory
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Xerces-C++
 Components: 
             Utilities
   Versions:
             2.5.0

   Assignee: 
   Reporter: D. North

    Created: Thu, 8 Jul 2004 12:57 PM
    Updated: Thu, 8 Jul 2004 1:58 PM
Environment: Not needed

Description:
In line 399 of framework/XMLFormatter.cpp, there is the statement:
  fMemoryManager->deallocate(fAposRef); //delete [] fAposRef;

Unfortunately, in order for this to succeed without sigsegv'ng, fAposRef must be non-null, which is [apparently] possible only if the right stuff has been passed into a call to XMLFormatter::formatBuf(...

Reference XERCESC-71 for a related change in this area.

I can provide sample code that demonstrates the failure if needed.

Regards.
David.




---------------------------------------------------------------------
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


[jira] Closed: (XERCESC-1241) XMLFormatter attempts to deallocate unallocated memory

Posted by xe...@xml.apache.org.
Message:

   The following issue has been closed.

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1241
    Summary: XMLFormatter attempts to deallocate unallocated memory
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: WON'T FIX

    Project: Xerces-C++
 Components: 
             Utilities
   Versions:
             2.5.0

   Assignee: 
   Reporter: D. North

    Created: Thu, 8 Jul 2004 12:57 PM
    Updated: Thu, 8 Jul 2004 2:02 PM
Environment: Not needed

Description:
In line 399 of framework/XMLFormatter.cpp, there is the statement:
  fMemoryManager->deallocate(fAposRef); //delete [] fAposRef;

Unfortunately, in order for this to succeed without sigsegv'ng, fAposRef must be non-null, which is [apparently] possible only if the right stuff has been passed into a call to XMLFormatter::formatBuf(...

Reference XERCESC-71 for a related change in this area.

I can provide sample code that demonstrates the failure if needed.

Regards.
David.




---------------------------------------------------------------------
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


[jira] Commented: (XERCESC-1241) XMLFormatter attempts to deallocate unallocated memory

Posted by xe...@xml.apache.org.
The following comment has been added to this issue:

     Author: Alberto Massari
    Created: Thu, 8 Jul 2004 1:07 PM
       Body:
The deallocate() method should handle a NULL argument; can you attach the code showing the crash?

Alberto
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XERCESC-1241?page=comments#action_36573

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1241
    Summary: XMLFormatter attempts to deallocate unallocated memory
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Xerces-C++
 Components: 
             Utilities
   Versions:
             2.5.0

   Assignee: 
   Reporter: D. North

    Created: Thu, 8 Jul 2004 12:57 PM
    Updated: Thu, 8 Jul 2004 1:07 PM
Environment: Not needed

Description:
In line 399 of framework/XMLFormatter.cpp, there is the statement:
  fMemoryManager->deallocate(fAposRef); //delete [] fAposRef;

Unfortunately, in order for this to succeed without sigsegv'ng, fAposRef must be non-null, which is [apparently] possible only if the right stuff has been passed into a call to XMLFormatter::formatBuf(...

Reference XERCESC-71 for a related change in this area.

I can provide sample code that demonstrates the failure if needed.

Regards.
David.




---------------------------------------------------------------------
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


[jira] Updated: (XERCESC-1241) XMLFormatter attempts to deallocate unallocated memory

Posted by xe...@xml.apache.org.
The following issue has been updated:

    Updater: D. North (mailto:rold5@tditx.com)
       Date: Thu, 8 Jul 2004 1:36 PM
    Comment:
Here's the sample code .... Please forgive me in advance if I've misunderstood something here.....  I'm very green with C++...
    Changes:
             Attachment changed to fud.cpp
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/XERCESC-1241?page=history

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1241
    Summary: XMLFormatter attempts to deallocate unallocated memory
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Xerces-C++
 Components: 
             Utilities
   Versions:
             2.5.0

   Assignee: 
   Reporter: D. North

    Created: Thu, 8 Jul 2004 12:57 PM
    Updated: Thu, 8 Jul 2004 1:36 PM
Environment: Not needed

Description:
In line 399 of framework/XMLFormatter.cpp, there is the statement:
  fMemoryManager->deallocate(fAposRef); //delete [] fAposRef;

Unfortunately, in order for this to succeed without sigsegv'ng, fAposRef must be non-null, which is [apparently] possible only if the right stuff has been passed into a call to XMLFormatter::formatBuf(...

Reference XERCESC-71 for a related change in this area.

I can provide sample code that demonstrates the failure if needed.

Regards.
David.




---------------------------------------------------------------------
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


[jira] Commented: (XERCESC-1241) XMLFormatter attempts to deallocate unallocated memory

Posted by xe...@xml.apache.org.
The following comment has been added to this issue:

     Author: David Bertoni
    Created: Thu, 8 Jul 2004 3:34 PM
       Body:
Please don't use a bug report to ask questions -- use the Xerces-C mailing list.

You still some bugs with your code.  You are creating a Xerces-C object before initializing the library:

    SAX2XMLReader* parser = XMLReaderFactory::createXMLReader(); 
    fudHandlers *handler; 

    XMLPlatformUtils::Initialize(); 

The the compiler error is a result of using private derivation from XMLFormatTarget.  You will not be able to do this if you want to use new with your class.

Note also that this line is incorrect:

    parser->setContentHandler(&handler); 

In the future, please subscribe to and post your questions to the mailing list, and include the relevant error message you're getting.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XERCESC-1241?page=comments#action_36579

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1241
    Summary: XMLFormatter attempts to deallocate unallocated memory
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: WON'T FIX

    Project: Xerces-C++
 Components: 
             Utilities
   Versions:
             2.5.0

   Assignee: 
   Reporter: D. North

    Created: Thu, 8 Jul 2004 12:57 PM
    Updated: Thu, 8 Jul 2004 3:34 PM
Environment: Not needed

Description:
In line 399 of framework/XMLFormatter.cpp, there is the statement:
  fMemoryManager->deallocate(fAposRef); //delete [] fAposRef;

Unfortunately, in order for this to succeed without sigsegv'ng, fAposRef must be non-null, which is [apparently] possible only if the right stuff has been passed into a call to XMLFormatter::formatBuf(...

Reference XERCESC-71 for a related change in this area.

I can provide sample code that demonstrates the failure if needed.

Regards.
David.




---------------------------------------------------------------------
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


[jira] Commented: (XERCESC-1241) XMLFormatter attempts to deallocate unallocated memory

Posted by xe...@xml.apache.org.
The following comment has been added to this issue:

     Author: John Engstrom
    Created: Thu, 8 Jul 2004 3:06 PM
       Body:
So why can't I do the following:

int main(int argC, char* argV[])
{
    SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
    fudHandlers *handler;

    XMLPlatformUtils::Initialize();
    handler = new fudHandlers(encodingName, unRepFlags, expandNamespaces);
    parser->setContentHandler(&handler);

    XERCES_STD_QUALIFIER cerr << "Nuking parser...\n";
    delete parser;
    delete handler;

    XMLPlatformUtils::Terminate();
    return 0;
} 


It seems that the new operator of the XMLFormatTarget class throws a compile error when you try to do a new handler.

John Engstrom
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XERCESC-1241?page=comments#action_36577

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1241
    Summary: XMLFormatter attempts to deallocate unallocated memory
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: WON'T FIX

    Project: Xerces-C++
 Components: 
             Utilities
   Versions:
             2.5.0

   Assignee: 
   Reporter: D. North

    Created: Thu, 8 Jul 2004 12:57 PM
    Updated: Thu, 8 Jul 2004 3:06 PM
Environment: Not needed

Description:
In line 399 of framework/XMLFormatter.cpp, there is the statement:
  fMemoryManager->deallocate(fAposRef); //delete [] fAposRef;

Unfortunately, in order for this to succeed without sigsegv'ng, fAposRef must be non-null, which is [apparently] possible only if the right stuff has been passed into a call to XMLFormatter::formatBuf(...

Reference XERCESC-71 for a related change in this area.

I can provide sample code that demonstrates the failure if needed.

Regards.
David.




---------------------------------------------------------------------
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