<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Android 8.1: radv segfault with 3Dmark vulkan benchmarks"
href="https://bugs.freedesktop.org/show_bug.cgi?id=107351#c11">Comment # 11</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Android 8.1: radv segfault with 3Dmark vulkan benchmarks"
href="https://bugs.freedesktop.org/show_bug.cgi?id=107351">bug 107351</a>
from <span class="vcard"><a class="email" href="mailto:issor.oruam@gmail.com" title="Mauro Rossi <issor.oruam@gmail.com>"> <span class="fn">Mauro Rossi</span></a>
</span></b>
<pre>Hi Bas,
thanks for your instructions
I've tracked the line crashing in the radv_image.c file in master branch
utente@utente-MS-7576:~/oreo-x86_hwc1$ addr2line -Cfe
out/target/product/x86_64/symbols/system/vendor/lib/hw/vulkan.radv.so
000f3407
vk_format_get_nr_components
external/mesa/src/amd/vulkan/vk_format.h:535
000f45e6
radv_CreateImage
external/mesa/src/amd/vulkan/radv_image.c:1261
^C
I don't trust too much addr2lib when the most recent code line is an header,
so I added ALOGD lines with LOG_TAG RADV
in order to have the incremental inspection of
radv_image_from_gralloc() arguments to expose the
argument affected by null pointer, here is what I did:
>From f2db3b5a70aaf66e9bf60c42da99560e6e5b6c13 Mon Sep 17 00:00:00 2001
From: Mauro Rossi <<a href="mailto:issor.oruam@gmail.com">issor.oruam@gmail.com</a>>
Date: Thu, 26 Jul 2018 23:48:54 +0200
Subject: [PATCH] DO NOT MERGE: add incremental dump of
radv_image_from_gralloc() arguments
Looking at the line crashing we will identity the argument with null pointer
---
src/amd/vulkan/radv_image.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 826f898d28..b1141c71e2 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -25,6 +25,9 @@
* IN THE SOFTWARE.
*/
+#define LOG_TAG "RADV"
+
+#include <cutils/log.h>
#include "radv_debug.h"
#include "radv_private.h"
#include "vk_format.h"
@@ -1248,7 +1251,11 @@ radv_CreateImage(VkDevice device,
#ifdef ANDROID
const VkNativeBufferANDROID *gralloc_info =
vk_find_struct_const(pCreateInfo->pNext,
NATIVE_BUFFER_ANDROID);
-
+ ALOGD("radv_image_from_gralloc() device=0x%x", device);
+ ALOGD("radv_image_from_gralloc() *pCreateInfo=0x%x", *pCreateInfo);
+ ALOGD("radv_image_from_gralloc() gralloc_info=0x%x", gralloc_info);
+ ALOGD("radv_image_from_gralloc() *pAllocator=0x%x", *pAllocator);
+ ALOGD("radv_image_from_gralloc() *pImage=0x%x", *pImage);
if (gralloc_info)
return radv_image_from_gralloc(device, pCreateInfo,
gralloc_info,
pAllocator, pImage);
--
2.17.1
The output in the logcat is:
... D RADV : radv_image_from_gralloc() device=
... D RADV : radv_image_from_gralloc() *pCreateInfo=0xe
... D RADV : radv_image_from_gralloc() gralloc_info=0xc502a0e8
... F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x10 in tid 5548
(Thread-9), pid 5501 (cation:workload)
The crash happened with pAllocator, so this argument is the null pointer.
Mauro</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>