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 David Crowley <dc...@scitegic.com> on 2000/06/14 23:26:08 UTC

XMLPlatformUtils::Terminate bug

Hello --

I found some problems with XMLPlatformUtils::Terminate().  The following
code will reproducibly crash on Win32, and probably all others because bad
things happen:

      SAXParser *t = 0;
	XMLPlatformUtils::Initialize();

	t = new SAXParser();
	delete t;

      XMLPlatformUtils::Terminate();
	XMLPlatformUtils::Initialize();

	t = new SAXParser();  // Crashes here
	delete t;

      XMLPlatformUtils::Terminate();

If you take a look at the function gScannerMutex() in
internal/XMLScanner.cpp you will see that the static scannerMutex is only
initilized the first time gScannerMutex() is called, any other time it
returns the pointer.  But the pointer is BAD after a call to
XMLPlatformUtils::Terminate().  How I got things to work on my system is to
modify XMLDeleterFor<T> to take a T** in the constructor instead of a T* and
after the object is free'd zero out the pointer.  It looks like a few of the
other statics around which  use XMLDeleterFor have this same problem.  I've
included my diffs for a couple files since I can't do a commit....
Necessary changes to other files should be self explanatory.

David


===================================================================
RCS file: /home/cvspublic/xml-xerces/c/src/internal/XMLScanner.cpp,v
retrieving revision 1.18
diff -r1.18 XMLScanner.cpp
199c199
<     static bool      registered = false;
---
>     bool doregister = true;
207a208
> 			doregister = false;
214c215
<         if (!registered)
---
>         if (doregister)
218c219
<                 new XMLDeleterFor<XMLMutex>(scannerMutex)
---
>                 new XMLDeleterFor<XMLMutex>(&scannerMutex)
220d220
<             registered = true;
873c873
<                 new XMLDeleterFor<XMLMsgLoader>(gMsgLoader)
---
>                 new XMLDeleterFor<XMLMsgLoader>(&gMsgLoader)

===================================================================
RCS file: /home/cvspublic/xml-xerces/c/src/util/XMLDeleterFor.c,v
retrieving revision 1.1
diff -r1.1 XMLDeleterFor.c
78c78
< template <class T> XMLDeleterFor<T>::XMLDeleterFor(T* const toDelete) :
---
> template <class T> XMLDeleterFor<T>::XMLDeleterFor(T **toDelete) :
86c86,87
<    delete fToDelete;
---
>    delete *fToDelete;
>    *fToDelete = 0;


Re: XMLPlatformUtils::Terminate bug

Posted by Dean Roddey <dr...@charmedquark.com>.
As indicated before, at best we would have to define a completely unique
exception for this problem (not derived from XMLException), if we were going
to throw. XMLExceptions can only be thrown reliably if the transcoding
service is in place and the message loading system is working. So perhaps we
should make a special "InitFailureException" and throw that. But everyone
will have to remember to catch it. And throwing an exception will cause lot
of support issues for those folks who create global objects and it just
falls over without telling them why. There is no magic bullet here.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"You young, and you gotcha health. Whatchoo wanna job fer?"


----- Original Message -----
From: "Ken Freeman" <kf...@pobox.com>
To: <xe...@xml.apache.org>
Sent: Thursday, June 15, 2000 6:38 AM
Subject: Re: XMLPlatformUtils::Terminate bug


