[Mesa-dev] [PATCH] st/mesa: use signed temporary variable to store _ColorDrawBufferIndexes

Emil Velikov emil.l.velikov at gmail.com
Wed Jan 15 04:34:57 PST 2014


On 15/01/14 12:11, Marek Olšák wrote:
> On Wed, Jan 15, 2014 at 12:49 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> The temporary variable used to store _ColorDrawBufferIndexes must be
>> signed (GLint), otherwise the following conditional will be incorrectly
>> evaluated. Leading to crashes in the driver/mesa or accessing/writing
>> to arbitrary memory location. The bug dates back to 2009.
>>
>> Cc: 10.0 9.2 9.1 <mesa-stable at lists.freedesktop.org>
>> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
>> ---
>>
>> Rather old bug, spotted after Marek's recent patches covering the
>> area. Curious if there is any particular reason why we do not
>> enable more compiler warning messages.
>>
>> How do people feel on the subject of enabling more (all even) compiler
>> warnings on gcc compatible compilers ?
> 
> Some warnings tend to be annoying and not useful. For the patch:
> 
Indeed, especially if there are thousands of them.
-Wall -Wextra -Wconversion produces ~ 31k warnings :)

Although -Wtype-limits sounds very interesting.

Thanks for the review Marek

Emil

> Reviewed-by: Marek Olšák <marek.olsak at amd.com>
> 
> Marek
> 



More information about the mesa-dev mailing list