-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-craneliftThings relevant to the [future] cranelift backendThings relevant to the [future] cranelift backendC-bugCategory: This is a bug.Category: This is a bug.
Description
Running it in miri gives the following error:
error: Undefined Behavior: enum value has invalid tag: 0x07
--> example/union.rs:49:15
|
49 | match foo {
| ^^^ enum value has invalid tag: 0x07
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: inside `main` at example/union.rs:49:15
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
I found this issue because cg_clif aborts matching on an invalid discriminant.
cc @Smittyvb as you introduced this test.
Metadata
Metadata
Assignees
Labels
A-craneliftThings relevant to the [future] cranelift backendThings relevant to the [future] cranelift backendC-bugCategory: This is a bug.Category: This is a bug.