[cfe-users] Problem with address sanitizer stack traces
Alexey Samsonov via cfe-users
cfe-users at lists.llvm.org
Tue Nov 24 10:52:57 PST 2015
Try to add ASAN_OPTIONS=fast_unwind_on_malloc=0. It's possible that stack
traces go through smth. like libstdc++ which is built without frame
pointers.
On Tue, Nov 24, 2015 at 12:49 AM, Rainer Gerhards via cfe-users <
cfe-users at lists.llvm.org> wrote:
> Hi all,
>
> first, thanks for the great tool, especially the address sanitizer. I
> have a multi-threaded program, where I get a segfault due to access to
> free'd memory in one thread. In the report, I see references to where
> this memory block was malloc'ed and free'ed. Unfortunately, these
> later two stack traces just include 2 and 3 stack frames, where it
> would need to be around 15. Most importantly, the information I really
> need is missing due to that.
>
> I tried to explicitely set
>
> ASAN_OPTIONS=verbosity=1:malloc_context_size=20
>
> even though malloc_context_size should be 30 by default. I know
> ASAN_OPTIONS is used, because my output now is verbose.
>
> I compile with
>
> -g -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith
> -Wmissing-format-attribute -fsanitize=address -fno-omit-frame-pointer
> -O0
>
> Note that I added -O0 in a desparate effort to try to get to larger
> stack traces. Nothing changes if I leave it out.
>
> I than wrote a small single-threaded test program, and there large
> stack traces are reported.
>
> Does anyone have any advise on how to get to larger stack traces? Or
> at least what could be the root cause of this problem?
>
> Any help would be deeply appreciated.
>
> Thanks,
> Rainer
> _______________________________________________
> cfe-users mailing list
> cfe-users at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
>
--
Alexey Samsonov
vonosmas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20151124/c1311bbc/attachment.html>
More information about the cfe-users
mailing list