rust/tests
bors 591ecb88df Auto merge of #128742 - RalfJung:miri-vtable-uniqueness, r=saethlin
miri: make vtable addresses not globally unique

Miri currently gives vtables a unique global address. That's not actually matching reality though. So this PR enables Miri to generate different addresses for the same type-trait pair.

To avoid generating an unbounded number of `AllocId` (and consuming unbounded amounts of memory), we use the "salt" technique that we also already use for giving constants non-unique addresses: the cache is keyed on a "salt" value n top of the actually relevant key, and Miri picks a random salt (currently in the range `0..16`) each time it needs to choose an `AllocId` for one of these globals -- that means we'll get up to 16 different addresses for each vtable. The salt scheme is integrated into the global allocation deduplication logic in `tcx`, and also used for functions and string literals. (So this also fixes the problem that casting the same function to a fn ptr over and over will consume unbounded memory.)

r? `@saethlin`
Fixes https://github.com/rust-lang/miri/issues/3737
2024-08-13 04:32:34 +00:00
..
assembly Disallow setting built-in cfgs via set the command-line 2024-08-07 14:08:34 +02:00
auxiliary
codegen Rollup merge of #128537 - Jamesbarford:118980-const-vector, r=RalfJung,nikic 2024-08-12 17:09:15 +02:00
codegen-units Fix and enable disabled codegen-units tests 2024-08-10 14:03:27 -04:00
coverage Finish blessing coverage/mcdc tests after LLVM 19 upgrade 2024-08-01 13:36:50 +10:00
coverage-run-rustdoc coverage: Extract hole spans from HIR instead of MIR 2024-07-08 21:22:56 +10:00
crashes Auto merge of #128714 - camelid:wf-struct-exprs, r=BoxyUwU 2024-08-10 05:27:17 +00:00
debuginfo Fix debuginfo providers/tests 2024-08-11 16:51:22 -04:00
incremental Do not normalize constants eagerly. 2024-07-31 00:59:12 +00:00
mir-opt Auto merge of #126793 - saethlin:mono-rawvec, r=scottmcm 2024-08-12 01:47:06 +00:00
pretty Mark format! with must_use hint 2024-07-06 14:24:20 +02:00
run-make Rollup merge of #129013 - Kobzol:remove-unused-git-clone-sha-file, r=jieyouxu 2024-08-12 23:10:52 +02:00
run-pass-valgrind rustfmt tests/run-pass-valgrind/. 2024-06-04 09:53:02 +10:00
rustdoc Rollup merge of #128394 - GuillaumeGomez:run-button, r=t-rustdoc 2024-08-12 17:09:15 +02:00
rustdoc-gui Rollup merge of #128394 - GuillaumeGomez:run-button, r=t-rustdoc 2024-08-12 17:09:15 +02:00
rustdoc-js Add test for Self not being a generic in search index 2024-08-04 12:49:28 -07:00
rustdoc-js-std Update tests 2024-06-07 11:55:52 +08:00
rustdoc-json Rollup merge of #128836 - its-the-shrimp:add_test_for_107278, r=aDotInTheVoid 2024-08-09 00:03:38 +02:00
rustdoc-ui rustdoc: move invalid langstring test to UI 2024-08-09 07:57:46 -07:00
ui Auto merge of #128742 - RalfJung:miri-vtable-uniqueness, r=saethlin 2024-08-13 04:32:34 +00:00
ui-fulldeps Bless test fallout 2024-08-03 07:57:31 -04:00
COMPILER_TESTS.md