fortanix / rust-sgx

The Fortanix Rust Enclave Development Platform
https://edp.fortanix.com
Mozilla Public License 2.0
424 stars 99 forks source link

Unwinding improvements #76

Open jethrogb opened 5 years ago

jethrogb commented 5 years ago

When panicking with unwinding, the stack gets unwound before the enclave returns to userspace. This is annoying because setting breakpoints isn't really possible yet so there is no way to inspect the stack at the panic location. Unwinding will only happen if there's a catchpoint on the stack. If there isn't, an abort will be triggered. We can inspect the stack after an abort. main/thread::spawn call catch_unwind internally in rt.rs and thread/mod.rs. We could add logic such that catch_unwind is elided in some cases depending on the enclave configuration (e.g. DEBUG global).

jethrogb commented 5 years ago

Related #34, #105