about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-24 15:05:14 +0000
committerbors <bors@rust-lang.org>2024-03-24 15:05:14 +0000
commit3dfd4c1f4c955e13d5936a3ffa2a19661c97cd07 (patch)
tree082edc685a99176ac2fc692666c1a06b0d0f0516 /compiler/rustc_mir_transform/src/coverage/mod.rs
parente265e3d5189513c42d037999d41a696369af9388 (diff)
parent142ef764ee3af3cee8d6336ee153a9e3f13fec90 (diff)
downloadrust-3dfd4c1f4c955e13d5936a3ffa2a19661c97cd07.tar.gz
rust-3dfd4c1f4c955e13d5936a3ffa2a19661c97cd07.zip
Auto merge of #16915 - 6d7a:master, r=HKalbasi
fix: Prevent stack overflow in recursive const types

In the evaluation of const values of recursive types certain declarations could cause an endless call-loop within the interpreter (hir-ty’s create_memory_map), which would lead to a stack overflow.
This commit adds a check that prevents values that contain an address in their value (such as TyKind::Ref) from being allocated at the address they contain.
The commit also adds a test for this edge case.
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/mod.rs')
0 files changed, 0 insertions, 0 deletions