You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2003/08/07 23:22:30 UTC
cvs commit: xml-xerces/c/doc faq-parse.xml
neilg 2003/08/07 14:22:30
Modified: c/doc faq-parse.xml
Log:
document seg fault that can be provoked by calling XMLPlatformUtils::Terminate from within a catch block.
Revision Changes Path
1.59 +13 -0 xml-xerces/c/doc/faq-parse.xml
Index: faq-parse.xml
===================================================================
RCS file: /home/cvs/xml-xerces/c/doc/faq-parse.xml,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- faq-parse.xml 21 May 2003 22:06:09 -0000 1.58
+++ faq-parse.xml 7 Aug 2003 21:22:29 -0000 1.59
@@ -264,6 +264,19 @@
the parser object and destroy it explicitly before the
call to XMLPlatformUtils::Terminate() is made.
</p>
+ <p>Another way of producing segmentation faults--that again,
+ unfortunately, was employed by some of our
+ samples--is to have calls to XMLPlatformUtils::Terminate()
+ in a catch block that catches any of Xerces's exceptions.
+ Since the destructor of the exception will implicitly be
+ invoked upon exit from the catch block, and since some of
+ the exceptions' destructors call on Xerces's
+ default memory manager to destroy dynamically-allocated
+ objects, their destruction will provoke a segmentation
+ fault even if a return statement is placed in the catch
+ block since the default memory manager will no longer exist.
+ This practice is now avoided in all our samples.
+ </p>
</a>
</faq>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org