X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: mwoehlke Subject: Re: dereferenced NULL in setup-2.529 (possible patch) Date: Tue, 23 May 2006 10:11:29 -0500 Lines: 50 Message-ID: References: <4472929E DOT AF8C5DB AT dessent DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 1.5.0.2 (X11/20060420) In-Reply-To: <4472929E.AF8C5DB@dessent.net> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 Brian Dessent wrote: > 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. No, you probably didn't... the original report was buried in http://cygwin.com/ml/cygwin/2006-05/msg00074.html which didn't seem to get much reading, under "hmm, that's funny, now it's working". That was on my W2k3 R2 computer. Originally, I gave up trying to debug it because it seemed to be a fluke. It isn't an empty mirror list problem, though; on my XP computer, it consistently blows up shortly /after/selecting/ a mirror, so your guess is about one step too early :-). Anyway, I found something interesting... I was using http://mirrors.kernel.org when it blew up. If I use http://mirrors.mcs.anl.gov, then it's OK. > 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. Ok, you know the code much better than I. :-) Meanwhile, it WFM with the patch in the previous message, so I'll just run that (or use a different mirror ;-)) until there is another snapshot or release. p.s. What's the snapshot schedule for setup.exe... less often that cygwin1.dll, I take it? -- Matthew Interix, Sphinterix. Cygwin apps don't crash. :-) -- 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/