1
1
#! /bin/bash
2
2
set -euo pipefail
3
3
4
+ DEFAULTFLAGS=" -Zmiri-retag-fields"
5
+
4
6
# apply our patch
5
7
rm -rf rust-src-patched
6
8
cp -a $( rustc --print sysroot) /lib/rustlib/src/rust/ rust-src-patched
@@ -14,19 +16,19 @@ core)
14
16
# (Varying the OS is totally pointless for core.)
15
17
for TARGET in x86_64-unknown-linux-gnu mips-unknown-linux-gnu; do
16
18
echo " ::group::Testing core ($TARGET , no validation, no Stacked Borrows, symbolic alignment)"
17
- MIRIFLAGS=" -Zmiri-disable-validation -Zmiri-disable-stacked-borrows -Zmiri-symbolic-alignment-check" \
19
+ MIRIFLAGS=" $DEFAULTFLAGS -Zmiri-disable-validation -Zmiri-disable-stacked-borrows -Zmiri-symbolic-alignment-check" \
18
20
./run-test.sh core --target $TARGET --lib --tests \
19
21
-- --skip align \
20
22
2>&1 | ts -i ' %.s '
21
23
echo " ::endgroup::"
22
- echo " ::group::Testing core ($TARGET , strict provenance, field retagging )"
23
- MIRIFLAGS=" -Zmiri-strict-provenance -Zmiri-retag-fields " \
24
+ echo " ::group::Testing core ($TARGET , strict provenance)"
25
+ MIRIFLAGS=" $DEFAULTFLAGS -Zmiri-strict-provenance" \
24
26
./run-test.sh core --target $TARGET --lib --tests \
25
27
2>&1 | ts -i ' %.s '
26
28
echo " ::endgroup::"
27
29
# Cannot use strict provenance as there are int-to-ptr casts in the doctests.
28
- echo " ::group::Testing core docs ($TARGET , field retagging )" && echo
29
- MIRIFLAGS=" -Zmiri-ignore-leaks -Zmiri-disable-isolation -Zmiri-retag-fields " \
30
+ echo " ::group::Testing core docs ($TARGET )" && echo
31
+ MIRIFLAGS=" $DEFAULTFLAGS -Zmiri-ignore-leaks -Zmiri-disable-isolation" \
30
32
./run-test.sh core --target $TARGET --doc \
31
33
2>&1 | ts -i ' %.s '
32
34
echo " ::endgroup::"
@@ -36,13 +38,13 @@ alloc)
36
38
# A 64bit little-endian and a 32bit big-endian target.
37
39
# (Varying the OS is not really worth it for alloc.)
38
40
for TARGET in x86_64-unknown-linux-gnu mips-unknown-linux-gnu; do
39
- echo " ::group::Testing alloc ($TARGET , symbolic alignment, strict provenance, field retagging )"
40
- MIRIFLAGS=" -Zmiri-symbolic-alignment-check -Zmiri-strict-provenance -Zmiri-retag-fields " \
41
+ echo " ::group::Testing alloc ($TARGET , symbolic alignment, strict provenance)"
42
+ MIRIFLAGS=" $DEFAULTFLAGS -Zmiri-symbolic-alignment-check -Zmiri-strict-provenance" \
41
43
./run-test.sh alloc --target $TARGET --lib --tests \
42
44
2>&1 | ts -i ' %.s '
43
45
echo " ::endgroup::"
44
- echo " ::group::Testing alloc docs ($TARGET , strict provenance, field retagging )"
45
- MIRIFLAGS=" -Zmiri-ignore-leaks -Zmiri-disable-isolation -Zmiri-strict-provenance -Zmiri-retag-fields " \
46
+ echo " ::group::Testing alloc docs ($TARGET , strict provenance)"
47
+ MIRIFLAGS=" $DEFAULTFLAGS -Zmiri-ignore-leaks -Zmiri-disable-isolation -Zmiri-strict-provenance" \
46
48
./run-test.sh alloc --target $TARGET --doc \
47
49
2>&1 | ts -i ' %.s '
48
50
echo " ::endgroup::"
57
59
58
60
# hashbrown and some other things do int2ptr casts, so we need permissive provenance.
59
61
for TARGET in x86_64-unknown-linux-gnu aarch64-apple-darwin; do
60
- echo " ::group::Testing std core ($CORE on $TARGET , field retagging )"
61
- MIRIFLAGS=" -Zmiri-disable-isolation -Zmiri-permissive-provenance -Zmiri-retag-fields " \
62
+ echo " ::group::Testing std core ($CORE on $TARGET )"
63
+ MIRIFLAGS=" $DEFAULTFLAGS -Zmiri-disable-isolation -Zmiri-permissive-provenance" \
62
64
./run-test.sh std --target $TARGET --lib --tests \
63
65
-- $CORE \
64
66
2>&1 | ts -i ' %.s '
65
67
echo " ::endgroup::"
66
- echo " ::group::Testing std core docs ($CORE on $TARGET , field retagging )"
67
- MIRIFLAGS=" -Zmiri-ignore-leaks -Zmiri-disable-isolation -Zmiri-permissive-provenance -Zmiri-retag-fields " \
68
+ echo " ::group::Testing std core docs ($CORE on $TARGET )"
69
+ MIRIFLAGS=" $DEFAULTFLAGS -Zmiri-ignore-leaks -Zmiri-disable-isolation -Zmiri-permissive-provenance" \
68
70
./run-test.sh std --target $TARGET --doc \
69
71
-- $CORE \
70
72
2>&1 | ts -i ' %.s '
71
73
echo " ::endgroup::"
72
74
done
73
75
# "sleep" has a thread leak that we have to ignore
74
- echo " ::group::Testing remaining std (except for $SKIP , field retagging )"
75
- MIRIFLAGS=" -Zmiri-ignore-leaks -Zmiri-disable-isolation -Zmiri-permissive-provenance -Zmiri-retag-fields " \
76
+ echo " ::group::Testing remaining std (except for $SKIP )"
77
+ MIRIFLAGS=" $DEFAULTFLAGS -Zmiri-ignore-leaks -Zmiri-disable-isolation -Zmiri-permissive-provenance" \
76
78
./run-test.sh std --lib --tests \
77
79
-- $( for M in $CORE ; do echo " --skip $M " ; done) $( for M in $SKIP ; do echo " --skip $M " ; done) \
78
80
2>&1 | ts -i ' %.s '
79
81
echo " ::endgroup::"
80
- echo " ::group::Testing remaining std docs (except for $SKIP , field retagging )"
81
- MIRIFLAGS=" -Zmiri-ignore-leaks -Zmiri-disable-isolation -Zmiri-permissive-provenance -Zmiri-retag-fields " \
82
+ echo " ::group::Testing remaining std docs (except for $SKIP )"
83
+ MIRIFLAGS=" $DEFAULTFLAGS -Zmiri-ignore-leaks -Zmiri-disable-isolation -Zmiri-permissive-provenance" \
82
84
./run-test.sh std --doc \
83
85
-- $( for M in $CORE ; do echo " --skip $M " ; done) $( for M in $SKIP ; do echo " --skip $M " ; done) \
84
86
2>&1 | ts -i ' %.s '
85
87
echo " ::endgroup::"
86
88
;;
87
89
simd)
88
90
cd $MIRI_LIB_SRC /portable-simd
89
- echo " ::group::Testing portable-simd (strict provenance, field retagging )"
90
- MIRIFLAGS=" -Zmiri-strict-provenance -Zmiri-retag-fields " \
91
+ echo " ::group::Testing portable-simd (strict provenance)"
92
+ MIRIFLAGS=" $DEFAULTFLAGS -Zmiri-strict-provenance" \
91
93
cargo miri test --lib --tests \
92
94
2>&1 | ts -i ' %.s '
93
95
echo " ::endgroup::"
94
- echo " ::group::Testing portable-simd docs (strict provenance, field retagging )"
95
- MIRIFLAGS=" -Zmiri-strict-provenance -Zmiri-retag-fields " \
96
+ echo " ::group::Testing portable-simd docs (strict provenance)"
97
+ MIRIFLAGS=" $DEFAULTFLAGS -Zmiri-strict-provenance" \
96
98
cargo miri test --doc \
97
99
2>&1 | ts -i ' %.s '
98
100
echo " ::endgroup::"
0 commit comments