[Intel-gfx] [PATCH i-g-t] kms_atomic_transition: Initialize pipe_crcs to avoid segfault

Brian Starkey brian.starkey at arm.com
Fri Feb 17 15:26:54 UTC 2017


igt_pipe_crc_new() is skipped for non-Intel devices, but the later calls
to collect_crcs_mask() will attempt to retrieve CRC values if the
pipe_crcs pointers are non-NULL.

Zero-initialise pipe_crcs to avoid accessing garbage pointers on
non-Intel devices.

Signed-off-by: Brian Starkey <brian.starkey at arm.com>
---
 tests/kms_atomic_transition.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index ba8c8b5ca02b..1599f0b36c4e 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -608,7 +608,7 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock
 	struct igt_fb fbs[2];
 	int i, j;
 	unsigned iter_max = 1 << display->n_pipes;
-	igt_pipe_crc_t *pipe_crcs[I915_MAX_PIPES];
+	igt_pipe_crc_t *pipe_crcs[I915_MAX_PIPES] = { 0 };
 	igt_output_t *output;
 	unsigned width = 0, height = 0;
 	bool skip_test = false;
-- 
1.7.9.5



More information about the Intel-gfx mailing list