> No, no, a thousand times no! Never panic, just throw an exception. That's
> just what exceptions were made for.
>
> Ken Freeman
>
> ----- Original Message -----
> From: Andy Heninger <an...@jtcsv.com>
> To: <xe...@xml.apache.org>; Dean Roddey <dr...@charmedquark.com>
> Sent: Wednesday, June 14, 2000 8:17 PM
> Subject: Re: XMLPlatformUtils::Terminate bug
>
>
> > There is one case where calling Initialize() a second time works,
though.
> > If the xerces DLL has been unloaded and then reloaded, calling
Terminate()
> > prior to the unload and Initialize() after reloading does the right
thing.
> >
> > The difference between this and the scenario that David Crowley
described
> > is that reloading the DLL completely reinitializes all static variables.
> >
> > Having some cleaner failure than a crash, like a panic error, would be a
> > good thing.
> >
> > Andy Heninger
> > IBM XML Technology Group, Cupertino, CA
> > heninger@us.ibm.com
> >
> >
> >
> > ----- Original Message -----
> > From: "Dean Roddey" <dr...@charmedquark.com>
> > To: <xe...@xml.apache.org>
> > Sent: Wednesday, June 14, 2000 4:15 PM
> > Subject: Re: XMLPlatformUtils::Terminate bug
> >
> >
> > > IT was not designed as a way to clean up and restart the parser
system.
> > It
> > > was desigend to clean up before you exit. Calling Initialize again is
> > not
> > > defined, and I don't think we should even try to support it because it
> > would
> > > involve having to reset a lot of static flags/pointers used to fault
> > things
> > > in all over the place.
> > >
> > > --------------------------
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>


Re: [spam score 3.00/10.0 -pobox] Re: XMLPlatformUtils::Terminate bug

Posted by Ken Freeman <kf...@pobox.com>.
No way to print out the exception reason on the console? C'mon, you can do
that in the exception handler, if that's what you want.

The key is to throw something other than an XMLException object, which
relies on transcoding.

It's much cleaner to customize an exception handler rather than writing your
own panic function. The alternative, as Dean Roddey pointed out, is to
include a callback to a custom panic function with Initialize().

Ken

----- Original Message -----
From: Mike Pogue <mp...@apache.org>
To: <xe...@xml.apache.org>
Sent: Thursday, June 15, 2000 11:59 AM
Subject: [spam score 3.00/10.0 -pobox] Re: XMLPlatformUtils::Terminate bug


> We tried that.  Then people complained that there was an exception thrown,
> but no way to print it out on the console (because one reason for a panic
is
> that you have no transcoding service available).
>
> We changed it to a panic() call, and that made the problem go away.
> (You can do whatever you want in the panic() function, including throwing
an
> exception...)
>
> Bottom line:  We discovered that there are some errors that are more
serious than an
> exception would warrant.
>
> Mike
>
> Ken Freeman wrote:
> >
> > No, no, a thousand times no! Never panic, just throw an exception.
That's
> > just what exceptions were made for.
> >
> > Ken Freeman
> >
> > ----- Original Message -----
> > From: Andy Heninger <an...@jtcsv.com>
> > To: <xe...@xml.apache.org>; Dean Roddey
<dr...@charmedquark.com>
> > Sent: Wednesday, June 14, 2000 8:17 PM
> > Subject: Re: XMLPlatformUtils::Terminate bug
> >
> > > There is one case where calling Initialize() a second time works,
though.
> > > If the xerces DLL has been unloaded and then reloaded, calling
Terminate()
> > > prior to the unload and Initialize() after reloading does the right
thing.
> > >
> > > The difference between this and the scenario that David Crowley
described
> > > is that reloading the DLL completely reinitializes all static
variables.
> > >
> > > Having some cleaner failure than a crash, like a panic error, would be
a
> > > good thing.
> > >
> > > Andy Heninger
> > > IBM XML Technology Group, Cupertino, CA
> > > heninger@us.ibm.com
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "Dean Roddey" <dr...@charmedquark.com>
> > > To: <xe...@xml.apache.org>
> > > Sent: Wednesday, June 14, 2000 4:15 PM
> > > Subject: Re: XMLPlatformUtils::Terminate bug
> > >
> > >
> > > > IT was not designed as a way to clean up and restart the parser
system.
> > > It
> > > > was desigend to clean up before you exit. Calling Initialize again
is
> > > not
> > > > defined, and I don't think we should even try to support it because
it
> > > would
> > > > involve having to reset a lot of static flags/pointers used to fault
> > > things
> > > > in all over the place.
> > > >
> > > > --------------------------
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
>


Re: XMLPlatformUtils::Terminate bug

Posted by Mike Pogue <mp...@apache.org>.
We tried that.  Then people complained that there was an exception thrown,
but no way to print it out on the console (because one reason for a panic is
that you have no transcoding service available).  

