rust/src
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
..
bootstrap Auto merge of #117958 - risc0:erik/target-triple, r=davidtwco,Mark-Simulacrum 2024-01-23 09:30:36 +00:00
ci Add debug info for macOS CI actions 2024-01-10 10:54:46 -08:00
doc Auto merge of #117958 - risc0:erik/target-triple, r=davidtwco,Mark-Simulacrum 2024-01-23 09:30:36 +00:00
etc Increase vscode git.detectSubmodulesLimit 2024-01-19 23:46:17 +04:00
librustdoc Rollup merge of #112806 - kadiwa4:collect_intra_doc_links, r=notriddle 2024-01-23 21:53:55 +01:00
llvm-project@700fbf978e Update LLVM submodule 2024-01-10 09:35:29 +01:00
rustdoc-json-types Add is_object_safe information for traits in JSON output 2023-12-23 11:43:31 +01:00
tools Auto merge of #118336 - saethlin:const-to-op-cache, r=RalfJung 2024-01-24 10:17:12 +00:00
README.md Remove stale reference to the test suite location 2023-01-13 11:49:06 +00:00
stage0.json bump stage0 2023-12-22 11:04:31 +01:00
version bump version number to 1.77.0 2023-12-21 10:58:56 +01:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.