panfrost/decode: Print line number of bad memory access
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 11 Jun 2019 20:47:37 +0000 (13:47 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 12 Jun 2019 21:14:53 +0000 (14:14 -0700)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pandecode/decode.h

index 2a78fee1d408c04d6b44d1e641591b5285f6db55..9c788bbabcc57832b0ddc1dc08552b1d7f796f2c 100644 (file)
@@ -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);