From: Alyssa Rosenzweig Date: Tue, 11 Jun 2019 20:47:37 +0000 (-0700) Subject: panfrost/decode: Print line number of bad memory access X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b96df80069ffa532cec306dfe197513ecb03ddc1;p=mesa.git panfrost/decode: Print line number of bad memory access Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/gallium/drivers/panfrost/pandecode/decode.h b/src/gallium/drivers/panfrost/pandecode/decode.h index 2a78fee1d40..9c788bbabcc 100644 --- a/src/gallium/drivers/panfrost/pandecode/decode.h +++ b/src/gallium/drivers/panfrost/pandecode/decode.h @@ -59,6 +59,12 @@ __pandecode_fetch_gpu_mem(const struct pandecode_mapped_memory *mem, if (!mem) mem = pandecode_find_mapped_gpu_mem_containing(gpu_va); + if (!mem) { + fprintf(stderr, "Access to unknown memory %" PRIx64 " in %s:%d", + gpu_va, filename, line); + assert(0); + } + assert(mem); assert(size + (gpu_va - mem->gpu_va) <= mem->length);