[Mesa-dev] [PATCH 2/2] gallium/util: libunwind support

Rob Clark robdclark at gmail.com
Mon Apr 3 20:28:14 UTC 2017


On Mon, Apr 3, 2017 at 4:06 PM, Thomas Hellstrom <thellstrom at vmware.com> wrote:
> On 04/03/2017 07:33 PM, Thomas Hellstrom wrote:
>> On 04/03/2017 07:13 PM, Rob Clark wrote:
>>> On Mon, Apr 3, 2017 at 12:56 PM, Thomas Hellstrom <thellstrom at vmware.com> wrote:
>>>> Hi, Rob,
>>>>
>>>> On 03/24/2017 10:21 PM, Rob Clark wrote:
>>>>> It's kinda sad that (a) we don't have debug_backtrace support on !X86
>>>>> and that (b) we re-invent our own crude backtrace support in the first
>>>>> place.  If available, use libunwind instead.  The backtrace format is
>>>>> based on what xserver and weston use, since it is nice not to have to
>>>>> figure out a different format.
>>>>>
>>>>> Signed-off-by: Rob Clark <robdclark at gmail.com>
>>>> Did you consider glibc "backtrace()", I think it's also available on ARM...
>>> I had not.. although xserver and weston are already using libunwind.
>>> I'm not sure about portability of libunwind to other libc
>>> implementations (but I guess it is at least not worse than using a
>>> glibc specific API).
>>>
>>> I suppose we could always add a fallback to backtrace().
>>>
> Hmm. This commit (bisected) appears to break svga/vmwgfx in DEBUG mode:
>
> *** Error in `glxgears': malloc(): memory corruption: 0x00000000025c09c0 ***
> Aborted (core dumped)
>
> The svga linux winsys makes extensive use of the backtrace functionality
> using u_debug_flush.c

hmm, do you think I should be able to reproduce by sprinkling some
calls to debug_flush_alert()?

I was using it mostly w/ the refcnt logging before..

BR,
-R


More information about the mesa-dev mailing list