We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a9fa4e commit 4d9975bCopy full SHA for 4d9975b
tests/spec/features/tools_spec.rb
@@ -37,6 +37,24 @@ def code_with_lint_warnings
37
EOF
38
end
39
40
+ scenario "sanitize code with Miri" do
41
+ editor.set code_with_undefined_behavior
42
+ in_tools_menu { click_on("Miri") }
43
+
44
+ within(".output-stderr") do
45
+ expect(page).to have_content /pointer computed at offset 1, outside bounds of allocation \d+ which has size 0/
46
+ end
47
48
49
+ def code_with_undefined_behavior
50
+ <<~EOF
51
+ fn main() {
52
+ let mut a: [u8; 0] = [];
53
+ unsafe { *a.get_unchecked_mut(1) = 1; }
54
+ }
55
+ EOF
56
57
58
def editor
59
Editor.new(page)
60
0 commit comments