Skip to content

Commit 54dcff1

Browse files
committed
Auto merge of rust-lang#134604 - RalfJung:miri-sync, r=RalfJung
Miri subtree update r? `@ghost`
2 parents 6076bee + 268a5f4 commit 54dcff1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1473
-998
lines changed

src/tools/miri/README.md

+13-10
Original file line numberDiff line numberDiff line change
@@ -375,16 +375,19 @@ to Miri failing to detect cases of undefined behavior in a program.
375375
* `-Zmiri-disable-weak-memory-emulation` disables the emulation of some C++11 weak
376376
memory effects.
377377
* `-Zmiri-native-lib=<path to a shared object file>` is an experimental flag for providing support
378-
for calling native functions from inside the interpreter via FFI. Functions not provided by that
379-
file are still executed via the usual Miri shims.
380-
**WARNING**: If an invalid/incorrect `.so` file is specified, this can cause Undefined Behavior in Miri itself!
381-
And of course, Miri cannot do any checks on the actions taken by the native code.
382-
Note that Miri has its own handling of file descriptors, so if you want to replace *some* functions
383-
working on file descriptors, you will have to replace *all* of them, or the two kinds of
384-
file descriptors will be mixed up.
385-
This is **work in progress**; currently, only integer arguments and return values are
386-
supported (and no, pointer/integer casts to work around this limitation will not work;
387-
they will fail horribly). It also only works on Unix hosts for now.
378+
for calling native functions from inside the interpreter via FFI. The flag is supported only on
379+
Unix systems. Functions not provided by that file are still executed via the usual Miri shims.
380+
**WARNING**: If an invalid/incorrect `.so` file is specified, this can cause Undefined Behavior in
381+
Miri itself! And of course, Miri cannot do any checks on the actions taken by the native code.
382+
Note that Miri has its own handling of file descriptors, so if you want to replace *some*
383+
functions working on file descriptors, you will have to replace *all* of them, or the two kinds of
384+
file descriptors will be mixed up. This is **work in progress**; currently, only integer and
385+
pointers arguments and return values are supported and memory allocated by the native code cannot
386+
be accessed from Rust (only the other way around). Native code must not spawn threads that keep
387+
running in the background after the call has returned to Rust and that access Rust-allocated
388+
memory. Finally, the flag is **unsound** in the sense that Miri stops tracking details such as
389+
initialization and provenance on memory shared with native code, so it is easily possible to write
390+
code that has UB which is missed by Miri.
388391
* `-Zmiri-measureme=<name>` enables `measureme` profiling for the interpreted program.
389392
This can be used to find which parts of your program are executing slowly under Miri.
390393
The profile is written out to a file inside a directory called `<name>`, and can be processed
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
# This file is automatically @generated by Cargo.
22
# It is not intended for manual editing.
3-
version = 3
3+
version = 4
44

55
[[package]]
66
name = "addr2line"
7-
version = "0.17.0"
7+
version = "0.24.2"
88
source = "registry+https://github.com/rust-lang/crates.io-index"
9-
checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b"
9+
checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
1010
dependencies = [
1111
"gimli",
1212
]
1313

1414
[[package]]
15-
name = "adler"
16-
version = "1.0.2"
15+
name = "adler2"
16+
version = "2.0.0"
1717
source = "registry+https://github.com/rust-lang/crates.io-index"
18-
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
18+
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
1919

2020
[[package]]
2121
name = "backtrace"
22-
version = "0.3.65"
22+
version = "0.3.74"
2323
source = "registry+https://github.com/rust-lang/crates.io-index"
24-
checksum = "11a17d453482a265fd5f8479f2a3f405566e6ca627837aaddb85af8b1ab8ef61"
24+
checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a"
2525
dependencies = [
2626
"addr2line",
27-
"cc",
2827
"cfg-if",
2928
"libc",
3029
"miniz_oxide",
3130
"object",
3231
"rustc-demangle",
32+
"windows-targets",
3333
]
3434

3535
[[package]]
@@ -39,15 +39,6 @@ dependencies = [
3939
"backtrace",
4040
]
4141

42-
[[package]]
43-
name = "cc"
44-
version = "1.1.22"
45-
source = "registry+https://github.com/rust-lang/crates.io-index"
46-
checksum = "9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0"
47-
dependencies = [
48-
"shlex",
49-
]
50-
5142
[[package]]
5243
name = "cfg-if"
5344
version = "1.0.0"
@@ -56,48 +47,106 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
5647

5748
[[package]]
5849
name = "gimli"
59-
version = "0.26.1"
50+
version = "0.31.1"
6051
source = "registry+https://github.com/rust-lang/crates.io-index"
61-
checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4"
52+
checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
6253

6354
[[package]]
6455
name = "libc"
65-
version = "0.2.126"
56+
version = "0.2.168"
6657
source = "registry+https://github.com/rust-lang/crates.io-index"
67-
checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
58+
checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d"
6859

6960
[[package]]
7061
name = "memchr"
71-
version = "2.5.0"
62+
version = "2.7.4"
7263
source = "registry+https://github.com/rust-lang/crates.io-index"
73-
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
64+
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
7465

7566
[[package]]
7667
name = "miniz_oxide"
77-
version = "0.5.3"
68+
version = "0.8.0"
7869
source = "registry+https://github.com/rust-lang/crates.io-index"
79-
checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc"
70+
checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
8071
dependencies = [
81-
"adler",
72+
"adler2",
8273
]
8374

8475
[[package]]
8576
name = "object"
86-
version = "0.28.4"
77+
version = "0.36.5"
8778
source = "registry+https://github.com/rust-lang/crates.io-index"
88-
checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424"
79+
checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e"
8980
dependencies = [
9081
"memchr",
9182
]
9283

