From c870f84dc05edc785d2abe4f89430695f9d5bd1c Mon Sep 17 00:00:00 2001 From: Heinrich Fink Date: Tue, 6 Jul 2021 20:37:52 +0200 Subject: [PATCH] softpipe: add missing sentinel to debug option array MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add DEBUG_NAMED_VALUE_END to finalize debug option array (see lp_screen.c). Otherwise debug_get_flags_option might attempt to read debug_named_value::name at an offset and SIGSEGV. Signed-off-by: Heinrich Fink Fixes: 991def0edc8 ("softpipe: Convert to comma-separated SOFTPIPE_DEBUG for debug options.") Reviewed-by: Marcin Ĺšlusarz Reviewed-by: Emil Velikov Part-of: (cherry picked from commit a2c92da9a1d333737c3483714de5334c33d4062f) --- .pick_status.json | 2 +- src/gallium/drivers/softpipe/sp_screen.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 30edd9efc07..2eb1f82299d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1777,7 +1777,7 @@ "description": "softpipe: add missing sentinel to debug option array", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "991def0edc823293d593fc23d2243556cbdc0ff4" }, diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index b652b4d260e..1aaf9119631 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -55,6 +55,7 @@ static const struct debug_named_value sp_debug_options[] = { {"no_rast", SP_DBG_NO_RAST, "no-ops rasterization, for profiling purposes"}, {"use_llvm", SP_DBG_USE_LLVM, "Use LLVM if available for shaders"}, {"use_tgsi", SP_DBG_USE_TGSI, "Request TGSI from the API instead of NIR"}, + DEBUG_NAMED_VALUE_END }; int sp_debug;