On Tue, Mar 22, 2016 at 10:13 AM, <acrich...@mozilla.com> wrote: > Ah, no, if using `panic::recover` then it wouldn't translate to a crash (I > believe) as it's just normal execution.
I'm confused by this. My code doesn't currently use panic::recover. What happens when somebody doesn't use it and an exception hits the FFI boundary? Undefined behavior? > If you want a panic in Rust to > translate to an abort of the entire process, however, then you've got two > options. > > On one hand you could use the custom panic hook support I mentioned above > to install a hook that aborts the process. That way it would prevent > reaching the machinery that actually throws an exception in Rust to be > caught. > Assuming I can call a C function that will MOZ_CRASH with the panic-triggering code on the stack, this sounds like what I want. However, we will likely not be able to use unstable features in mozilla-central. What is the timeline for getting this stabilized? > An alternative is outlined in RFC 1513 [1] which is to configure > compilations to always trigger an abort on panic instead of doing it via a > roundabout method. > Ideally I would only crash on threads that might have FFI calls on the stack. Though in practice I think that's the case for all the threads in my use-case, so we could probably make do with this in the interim. > > Does that make sense? > > [1]: https://github.com/rust-lang/rfcs/pull/1513 > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform