diff options
| author | 6d7a <westphal@consider-it.de> | 2024-03-21 22:57:21 +0100 |
|---|---|---|
| committer | 6d7a <westphal@consider-it.de> | 2024-03-21 22:57:21 +0100 |
| commit | 7c1be82cd9abe195205bee476c546a7645632af3 (patch) | |
| tree | 0d9ee80845ac303f5684f4093304fcc257844e68 /compiler/rustc_mir_transform/src/coverage/mod.rs | |
| parent | 7ef7f442fc34b5eadb1c6ad6433bd6d0c51b056b (diff) | |
| download | rust-7c1be82cd9abe195205bee476c546a7645632af3.tar.gz rust-7c1be82cd9abe195205bee476c546a7645632af3.zip | |
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
