diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-12-08 14:28:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-08 14:28:24 +0100 |
| commit | 0d26662fd3a6633b5639c993c304009311867ac5 (patch) | |
| tree | 10168987ce9ab438cbb7d04f0bf1990054c63b75 /compiler/rustc_codegen_llvm/src | |
| parent | a369714a29982e204213437b6293f16f1c494b11 (diff) | |
| parent | 9b07e750553fa9ad9b87e8e567bf05edf1001424 (diff) | |
| download | rust-0d26662fd3a6633b5639c993c304009311867ac5.tar.gz rust-0d26662fd3a6633b5639c993c304009311867ac5.zip | |
Rollup merge of #133861 - shamb0:refactor_InterpCx_allocate_str, r=RalfJung
Add allocate_bytes and refactor allocate_str in InterpCx for raw byte… Fixes https://github.com/rust-lang/miri/issues/4025 This PR introduces a new `allocate_bytes` function in InterpCx and refactors `allocate_str` to use it internally. This change improves memory allocation handling in the interpreter by: 1. Adding `allocate_bytes`: - Direct byte slice allocation support - Handles both mutable and immutable allocations - Maintains proper memory alignment and deduplication 2. Refactoring `allocate_str`: - Now uses `allocate_bytes` internally - Adds string-specific metadata handling - Preserves existing string allocation behavior This is part 1 of the planned changes to improve timezone string handling in Miri. A follow-up PR will update Miri's timezone logic to use this new allocation mechanism. Related: https://github.com/rust-lang/miri/pull/4069
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
