mvduin/arm-signal-unwind

glibc: abort signal not containing the unwind information

Closed this issue · 3 comments

I have a issue with glibc 2.22 where I am not able to fetch the correct unwind information for the SIGABRT. I am using sentry for analyzing the minidump, where the backtraces are not appropriate after calling into the libc's abort function.
Attaching the screenshot for the issue which I am talking about.
Screenshot from 2021-10-18 14-22-21
Here, I am using assert(0) for raising the abort from my application. I have enabled the unwind for glibc by using flag CFLAGS += "-funwind-tables" but still it is using stack scanning. So will this library will be useful in my case or am I missing something here?
I also tried with couple of other flags such as "-rdynamic", "-fno-omit-frame-pointer", but it didn't help.

This library (which is really just a standalone glibc bugfix) fixes unwinding through signal handler frames on glibc-based 32-bit ARM-EABI linux systems. It is required if you want to be able to use unwind (e.g. throw exceptions or create unwind-based backtraces) from inside any signal handler on this specific target.

Of course you'll also need to ensure functions in the call stack have unwind tables (which can be ensured through compiler flags for C/C++ while any assembly functions in the call stack must be explicitly annotated with suitable directives to allow generation of unwind tables). Moreover, the signal must not have interrupted a function inside a CANTUNWIND section, which is why asynchronous exceptions are not supported (-fasynchronous-unwind-tables does not work on ARM-EABI afaik) and handling exceptions caused by memory access (e.g. SEGV) or floating-point operations requires compiling with -fnon-call-exceptions.

I'm puzzled why you created this github issue instead of just trying the library to see if it solves your problem.

Do you have further questions or can I close this issue?

Apologies for the delay,
Yes this issue is resolved now and we can close this issue.