Mesa (master): gallivm: Initialize stack values

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Sat Feb 26 19:13:36 UTC 2011


Module: Mesa
Branch: master
Commit: 11f9ec5422b45f2bbcffec26f692a6a22e0aaef2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=11f9ec5422b45f2bbcffec26f692a6a22e0aaef2

Author: Jakob Bornecrantz <jakob at vmware.com>
Date:   Sat Feb 26 20:12:27 2011 +0100

gallivm: Initialize stack values

valgrind gives me a warning with llvmpipe with profile builds but
not debug builds, this seems to fix the issue at least.

---

 src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index e685f4b..1fec3ad 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -832,14 +832,14 @@ lp_build_sample_mipmap(struct lp_build_sample_context *bld,
                        LLVMValueRef *colors_out)
 {
    LLVMBuilderRef builder = bld->gallivm->builder;
-   LLVMValueRef size0;
-   LLVMValueRef size1;
-   LLVMValueRef row_stride0_vec;
-   LLVMValueRef row_stride1_vec;
-   LLVMValueRef img_stride0_vec;
-   LLVMValueRef img_stride1_vec;
-   LLVMValueRef data_ptr0;
-   LLVMValueRef data_ptr1;
+   LLVMValueRef size0 = NULL;
+   LLVMValueRef size1 = NULL;
+   LLVMValueRef row_stride0_vec = NULL;
+   LLVMValueRef row_stride1_vec = NULL;
+   LLVMValueRef img_stride0_vec = NULL;
+   LLVMValueRef img_stride1_vec = NULL;
+   LLVMValueRef data_ptr0 = NULL;
+   LLVMValueRef data_ptr1 = NULL;
    LLVMValueRef colors0[4], colors1[4];
    unsigned chan;
 




More information about the mesa-commit mailing list