[Mesa-stable] [PATCH 1/2] r300g/compiler/tests: Fix segfault

Tom Stellard tom at stellard.net
Wed Aug 7 17:40:58 PDT 2013


From: Tom Stellard <thomas.stellard at amd.com>

CC: "9.2" <mesa-stable at lists.freedesktop.org>
---
 .../drivers/r300/compiler/tests/radeon_compiler_optimize_tests.c      | 2 +-
 .../drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c      | 4 ++--
 src/gallium/drivers/r300/compiler/tests/radeon_compiler_util_tests.c  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/r300/compiler/tests/radeon_compiler_optimize_tests.c b/src/gallium/drivers/r300/compiler/tests/radeon_compiler_optimize_tests.c
index 819fb6c..3244d93 100644
--- a/src/gallium/drivers/r300/compiler/tests/radeon_compiler_optimize_tests.c
+++ b/src/gallium/drivers/r300/compiler/tests/radeon_compiler_optimize_tests.c
@@ -80,7 +80,7 @@ static void test_runner_rc_optimize(struct test_result * result)
 
 unsigned radeon_compiler_optimize_run_tests()
 {
-	struct test tests[] = {
+	static struct test tests[] = {
 		{"rc_optimize() => peephole_mul_omod()", test_runner_rc_optimize},
 		{NULL, NULL}
 	};
diff --git a/src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c b/src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c
index eeb6b07..511596c 100644
--- a/src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c
+++ b/src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c
@@ -91,8 +91,8 @@ static void tex_1d_swizzle(struct test_result *result)
 
 unsigned radeon_compiler_regalloc_run_tests()
 {
-	struct test tests[] = {
-		{"rc_pair_regalloc() => TEX 1D Swizzle - r300", tex_1d_swizzle},
+	static struct test tests[] = {
+		{"rc_pair_regalloc() => TEX 1D Swizzle - r300", tex_1d_swizzle },
 		{NULL, NULL}
 	};
 	return run_tests(tests);
diff --git a/src/gallium/drivers/r300/compiler/tests/radeon_compiler_util_tests.c b/src/gallium/drivers/r300/compiler/tests/radeon_compiler_util_tests.c
index 33b27fc..3e97594 100644
--- a/src/gallium/drivers/r300/compiler/tests/radeon_compiler_util_tests.c
+++ b/src/gallium/drivers/r300/compiler/tests/radeon_compiler_util_tests.c
@@ -96,7 +96,7 @@ static void test_runner_rc_inst_can_use_presub(struct test_result * result)
 
 unsigned radeon_compiler_util_run_tests()
 {
-	struct test tests[] = {
+	static struct test tests[] = {
 		{"rc_inst_can_use_presub()", test_runner_rc_inst_can_use_presub},
 		{NULL, NULL}
 	};
-- 
1.8.1.4



More information about the mesa-stable mailing list