[Mesa-dev] [PATCH] gallivm: fix default cbuf info.

Roland Scheidegger sroland at vmware.com
Tue May 28 00:08:44 UTC 2019


Am 27.05.19 um 11:39 schrieb Juan A. Suarez Romero:
> On Fri, 2019-05-24 at 03:08 +0200, sroland at vmware.com wrote:
>> From: Roland Scheidegger <sroland at vmware.com>
>>
>> The default null_output really needs to be static, otherwise the values
>> we'll eventually get later are doubly random (they are not initialized,
>> and even if they were it's a pointer to a local stack variable).
>> VMware bug 2349556.
> 
> 
> Shouldn't this be CC to @stable ?
I forgot to mention this, but it should not actually be an issue in the
public branch, since that part of the information gathered there isn't
actually used by llvmpipe, hence if it contains garbage or not doesn't
matter. So there isn't really any need for stable.
But we have a branch where llvmpipe uses it.

Roland

> 
> 
>> ---
>>  src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c
>> index b4e3c2fbc8..9fc9b8c77e 100644
>> --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c
>> +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c
>> @@ -608,7 +608,7 @@ finished:
>>      */
>>  
>>     for (index = 0; index < PIPE_MAX_COLOR_BUFS; ++index) {
>> -      const struct lp_tgsi_channel_info null_output[4];
>> +      static const struct lp_tgsi_channel_info null_output[4];
>>        info->cbuf[index] = null_output;
>>     }
>>  
> 



More information about the mesa-dev mailing list