9384
[[package]]
9485
name = "rustc-demangle"
95-
version = "0.1.21"
86+
version = "0.1.24"
87+
source = "registry+https://github.com/rust-lang/crates.io-index"
88+
checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
89+
90+
[[package]]
91+
name = "windows-targets"
92+
version = "0.52.6"
93+
source = "registry+https://github.com/rust-lang/crates.io-index"
94+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
95+
dependencies = [
96+
"windows_aarch64_gnullvm",
97+
"windows_aarch64_msvc",
98+
"windows_i686_gnu",
99+
"windows_i686_gnullvm",
100+
"windows_i686_msvc",
101+
"windows_x86_64_gnu",
102+
"windows_x86_64_gnullvm",
103+
"windows_x86_64_msvc",
104+
]
105+
106+
[[package]]
107+
name = "windows_aarch64_gnullvm"
108+
version = "0.52.6"
109+
source = "registry+https://github.com/rust-lang/crates.io-index"
110+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
111+
112+
[[package]]
113+
name = "windows_aarch64_msvc"
114+
version = "0.52.6"
115+
source = "registry+https://github.com/rust-lang/crates.io-index"
116+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
117+
118+
[[package]]
119+
name = "windows_i686_gnu"
120+
version = "0.52.6"
121+
source = "registry+https://github.com/rust-lang/crates.io-index"
122+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
123+
124+
[[package]]
125+
name = "windows_i686_gnullvm"
126+
version = "0.52.6"
127+
source = "registry+https://github.com/rust-lang/crates.io-index"
128+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
129+
130+
[[package]]
131+
name = "windows_i686_msvc"
132+
version = "0.52.6"
133+
source = "registry+https://github.com/rust-lang/crates.io-index"
134+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
135+
136+
[[package]]
137+
name = "windows_x86_64_gnu"
138+
version = "0.52.6"
139+
source = "registry+https://github.com/rust-lang/crates.io-index"
140+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
141+
142+
[[package]]
143+
name = "windows_x86_64_gnullvm"
144+
version = "0.52.6"
96145
source = "registry+https://github.com/rust-lang/crates.io-index"
97-
checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342"
146+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
98147

99148
[[package]]
100-
name = "shlex"
101-
version = "1.3.0"
149+
name = "windows_x86_64_msvc"
150+
version = "0.52.6"
102151
source = "registry+https://github.com/rust-lang/crates.io-index"
103-
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
152+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is automatically @generated by Cargo.
22
# It is not intended for manual editing.
3-
version = 3
3+
version = 4
44

55
[[package]]
66
name = "cargo-miri-test"
@@ -12,48 +12,54 @@ dependencies = [
1212

1313
[[package]]
1414
name = "itoa"
15-
version = "1.0.2"
15+
version = "1.0.14"
1616
source = "registry+https://github.com/rust-lang/crates.io-index"
17-
checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d"
17+
checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
18+
19+
[[package]]
20+
name = "memchr"
21+
version = "2.7.4"
22+
source = "registry+https://github.com/rust-lang/crates.io-index"
23+
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
1824

1925
[[package]]
2026
name = "proc-macro2"
21-
version = "1.0.39"
27+
version = "1.0.92"
2228
source = "registry+https://github.com/rust-lang/crates.io-index"
23-
checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f"
29+
checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
2430
dependencies = [
2531
"unicode-ident",
2632
]
2733

2834
[[package]]
2935
name = "quote"
30-
version = "1.0.18"
36+
version = "1.0.37"
3137
source = "registry+https://github.com/rust-lang/crates.io-index"
32-
checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
38+
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
3339
dependencies = [
3440
"proc-macro2",
3541
]
3642

3743
[[package]]
3844
name = "ryu"
39-
version = "1.0.10"
45+
version = "1.0.18"
4046
source = "registry+https://github.com/rust-lang/crates.io-index"
41-
checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695"
47+
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
4248

4349
[[package]]
4450
name = "serde"
45-
version = "1.0.137"
51+
version = "1.0.216"
4652
source = "registry+https://github.com/rust-lang/crates.io-index"
47-
checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1"
53+
checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e"
4854
dependencies = [
4955
"serde_derive",
5056
]
5157

5258
[[package]]
5359
name = "serde_derive"
54-
version = "1.0.137"
60+
version = "1.0.216"
5561
source = "registry+https://github.com/rust-lang/crates.io-index"
56-
checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be"
62+
checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
5763
dependencies = [
5864
"proc-macro2",
5965
"quote",
@@ -62,20 +68,21 @@ dependencies = [
6268

6369
[[package]]
6470
name = "serde_json"
65-
version = "1.0.81"
71+
version = "1.0.133"
6672
source = "registry+https://github.com/rust-lang/crates.io-index"
67-
checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c"
73+
checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
6874
dependencies = [
6975
"itoa",
76+
"memchr",
7077
"ryu",
7178
"serde",
7279
]
7380

7481
[[package]]
7582
name = "syn"
76-
version = "1.0.96"
83+
version = "2.0.90"
7784
source = "registry+https://github.com/rust-lang/crates.io-index"
78-
checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf"
85+
checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31"
7986
dependencies = [
8087
"proc-macro2",
8188
"quote",
@@ -84,6 +91,6 @@ dependencies = [
8491

8592
[[package]]
8693
name = "unicode-ident"
87-
version = "1.0.0"
94+
version = "1.0.14"
8895
source = "registry+https://github.com/rust-lang/crates.io-index"
89-
checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee"
96+
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"

0 commit comments

Comments
 (0)