From: Roland Scheidegger Date: Fri, 24 May 2019 00:41:12 +0000 (+0200) Subject: gallivm: fix default cbuf info. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d4e8a44bf6403109f0e6e22650b0379d305712db;p=mesa.git gallivm: fix default cbuf info. 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. Reviewed-by: Jose Fonseca --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c index b4e3c2fbc84..9fc9b8c77ec 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; }