delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/05/23/00:43:16

X-Spam-Check-By: sourceware.org
Message-ID: <4472929E.AF8C5DB@dessent.net>
Date: Mon, 22 May 2006 21:42:06 -0700
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: dereferenced NULL in setup-2.529 (possible patch)
References: <e4tjba$d7d$1 AT sea DOT gmane DOT org>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

mwoehlke wrote:

> I built setup (from the 2.529 tarball) and ran it in gdb, and got this
> stack trace:

Thanks for the debugging.  I must have missed the original report, as I
don't see the parent post of this thread.  Under what circumstances is
this repeatable?  It looks like the probable case is that
get_url_to_string() is not able to fetch the URL of the mirrors list,
and hence 'mirrors' is empty.

As cgf alludes, the state of string handling in setup is currently quite
a mess.  There is kind of a mix std::string, a homemade String class,
and C strings.  We're trying to get rid of the homemade kind.

From looking at site.cc it seems that get_site_list() is in dire need of
refactoring.  I think it would make things a lot simpler to just have
load_site_list() take a string, and then process it using c_str(),
skipping the whole new_cstr_char_array() mess.  It makes no sense to go
and allocate something just to pass to load_site_list(), only to then
free it.  And eventually everything in String++.{cc,h} needs to die
anyway.

I will try to prepare a fix along these lines soon.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019