[PATCH 1/4] ldv/unwind: enable cache feature of libunwind

enh enh at google.com
Thu Apr 17 04:44:26 UTC 2014


the crashes i remember were mainly caused by libunwind doing unsafe
memory accesses. remote mode is fine because ptrace just returns an
error, but local mode is disastrous. that probably doesn't matter for
strace though.

On Wed, Apr 16, 2014 at 12:46 AM, Masatake YAMATO <yamato at redhat.com> wrote:
> Hi,
>
>> i don't know whether you care, but Android recently switched to
>> libunwind and we had to rewrite the caching because it's so leaky.
>> we've also found libunwind copes badly with processes that are
>> crashed/crashing --- there are no sanity checks before dereferences.
>> we [think we've] fixed this locally, but we haven't managed to get
>> much upstreamed yet.
>>
>> you can see our local changes here:
>>
>> https://android-review.googlesource.com/#/q/project:platform/external/libunwind
>
> Do you mean dwarf cache or mmap cache?
>
> As far as trying dwarf cache(with strace), it works fine. I have never
> got crashing. For me you are talking about mmap cache.
>
> As far as I know there is no mmap cache API in libunwind.  I proposed
> mmap cache API but I got requests to improve from reviewer. A person
> at google also submmited a patch about similar area.
>
> BTW, I was notified that elfutils has good unwinder.
> It has good mmap cache mechanism. It can show source file name
> and line number in stacktrace.
>
> Thank you for notifying. Many interesting patches in the repository.
> I hope the patches are merged to upstream:)
>
> Masatake YAMATO



-- 
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Java i18n/JNI/NIO, or bionic questions? Mail me/drop by/add me as a reviewer.




More information about the Strace-devel mailing list