rust-lang / backtrace-rs

Backtraces in Rust

Home Page:https://docs.rs/backtrace

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is backtrace-rs compat with llvm libunwind on linux?

SchrodingerZhu opened this issue · comments

Hi, I am trying to use this lib with one of my projects which are built under complete LLVM toolchain on Linux (there is no libgcc_s.so anymore). However, it seems that when I triggered backtrace via pprof-rs, very frequently, the profiling process will then cause a segfault. What's worse, when I opened the core file with gdb, I can only see random invalid addresses in merely one or two layers. I guess the whole thread context is corrupted somehow.

Any suggestion on what is going on?

Yes this should theoretically be compatible, but with unwinding there's lots of various things that can go wrong because many disparate components must all work in concert, and sometimes that doesn't happen. Without more info to go off though I can't really help much.

Hi, I have fwded the problem to https://llvm.discourse.group/t/segfault-in-libunwind-during-cpu-profiling/5806/2. More details are available there.