Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Make it possible to use nwind-capi as alternative unwinding backend
See also: koute/not-perf#37 This is supposedly faster. tst_trace works, which is good, but trying to use a heaptrack build with this API on the multi threaded test crashes: ``` RUST_BACKTRACE=full ./bin/heaptrack --debug --record-only --raw ./tests/manual/threaded heaptrack output will be written to "/home/milian/projects/src/heaptrack/build-nwind/heaptrack.threaded.68148.raw.zst" starting application in GDB, this might take some time... Reading symbols from ./tests/manual/threaded... Starting program: /home/milian/projects/src/heaptrack/build-nwind/tests/manual/threaded [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7ffff73ff6c0 (LWP 68207)] thread '<unnamed>' panicked at 'assertion failed: !duplicate_matches', nwind/src/address_space.rs:929:5 stack backtrace: 0: 0x7ffff7676e0a - std::backtrace_rs::backtrace::libunwind::trace::h9a6b80bbf328ba5d at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x7ffff7676e0a - std::backtrace_rs::backtrace::trace_unsynchronized::hd162ec543a11886b at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7ffff7676e0a - std::sys_common::backtrace::_print_fmt::h78a5099be12f51a6 at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:65:5 3: 0x7ffff7676e0a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha1c5390454d74f71 at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:44:22 4: 0x7ffff7696e6f - core::fmt::write::h9ffde816c577717b at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/fmt/mod.rs:1254:17 5: 0x7ffff7674745 - std::io::Write::write_fmt::h88186074961638e4 at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/io/mod.rs:1698:15 6: 0x7ffff7676bd5 - std::sys_common::backtrace::_print::h184198273ed08d59 at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:47:5 7: 0x7ffff7676bd5 - std::sys_common::backtrace::print::h1b4d8e7add699453 at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:34:9 8: 0x7ffff7677f6e - std::panicking::default_hook::{{closure}}::h393bcea75423915a at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:269:22 9: 0x7ffff7677d15 - std::panicking::default_hook::h48c64f31d8b3fd03 at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:288:9 10: 0x7ffff767852e - std::panicking::rust_panic_with_hook::hafdc493a79370062 at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:691:13 11: 0x7ffff76783e2 - std::panicking::begin_panic_handler::{{closure}}::h0a64bc82e36bedc7 at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:580:13 12: 0x7ffff7677276 - std::sys_common::backtrace::__rust_end_short_backtrace::hc203444fb7416a16 at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:150:18 13: 0x7ffff7678182 - rust_begin_unwind at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:578:5 14: 0x7ffff76946d3 - core::panicking::panic_fmt::h0f6ef0178afce4f2 at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:67:14 15: 0x7ffff769476d - core::panicking::panic::h0ead933cb8f56d66 at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:117:5 16: 0x7ffff750c587 - nwind::address_space::match_mapping::h571f20ecd5df2ae9 at /home/milian/projects/src/not-perf/nwind/src/address_space.rs:929:5 17: 0x7ffff74f8703 - nwind::address_space::reload::h7bdbef3c4ecee369 at /home/milian/projects/src/not-perf/nwind/src/address_space.rs:1098:34 18: 0x7ffff759a769 - nwind::local_unwinding::LocalAddressSpace::reload::h3b5f5e2abb8bcbde at /home/milian/projects/src/not-perf/nwind/src/local_unwinding.rs:738:9 19: 0x7ffff759a399 - nwind::local_unwinding::LocalAddressSpace::new_with_opts::hc3923e5b6a30003f at /home/milian/projects/src/not-perf/nwind/src/local_unwinding.rs:715:9 20: 0x7ffff749c633 - nwind_create_address_space at /home/milian/projects/src/not-perf/nwind-capi/src/lib.rs:58:29 21: 0x7ffff7fbe84a - AddressSpace at /home/milian/projects/src/heaptrack/src/track/trace_nwind_capi.cpp:21:44 22: 0x7ffff7fbe84a - addressSpace at /home/milian/projects/src/heaptrack/src/track/trace_nwind_capi.cpp:36:25 23: 0x7ffff7fbe916 - _ZN5Trace6unwindEPPv at /home/milian/projects/src/heaptrack/src/track/trace_nwind_capi.cpp:87:27 24: 0x7ffff7fbda1a - _ZN5Trace4fillEi at /home/milian/projects/src/heaptrack/src/track/trace.h:47:26 25: 0x7ffff7fbda1a - heaptrack_malloc at /home/milian/projects/src/heaptrack/src/track/libheaptrack.cpp:879:19 26: 0x7ffff7fb9d98 - malloc at /home/milian/projects/src/heaptrack/src/track/heaptrack_preload.cpp:214:21 27: 0x7ffff7cac4fb - pool at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_alloc.cc:235:30 28: 0x7ffff7cac4fb - __static_initialization_and_destruction_0 at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_alloc.cc:373:8 29: 0x7ffff7cac4fb - _GLOBAL__sub_I_eh_alloc.cc at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_alloc.cc:456:1 30: 0x7ffff7fcf0fe - <unknown> 31: 0x7ffff7fcf1ec - <unknown> 32: 0x7ffff7fe5560 - <unknown> terminate called without an active exception ```
- Loading branch information