I have a following use-case: C program links to Rust library. During execution the following thing may happen:
- C uses
setjmpas a restoration point
- C calls Rust
- Rust calls back to C
- C encounters an error and makes a
longjmpback to the point previously saved in C
I do understand that by doing this non of Rust's memory is freed (and non of the Drop impls are called). While I can partially work around the memory issue I am wondering if I should consider skipping over Rust stack frames being an undefined behavior? Or is it limited only to memory allocation and Drop not being called in such case?