Re: [scaffold] don't crash on exit



Aurelien,

I have been going through your patches.  The gnome-session patch which
you say free's the doc variable too soon does not make sense to me.  I
have worked on the code previously.  Basicly it looks like it is
correctly reading the XML file, parsing it and populating a hash.  The
pointer to the XML stucture is then freed with xmlFreeDoc.  This is the
correct behavior as the doc should not be accessed after that. 

Your patch holds onto the XML doc structure until the session object is
destroyed (which is on exit).  Right now it is not much of a problem and
may fix the crash but since unknown plugins can create arbitrarily long
session groups there is a remote chance of quite a bit of memory being
waisted (groups are arbitrary XML structures that are not parsed by the
session manager and are instead passed directly to the plugin that
created the group).

Please identify the line where the crash is happening and how it is
related to the in memory XML structure (e.g. the doc variable).

--
J5 

On Sun, 2003-12-21 at 06:42, aurelien naldi wrote:
> hello,
> 
> the attached patch prevents scaffold from crashing on exit and remove an
> unused variable.
> 
> a xmlDoc was freed too early and its memory reused.
> 
> happy hollidays to all :)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]