We changed it to a panic() call, and that made the problem go away. 
(You can do whatever you want in the panic() function, including throwing an 
exception...)

Bottom line:  We discovered that there are some errors that are more serious than an
exception would warrant.

Mike

Ken Freeman wrote:
> 
> No, no, a thousand times no! Never panic, just throw an exception. That's
> just what exceptions were made for.
> 
> Ken Freeman
> 
> ----- Original Message -----
> From: Andy Heninger <an...@jtcsv.com>
> To: <xe...@xml.apache.org>; Dean Roddey <dr...@charmedquark.com>
> Sent: Wednesday, June 14, 2000 8:17 PM
> Subject: Re: XMLPlatformUtils::Terminate bug
> 
> > There is one case where calling Initialize() a second time works, though.
> > If the xerces DLL has been unloaded and then reloaded, calling Terminate()
> > prior to the unload and Initialize() after reloading does the right thing.
> >
> > The difference between this and the scenario that David Crowley described
> > is that reloading the DLL completely reinitializes all static variables.
> >
> > Having some cleaner failure than a crash, like a panic error, would be a
> > good thing.
> >
> > Andy Heninger
> > IBM XML Technology Group, Cupertino, CA
> > heninger@us.ibm.com
> >
> >
> >
> > ----- Original Message -----
> > From: "Dean Roddey" <dr...@charmedquark.com>
> > To: <xe...@xml.apache.org>
> > Sent: Wednesday, June 14, 2000 4:15 PM
> > Subject: Re: XMLPlatformUtils::Terminate bug
> >
> >
> > > IT was not designed as a way to clean up and restart the parser system.
> > It
> > > was desigend to clean up before you exit. Calling Initialize again is
> > not
> > > defined, and I don't think we should even try to support it because it
> > would
> > > involve having to reset a lot of static flags/pointers used to fault
> > things
> > > in all over the place.
> > >
> > > --------------------------
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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

Re: XMLPlatformUtils::Terminate bug

Posted by Ken Freeman <kf...@pobox.com>.
No, no, a thousand times no! Never panic, just throw an exception. That's
just what exceptions were made for.

Ken Freeman

----- Original Message -----
From: Andy Heninger <an...@jtcsv.com>
To: <xe...@xml.apache.org>; Dean Roddey <dr...@charmedquark.com>
Sent: Wednesday, June 14, 2000 8:17 PM
Subject: Re: XMLPlatformUtils::Terminate bug


> There is one case where calling Initialize() a second time works, though.
> If the xerces DLL has been unloaded and then reloaded, calling Terminate()
> prior to the unload and Initialize() after reloading does the right thing.
>
> The difference between this and the scenario that David Crowley described
> is that reloading the DLL completely reinitializes all static variables.
>
> Having some cleaner failure than a crash, like a panic error, would be a
> good thing.
>
> Andy Heninger
> IBM XML Technology Group, Cupertino, CA
> heninger@us.ibm.com
>
>
>
> ----- Original Message -----
> From: "Dean Roddey" <dr...@charmedquark.com>
> To: <xe...@xml.apache.org>
> Sent: Wednesday, June 14, 2000 4:15 PM
> Subject: Re: XMLPlatformUtils::Terminate bug
>
>
> > IT was not designed as a way to clean up and restart the parser system.
> It
> > was desigend to clean up before you exit. Calling Initialize again is
> not
> > defined, and I don't think we should even try to support it because it
> would
> > involve having to reset a lot of static flags/pointers used to fault
> things
> > in all over the place.
> >
> > --------------------------
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
>


Re: XMLPlatformUtils::Terminate bug

Posted by Andy Heninger <an...@jtcsv.com>.
There is one case where calling Initialize() a second time works, though.
If the xerces DLL has been unloaded and then reloaded, calling Terminate()
prior to the unload and Initialize() after reloading does the right thing.

The difference between this and the scenario that David Crowley described
is that reloading the DLL completely reinitializes all static variables.

Having some cleaner failure than a crash, like a panic error, would be a
good thing.

