diff options
author | Boaz Brickner <brickner@google.com> | 2025-03-10 09:33:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-10 09:33:00 +0100 |
commit | e0442bdfa5a5cd02431955cb18b67194d2b82faf (patch) | |
tree | 3e8ec46729e3abaa6b99727601c989ce67494afb /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 35f273ab07d9f1e65a662fb25a1aeebaba4552c2 (diff) | |
download | llvm-e0442bdfa5a5cd02431955cb18b67194d2b82faf.zip llvm-e0442bdfa5a5cd02431955cb18b67194d2b82faf.tar.gz llvm-e0442bdfa5a5cd02431955cb18b67194d2b82faf.tar.bz2 |
[Clang] Fix segmentation fault caused by `VarBypassDetector` stack overflow on deeply nested expressions (#124128)
This happens when using `-O2`.
Similarly to #111701
([test](https://github.com/bricknerb/llvm-project/blob/93e4a7386ec897e53d7330c6206d38759a858be2/clang/test/CodeGen/deeply-nested-expressions.cpp)),
not adding a test that reproduces since this test is slow and likely to
be hard to maintained as discussed here and in [previous
discussion](https://github.com/llvm/llvm-project/pull/111701/files/1a63281b6c240352653fd2e4299755c1f32a76f4#r1795518779).
Test that was reverted here:
https://github.com/llvm/llvm-project/pull/124128/commits/d6b5576940d38aadb3293acbff680d1f5d22486c
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 08165e0..63f0bf5 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -1534,7 +1534,7 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, // Initialize helper which will detect jumps which can cause invalid // lifetime markers. if (ShouldEmitLifetimeMarkers) - Bypasses.Init(Body); + Bypasses.Init(CGM, Body); } // Emit the standard function prologue. |