This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin setup crashes

On Tue, 4 Mar 2003, Max Bowsher wrote:

> > Call stack:
> > 00406816  SETUP.EXE:00406816  compress_gz::destroy()
> > ...
> >      free (outbuf);
> >    if (original)
> >>     delete original;
> >  }
> Interesting indeed. Something very weird is happening, if a non-null pointer
> if causing a segfault on being deleted. I wonder if it could be a
> double-free. I'll fiddle with this.
> Manu: Just to confirm, this is setup from HEAD of CVS, showing version 2.312
> on it's splash page?
> Also, could you send the output of 'find' run from your local package
> directory? (as an attachment)

How about this snippet from

 if (thefile)
      String fn;
      if (type == package_binary)
          io_stream *tmp = io_stream::open (String 
("cygfile:///etc/setup/") +
                                   + ".lst.gz", "wb");
          lst = new compress_gz (tmp, "w9");
          if (lst->error ())
              delete lst;
              lst = NULL;

It looks suspicious. delete-ing 'lst' after an error may cause double free
as you suggested, because the destroy() method is called in contrsuct(),
if error condition is detected.

Now i see something really interesting. The patch the I wanted to be 
backported to 200206, seems to be applied incorrectly to HEAD. I think 
this is the real cause of the problem.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]