There is a multithreaded app running on Linux, CPU architecture is x86_64. I want to be able to obtain stack trace as backtrace() function does. After signal handler returns the app will continue running. This is SIGUSR1 handler.
backtrace() is considered not signal safe and I can’t convince myself it can be used from signal handler in this scenario.
I saw couple comments stating LLVM libunwind is signal safe, though didn’t find such statement e.g. in library docs.
So is it safe to use libunwind from a signal handler? If yes, why?
If not, what are other options?