Andy Heninger
IBM XML Technology Group, Cupertino, CA
heninger@us.ibm.com



----- Original Message -----
From: "Dean Roddey" <dr...@charmedquark.com>
To: <xe...@xml.apache.org>
Sent: Wednesday, June 14, 2000 4:15 PM
Subject: Re: XMLPlatformUtils::Terminate bug


> IT was not designed as a way to clean up and restart the parser system.
It
> was desigend to clean up before you exit. Calling Initialize again is
not
> defined, and I don't think we should even try to support it because it
would
> involve having to reset a lot of static flags/pointers used to fault
things
> in all over the place.
>
> --------------------------



Re: XMLPlatformUtils::Terminate bug

Posted by Juergen Hermann <jh...@webde-ag.de>.
On Thu, 15 Jun 2000 19:47:07 -0700, Andy Heninger wrote:

>But if Dave wants the feature, and does the work,
>and convinces the list participants that the patch
>is simple and reliable, it seems to me that it ought
>to go in.  He's already put significant effort into
>getting it going for his use.

If the changes do not affect the performance nor the robustness of the 
"normal" use of the library, I see no reason to not include it. The 
added code size and slighty increased memory can be neglected, I think.


Ciao, Jürgen

--
Jürgen Hermann (jhe@webde-ag.de)
WEB.DE AG, Amalienbadstr.41, D-76227 Karlsruhe
Tel.: 0721/94329-0, Fax: 0721/94329-22



Re: XMLPlatformUtils::Terminate bug

Posted by Andy Heninger <an...@jtcsv.com>.
Dean wrote

> If the IBM crew want to accept your change,
> that's fine with me. 

Dean, you have as much say as anyone as to 
what will or won't go in.
It's the Apache parser, not the IBM parser,
and decision on whether this should go in
will happen here on the mail list.  

As to the technical issue at hand, my opinion is
that being able to terminate and reinitialize the
parser would be nice, but is hardly essential.

There's more to worry about that just objects on
the heap that have DeleterFors.  Those pointers
could have been copied around to other statics
(safely, as things now stand), or statics could
also be left with other state - just ints or
whatever.  Without looking, I don't know what
is lurking.  

I wouldn't want to promise or trust
that the xerces DLL could be reliably uninitialized and
reinitialized without taking a look at literaly
every static or global variable in there.

But if Dave wants the feature, and does the work,
and convinces the list participants that the patch
is simple and reliable, it seems to me that it ought
to go in.  He's already put significant effort into
getting it going for his use.


Andy Heninger
IBM XML Technology Group, Cupertino, CA
heninger@us.ibm.com





Re: XMLPlatformUtils::Terminate bug

Posted by David Crowley <dc...@san.rr.com>.
What if we were to do something like Dean's(?) XMLDeleterFor class that
would reinitialize statics.  Something like this:

template <typename T>
XMLReinitialize
{
private:
    T    fValue;
    T*    fInstance;
public:
    XMLReinitialize(T *instance, const T& value) : fValue(value),
fInstance(instance) {}
   ~XMLReinitialize() {*fInstance = fValue;}
}

And register them like the XMLDeleteFor's:

static long gSomething = 5;
.
.
.
XMLUtilities::RegisterReinitialize (new XMLReinitialize<long>(&gSomething,
5));

etc.  Something to that effect...  Just more bookkeeping but similar to what
we're doing with the statics we're freeing up.

David





Re: XMLPlatformUtils::Terminate bug

Posted by Dean Roddey <dr...@charmedquark.com>.
I didn't take it personally. I explained why you were wrong. I didn't say my
design was intended to do anything more than what it was intended to. Its
not designed to be called multiple times and that would be documented when
this code goes out for real. If the IBM crew want to accept your change,
that's fine with me. I just don't think its worth it. It would require the
deleter taking a pointer to a pointer, and it would mean that you could only
use the non-zero value of the pointer to indicate whether initialization was
done already or not. But, what if a class initializes a number of things and
uses a boolean to indicate that it has already done init or not?

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"You young, and you gotcha health. Whatchoo wanna job fer?"


