rust/src/tools
bors cd6d8f2a04 Auto merge of #118336 - saethlin:const-to-op-cache, r=RalfJung
Return a finite number of AllocIds per ConstAllocation in Miri

Before this, every evaluation of a const slice would produce a new AllocId. So in Miri, this program used to have unbounded memory use:
```rust
fn main() {
    loop {
        helper();
    }
}

fn helper() {
    "ouch";
}
```
Every trip around the loop creates a new AllocId which we need to keep track of a base address for. And the provenance GC can never clean up that AllocId -> u64 mapping, because the AllocId is for a const allocation which will never be deallocated.

So this PR moves the logic of producing an AllocId for a ConstAllocation to the Machine trait, and the implementation that Miri provides will only produce 16 AllocIds for each allocation. The cache is also keyed on the Instance that the const is evaluated in, so that equal consts evaluated in two functions will have disjoint base addresses.

r? RalfJung
2024-01-24 10:17:12 +00:00
..
build-manifest rustc: implement support for riscv32im_risc0_zkvm_elf 2024-01-22 10:07:36 -08:00
build_helper rename github_repository to git_repository 2023-11-06 15:53:32 +01:00
bump-stage0 make x.py clippy download and use beta clippy 2023-12-16 15:24:59 -05:00
cargo@7bb7b53955 Update cargo 2024-01-23 13:35:15 -05:00
cargotest Don't ask for a specific branch in cargotest 2023-12-04 12:11:44 +02:00
clippy Rename TyCtxt::struct_span_lint_hir as TyCtxt::node_span_lint. 2024-01-23 08:09:01 +11:00
collect-license-metadata Fix generate-copyright tool. 2023-11-27 11:03:53 +00:00
compiletest Warn when no profiler runtime means coverage tests won't be run/blessed 2024-01-18 14:42:49 +11:00
coverage-dump Add tool src/tools/coverage-dump for use by some new coverage tests 2023-09-05 11:11:48 +10:00
error_index_generator Rename EarlyErrorHandler as EarlyDiagCtxt. 2023-12-18 16:06:21 +11:00
expand-yaml-anchors
generate-copyright Fix generate-copyright tool. 2023-11-27 11:03:53 +00:00
generate-windows-sys update paths in tools 2024-01-12 00:06:39 +01:00
html-checker
jsondocck jsondocck: bump jsonpath to 0.3, dropping few dup dependencies 2023-11-18 12:56:54 +03:00
jsondoclint rustdoc: Rename typedef to type alias in jsondoclint 2023-08-23 11:47:35 -07:00
linkchecker linkchecker: Remove unneeded FIXME about intra-doc links 2023-08-06 13:28:43 +02:00
lint-docs Update test for E0796 and static_mut_ref lint 2024-01-07 17:29:25 +03:00
lld-wrapper linker: Remove -Zgcc-ld option 2023-10-08 10:05:25 +03:00
miri Auto merge of #118336 - saethlin:const-to-op-cache, r=RalfJung 2024-01-24 10:17:12 +00:00
miropt-test-tools Don't allow .html files in tests/mir-opt/ 2024-01-16 17:48:31 +11:00
opt-dist Partial Revert: "Auto merge of #117018 - Kobzol:opt-dist-cargo-stage0" 2023-10-23 16:10:52 +02:00
remote-test-client use u64 to represent file size 2024-01-21 18:16:22 +03:00
remote-test-server use u64 to represent file size 2024-01-21 18:16:22 +03:00
replace-version-placeholder
rls
rust-analyzer Merge commit 'a911652360' into sync-from-ra 2024-01-21 16:53:06 +02:00
rust-demangler
rust-installer use /usr/bin/env bash instead of /bin/bash 2024-01-21 12:43:09 -05:00
rustbook
rustdoc
rustdoc-gui Improve display of parallel jobs in rustdoc-gui tester script 2023-10-16 20:16:08 +02:00
rustdoc-gui-test
rustdoc-js rustdoc-search: remove parallel searchWords array 2023-12-15 16:26:35 -07:00
rustdoc-themes Ensure build/tmp exists in rustdoc_themes::get_themes 2023-09-20 08:31:33 +02:00
rustfmt Actually, just use nonterminal_may_begin_with 2024-01-22 02:19:42 +00:00
suggest-tests Add test suggestions for mir-opt and coverage 2023-11-16 14:02:51 +11:00
tidy Teach tidy about line/col information for malformed features 2024-01-19 15:01:53 +00:00
tier-check
unicode-table-generator
unstable-book-gen
x
cherry-pick.sh
publish_toolstate.py