Skip to content

Miri exception improvements #69297

Closed
Closed
@RalfJung

Description

@RalfJung

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions