Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
5 votes
1 answer
737 views

Why does `*mut T` implement `Unwindsafe` but `&mut T` doesn't?

In the documentation for Unwindsafe we have: Types such as &mut T and &RefCell<T> are examples which are not unwind safe. The general idea is that any mutable state which can be ...
little-dude's user avatar
  • 1,654
10 votes
0 answers
3k views

Is it possible to unwind on panic in `#![no_std]` mode?

Is it possible to unwind on panic in #![no_std] mode, e.g. with a customized #[panic_handler]?
updogliu's user avatar
  • 6,235
24 votes
3 answers
3k views

How does Rust know whether to run the destructor during stack unwind?

The documentation for mem::uninitialized points out why it is dangerous/unsafe to use that function: calling drop on uninitialized memory is undefined behavior. So this code should be, I believe, ...
ustulation's user avatar
  • 3,710
15 votes
2 answers
5k views

Catching panic! when Rust called from C FFI, without spawning threads

I'm working on a Rust wrapper for the Duktape JavaScript interpreter. In a normal use case, the call stack will look like this: Rust: Arbitrary application code. Rust: My library wrapper. C: The ...
emk's user avatar
  • 60.9k