Description
openedon Feb 13, 2023
Thanks to the work of @matthiaskrgr we recently found UB in a handful of ui tests. That's... pretty bad. This was found by running Miri on the tests, so we should probably do that in CI.
Some of the tests are supposed to contain UB, such as tests which are checking that our ASan support works or tests that verify that our MIR opts do not exploit things that Miri says are UB. These tests should have an annotation that verifies that Miri emits error: Undefined Behavior
when run on them.
And some of our tests do not run under Miri, for various reasons. Some of them ICE due to features which are not completely supported yet in Miri, and if we don't already, we should expect that we have tests which use things that Miri does not support at all like FFI. So we should have another annotation that checks that Miri produces a non-UB kind of error.
I suspect the vast majority of tests will be good as-is, and defaulting to running Miri will reduce the amount of manual work required to start doing this.