Skip to content

Commit 4b63bf7

Browse files
committed
Demonstrate the weakness of the default configuration
1 parent 453aafc commit 4b63bf7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

clang/unittests/StaticAnalyzer/Z3CrosscheckOracleTest.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,4 +197,18 @@ TEST_F(LimitedZ3CrosscheckOracleTest, SATWhenItExhaustsRLimit) {
197197
ASSERT_EQ(AcceptReport, interpretQueryResult({SAT, 25_ms, 405'000_step}));
198198
}
199199

200+
// Demonstrate the weaknesses of the default configuration:
201+
// ========================================================
202+
203+
TEST_F(DefaultZ3CrosscheckOracleTest, ManySlowQueriesHangTheAnalyzer) {
204+
// Simulate many slow queries: 250 slow UNSAT queries.
205+
// 250*14000ms = 3500s, ~1 hour. Since we disabled the total time limitation,
206+
// this eqclass would take roughly 1 hour to process.
207+
// It doesn't matter what rlimit the queries consume.
208+
for (int i = 0; i < 250; ++i) {
209+
ASSERT_EQ(RejectReport,
210+
interpretQueryResult({UNSAT, 14'000_ms, 1'000'000_step}));
211+
}
212+
}
213+
200214
} // namespace

0 commit comments

Comments
 (0)