X-Spam-Check-By: sourceware.org Message-ID: <4472929E.AF8C5DB@dessent.net> Date: Mon, 22 May 2006 21:42:06 -0700 From: Brian Dessent 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: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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/