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] Fix invalid use of va_list


Looks good (obvious).  This is not a legally significant change, so
I'll just commit it.

Thanks!

Ulrich Weigand <weigand@i1.informatik.uni-erlangen.de> writes:

> Hello,
> 
> gdb crashes on s390 when the user answers a (y or n) question with
> something else.  This is caused by the 'query' function reusing a
> va_list variable initialized only once multiple times.
> 
> This is not allowed according to the C standard (C99 7.15.3), and
> in fact doesn't work on platforms that define va_list as an array
> type.
> 
> The patch below changes query to reinitialize the va_list variable
> with va_start before each use.
> 
> Tested on s390-ibm-linux.
> 
> ChangeLog:
> 
> 	* utils.c (query): Do not use a va_list variable multiple times.


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