On 2016-03-22 9:03 AM, Henri Sivonen wrote:
It seems that the Rust MP4 parser is run a new Rust-created thread in
order to catch panics. Once we introduce Rust code that intermingles
with C++ more, it won't be practical to put all potentially panicing
Rust code into dedicated threads.

Can we install a custom panic function that detects whether it's
running on a Rust-created thread and performs a normal Rust panic if
it is and performs a MOZ_CRASH if not (i.e. if it is on a
non-Rust-created thread)?


It is possible to install a custom hook for panicking [1] assuming you can use unstable features in the compiler right now. What is less clear to me is how to determine the creator of the current thread.

[1] http://doc.servo.org/std/panic/index.html
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to