----- Original Message -----
From: "David Crowley" <dc...@san.rr.com>
To: <xe...@xml.apache.org>; "Dean Roddey" <dr...@charmedquark.com>
Sent: Thursday, June 15, 2000 9:45 AM
Subject: Re: XMLPlatformUtils::Terminate bug


>
> YES it is broken because the current behavior of returning pointers to
freed
> memory and crashing SUCKS.  The patch that I sent to the list simply nulls
> out the pointer that is already being freed up.  We're already going
through
> and doing the bookkepping to free up these statics, whats wrong with also
> nulling them out?  I



Re: XMLPlatformUtils::Terminate bug

Posted by David Crowley <dc...@san.rr.com>.
YES it is broken because the current behavior of returning pointers to freed
memory and crashing SUCKS.  The patch that I sent to the list simply nulls
out the pointer that is already being freed up.  We're already going through
and doing the bookkepping to free up these statics, whats wrong with also
nulling them out?  I
don't see the problem about why it wasn't your design?  It's just a small
simple improvement that improves upon what currently happens in your design.
And yes, there are MANY libraries where you can call ther init/terminate
functions multiple times and they do fine.  Thats what commercial libraries
are about.  They take the extra time to make those kind of things work
because people are going to use your libraries in ways that you didn't
expect and in scenarios you don't expect so they can get real live world
work done.  If it's really such a bad and impossible thing to not call
initiliaze multiple times then at least throw an exception or something of
the like.  But from what I saw in the code, at least the places that used
the XMLDeleterFor object, things looked like they would work being called
multiple times.  And after I made the change I sent in my application worked
too.  At least, it appeared to
and Purify didn't bitch.  I didn't do extensive testing .. there could be
other problems lurking.. lilkely are.  I'm not attacking your design.  The
design is fine, it just needs to go one extra small step and null out the
pointer.  Dont take it so personally.

David





Re: XMLPlatformUtils::Terminate bug

Posted by Dean Roddey <dr...@charmedquark.com>.
No, its not broken. Its doing exactly what I designed it to do. If it
weren't then it would be broken. You might not agree with the design, but
its doing what its supposed to. Look, the problem is that when something is
faulted in, the flags or pointers or bits or whatever that say whether they
are there are not are spread out all over the place. Its one thing for that
lazy eval code to pass a pointer to the thing created and have it be deleted
later upon some call being made. Its quite another to have all those
different ways of keeping up with whether something already does or does not
exist being correctly reset. Its not that it couldn't possibly be done,
because almost everything can, but I don't believe its worth doing. I doubt
very seriously you have any other libraries that you use which support this,
eh? If you are unloading the DLL, that will work, because those flags get
reset when the DLL is reloaded. But to just randomly terminate and
re-initialize the parser isn't something that it was ever designed for, and
I can't see adding the extra complexity required to do it and keep it
maintained being worth it.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"You young, and you gotcha health. Whatchoo wanna job fer?"


----- Original Message -----
From: "David Crowley" <dc...@scitegic.com>
To: <xe...@xml.apache.org>; "Dean Roddey" <dr...@charmedquark.com>
Sent: Wednesday, June 14, 2000 5:11 PM
Subject: RE: XMLPlatformUtils::Terminate bug


>
> SO then that's broken.  I hate hearing the "it's too hard" lame excuse.
>
> -----Original Message-----
> From: Dean Roddey [mailto:droddey@charmedquark.com]
> Sent: Wednesday, June 14, 2000 4:16 PM
> To: xerces-c-dev@xml.apache.org
> Subject: Re: XMLPlatformUtils::Terminate bug



RE: XMLPlatformUtils::Terminate bug

Posted by Juergen Hermann <jh...@webde-ag.de>.
On Wed, 14 Jun 2000 17:11:15 -0700, David Crowley wrote:

>SO then that's broken.  I hate hearing the "it's too hard" lame excuse.

Hmmmm, it sounds like it's time for you to start working on it then.


Ciao, Jürgen

