gimli-rs / unwind-rs

Apache License 2.0
26 stars 10 forks source link

Disable libunwind shim by default #35

Closed bjorn3 closed 5 years ago

bjorn3 commented 5 years ago

Fixes #34

philipc commented 5 years ago

It's probably useful to be able to disable this anyway.

This change means the correctness test is now testing something (see #27), and it looks like the backtrace crate gives an extra 0 address at the end. I guess we should strip that before comparing.

philipc commented 5 years ago

Also, which nightly version are you using? Currently nightly actually works for me (rustc 1.36.0-nightly (a784a8022 2019-05-09)), and disabling this module breaks it for reasons I don't understand:

Thread 2 "correctness" received signal SIGILL, Illegal instruction.
[Switching to Thread 0x7ffff6e02700 (LWP 17603)]
unwind_recorder (payload=0x7ffff6e014c8, stack=140737335268520, saved_regs=0x7ffff6e01478) at unwind/src/glue.rs:101
bjorn3 commented 5 years ago

I probably used -08. It crashes when panicking in a should_panic test. https://github.com/bjorn3/pretty_backtrace/runs/123338228

philipc commented 5 years ago

That SIGILL I'm getting is only because the assert is failing inside the callback, and we can't unwind past unwind_recorder. So fixing the test on stable will fix that too.

philipc commented 5 years ago

I'll fix the correctness test in another PR.