>
> >   Basically i have my own malloc, free and load that using LD_PRELOAD
>> before i profile
>> >   the app. I wanted to add stack trace for each alloc/free. I send the
>> LR return address
>> >   from each stack frame to a host where i will do the symbol mapping and
>> make it in
>> >   human readable format.
>> >
>> >   The first part works fine but when i link with libunwind, the app
>> crashes after sending
>> >   some 20K entries. I tried a simple application that does malloc and
>> free with default gcc
>> >   options and it works fine. This app is compiled with O3 flags for some
>> libraries and
>> >   Os flag for some. basically it is a big beasty app. Here are the
>> details
>>
>> You don't mention where the sending stacks to other machine comes in your
>> workflow and exact information about the crash causes.
>
>
>
Here is the snip from the core file and from the logs, it is at the start of
the app itself. None of these address fall within the application address
map and these must from the shared libraries - either libc, c++, pthread
etc?



Program terminated with signal 11, Segmentation fault.
#0  0x4055bca4 in ?? ()

Thread 2 (Thread 1134):
#0  0x400c7ba4 in ?? ()
No symbol table info available.
#1  0x400c7b34 in ?? ()
No symbol table info available.
#2  0x400c7b34 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 1135):
#0  0x4055bca4 in ?? ()
No symbol table info available.
#1  0x4055c1a0 in ?? ()
No symbol table info available.
#2  0x4055c1a0 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb


*Even if i don't call any of the unwind apis, it crashes exactly at this
point with similar core*. So this issue is not happening when we are
unwinding. But something when we link with libunwind is causing the the
crash.

I wrote a small C program with multiple mallocs and free and i can get the
stack trace as intended. Not sure if this is anything to do with mix and
match of c, c++ code.

Is it something to do with link order or do i need to explicitly specify the
unwind method. I found "Gtests-nomalloc.c" inside "tests" dir and according
to Ken - it passes.

Any pointers? Also i am thinking of linking libunwind with my library as
static instead of shared but i could not get this successful. Do i need to
rebuild libunwind with any specific option?

If we have to use this method of unwinding UNW_ARM_UNWIND_METHOD=4 should we
set it while compiling my library?
_______________________________________________
Libunwind-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/libunwind-devel

Reply via email to