Skip to content

Commit 6bbca34

Browse files
committed
[CFG] Add a test for a flaky crash in CFGBlock::getLastCondition().
Push the test separately ahead of time in order to find out whether our Memory Sanitizer bots will be able to find the problem. If not, I'll add a much more expensive test that repeats the current test multiple times in order to show up on normal buildbots. I really apologize for the potential temporary inconvenience! I'll commit the fix as soon as I get the signal. Differential Revision: https://reviews.llvm.org/D69962
1 parent 22a0edd commit 6bbca34

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

clang/test/Analysis/a_flaky_crash.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s
2+
3+
struct S {
4+
S();
5+
~S();
6+
};
7+
8+
bool bar(S);
9+
10+
// no-crash during diagnostic construction.
11+
void foo() {
12+
int x;
13+
if (true && bar(S()))
14+
++x; // expected-warning{{The expression is an uninitialized value. The computed value will also be garbage}}
15+
}

0 commit comments

Comments
 (0)