Mesa (master): intel: aubinator_error_decode: fix segfault on missing register
Lionel Landwerlin
llandwerlin at kemper.freedesktop.org
Mon Feb 26 16:55:49 UTC 2018
Module: Mesa
Branch: master
Commit: fca9f5b5851d2eeba6d030e28dd783017fef55cf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fca9f5b5851d2eeba6d030e28dd783017fef55cf
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Thu Feb 22 13:41:10 2018 +0000
intel: aubinator_error_decode: fix segfault on missing register
Some register might be missing in our genxmls. Don't try to decode
them.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/intel/tools/aubinator_error_decode.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/intel/tools/aubinator_error_decode.c b/src/intel/tools/aubinator_error_decode.c
index 2331114b44..017be5bbc2 100644
--- a/src/intel/tools/aubinator_error_decode.c
+++ b/src/intel/tools/aubinator_error_decode.c
@@ -65,7 +65,8 @@ print_head(unsigned int reg)
static void
print_register(struct gen_spec *spec, const char *name, uint32_t reg)
{
- struct gen_group *reg_spec = gen_spec_find_register_by_name(spec, name);
+ struct gen_group *reg_spec =
+ name ? gen_spec_find_register_by_name(spec, name) : NULL;
if (reg_spec) {
gen_print_group(stdout, reg_spec, 0, ®, 0,
More information about the mesa-commit
mailing list