Miri exception improvements · Issue #69297 · rust-lang/rust (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
The Miri engine uses "exceptions" (InterpResult
) to report misbehaving executions and propagate this information outwards to the machine (const-eval/const-prop/miri-the-tool). When an error is raised, we optionally capture a backtrace to ease debugging.
There are two problems with this:
- Currently, checking whether we want to capture a backtrace is rather expensive (we check an env var). @wesleywiser proposed a scheme to use a session variable instead.
- Sometimes, the engine catches these "exceptions". This means we caught the backtrace in vein. Check RUSTC_CTFE_BACKTRACE much less by generating fewer errors #69290 brought some nice speed-up by removing just one case of catching an interpreter error! I think we should never catch these errors. Is there something we can do to prevent accidental catching?
Cc @oli-obk