--
Jürgen Hermann (jhe@webde-ag.de)
WEB.DE AG, Amalienbadstr.41, D-76227 Karlsruhe
Tel.: 0721/94329-0, Fax: 0721/94329-22



RE: XMLPlatformUtils::Terminate bug

Posted by David Crowley <dc...@scitegic.com>.
SO then that's broken.  I hate hearing the "it's too hard" lame excuse.

-----Original Message-----
From: Dean Roddey [mailto:droddey@charmedquark.com]
Sent: Wednesday, June 14, 2000 4:16 PM
To: xerces-c-dev@xml.apache.org
Subject: Re: XMLPlatformUtils::Terminate bug


IT was not designed as a way to clean up and restart the parser system. It
was desigend to clean up before you exit. Calling Initialize again is not
defined, and I don't think we should even try to support it because it would
involve having to reset a lot of static flags/pointers used to fault things
in all over the place.



Re: XMLPlatformUtils::Terminate bug

Posted by Dean Roddey <dr...@charmedquark.com>.
IT was not designed as a way to clean up and restart the parser system. It
was desigend to clean up before you exit. Calling Initialize again is not
defined, and I don't think we should even try to support it because it would
involve having to reset a lot of static flags/pointers used to fault things
in all over the place.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"You young, and you gotcha health. Whatchoo wanna job fer?"


----- Original Message -----
From: "David Crowley" <dc...@scitegic.com>
To: <xe...@xml.apache.org>
Sent: Wednesday, June 14, 2000 2:26 PM
Subject: XMLPlatformUtils::Terminate bug


>
> Hello --
>
> I found some problems with XMLPlatformUtils::Terminate().  The following
> code will reproducibly crash on Win32, and probably all others because bad
> things happen:
>
>       SAXParser *t = 0;
> XMLPlatformUtils::Initialize();
>
> t = new SAXParser();
> delete t;
>
>       XMLPlatformUtils::Terminate();
> XMLPlatformUtils::Initialize();
>
> t = new SAXParser();  // Crashes here
> delete t;
>
>       XMLPlatformUtils::Terminate();
>
> If you take a look at the function gScannerMutex() in
> internal/XMLScanner.cpp you will see that the static scannerMutex is only
> initilized the first time gScannerMutex() is called, any other time it
> returns the pointer.  But the pointer is BAD after a call to
> XMLPlatformUtils::Terminate().  How I got things to work on my system is
to
> modify XMLDeleterFor<T> to take a T** in the constructor instead of a T*
and
> after the object is free'd zero out the pointer.  It looks like a few of
the
> other statics around which  use XMLDeleterFor have this same problem.
I've
> included my diffs for a couple files since I can't do a commit....
> Necessary changes to other files should be self explanatory.
>
> David
>
>
> ===================================================================
> RCS file: /home/cvspublic/xml-xerces/c/src/internal/XMLScanner.cpp,v
> retrieving revision 1.18
> diff -r1.18 XMLScanner.cpp
> 199c199
> <     static bool      registered = false;
> ---
> >     bool doregister = true;
> 207a208
> > doregister = false;
> 214c215
> <         if (!registered)
> ---
> >         if (doregister)
> 218c219
> <                 new XMLDeleterFor<XMLMutex>(scannerMutex)
> ---
> >                 new XMLDeleterFor<XMLMutex>(&scannerMutex)
> 220d220
> <             registered = true;
> 873c873
> <                 new XMLDeleterFor<XMLMsgLoader>(gMsgLoader)
> ---
> >                 new XMLDeleterFor<XMLMsgLoader>(&gMsgLoader)
>
> ===================================================================
> RCS file: /home/cvspublic/xml-xerces/c/src/util/XMLDeleterFor.c,v
> retrieving revision 1.1
> diff -r1.1 XMLDeleterFor.c
> 78c78
> < template <class T> XMLDeleterFor<T>::XMLDeleterFor(T* const toDelete) :
> ---
> > template <class T> XMLDeleterFor<T>::XMLDeleterFor(T **toDelete) :
> 86c86,87
> <    delete fToDelete;
> ---
> >    delete *fToDelete;
> >    *fToDelete = 0;
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>