rust/compiler/rustc_const_eval/src
Matthias Krüger 96195a5e24
Rollup merge of #130342 - RalfJung:slice-idx-overflow, r=saethlin
interpret, miri: fix dealing with overflow during slice indexing and allocation

This is mostly to fix https://github.com/rust-lang/rust/issues/130284.

I then realized we're using somewhat sketchy arguments for a similar multiplication in `copy`/`copy_nonoverlapping`/`write_bytes`,  so I made them all share the same function that checks exactly the right thing. (The intrinsics would previously fail on allocations larger than `1 << 47` bytes... which are theoretically possible maybe? Anyway it seems conceptually wrong to use any other bound than `isize::MAX` here.)
2024-09-15 16:01:38 +02:00
..
check_consts also stabilize const_refs_to_cell 2024-09-15 10:20:47 +02:00
const_eval Auto merge of #128543 - RalfJung:const-interior-mut, r=fee1-dead 2024-09-14 21:11:04 +00:00
interpret Rollup merge of #130342 - RalfJung:slice-idx-overflow, r=saethlin 2024-09-15 16:01:38 +02:00
util clarify comments and names in check_validity_requirement 2024-09-08 16:53:23 +02:00
errors.rs also stabilize const_refs_to_cell 2024-09-15 10:20:47 +02:00
lib.rs Add warn(unreachable_pub) to rustc_const_eval. 2024-09-03 08:50:33 +10:00