This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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: [patch] Crash on windows hosts


On Wed, Apr 27, 2005 at 11:27:21PM -0400, Daniel Jacobowitz wrote:
>On Thu, Apr 28, 2005 at 03:00:34AM +0100, Paul Brook wrote:
>> serial_fdopen can return NULL on non-unix (ie. windows) hosts. This was 
>> causing a segfault in print_flush.
>> The attached patch fixes this.
>> 
>> Ok?
>> 
>> Paul
>> 
>> 2005-04-28  Paul Brook  <paul@codesourcery.com>
>> 
>> 	* exceptions.c (print_flush): Handle NULL gdb_stdout_serial.
>
>Hmm, this is probably OK... yeah, should be safe.  Give it a day in
>case anyone who knows more about Windows than I do wants to object.  I
>can't think of any reason to do this; we've already called the stdio
>flush routines.  At worst it'll be cosmetic.

I didn't look closely to see why Windows would return a NULL when other
systems would not but given that it is obviously possible for
serial_fdopen to return NULL, it seems like this patch is correct.

So, I'd agree with Daniel that it should be checked in.

cgf


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