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

Jose Fonseca jfonseca at vmware.com
Fri May 24 08:54:03 UTC 2019


Reviewed-by: Jose Fonseca <jfonseca at vmware.com>

Thanks.

Jose

________________________________
From: sroland at vmware.com <sroland at vmware.com>
Sent: Friday, May 24, 2019 02:08
To: Jose Fonseca; mesa-dev at lists.freedesktop.org
Cc: Roland Scheidegger
Subject: [PATCH] gallivm: fix default cbuf info.

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.
---
 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;
    }

--
2.17.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190524/a93d11d4/attachment.html>


More information about the mesa-dev mailing list