Skip to content

Miscompilation due to MatchBranchSimplification MIR pass mixing up discriminants #124150

Closed
@RalfJung

Description

@RalfJung

#120614 introduced a miscompilation; turns out this question poked at incorrect logic in the MatchBranchSimplification MIR pass.

#124122 is a WIP patch to fix this (and also contains a testcase that currently gets miscompiled), but as a critical soundness issue this deserves tracking nonetheless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlA-mir-optArea: MIR optimizationsI-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessP-criticalCritical priorityT-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