Skip to content

Commit e7f83d9

Browse files
committed
fix: Decrease checkMemoryUsage threshhold
1 parent 03ac8fc commit e7f83d9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/Core/Executor.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4355,8 +4355,7 @@ Executor::MemoryUsage Executor::checkMemoryUsage() {
43554355
// is O(elts on freelist). This is really bad since we start
43564356
// to pummel the freelist once we hit the memory cap.
43574357
// every 65536 instructions
4358-
if ((stats::instructions & 0xFFFFU) != 0 &&
4359-
lastTotalUsage <= MaxMemory * 1.01)
4358+
if ((stats::instructions & 0xFFFFU) != 0 && lastTotalUsage <= MaxMemory * 0.9)
43604359
return None;
43614360

43624361
// check memory limit
@@ -4372,14 +4371,14 @@ Executor::MemoryUsage Executor::checkMemoryUsage() {
43724371
coverOnTheFly = CoverOnTheFly;
43734372
}
43744373
// just guess at how many to kill
4375-
// only terminate states when threshold (+1%) exceeded
4374+
// only terminate states when threshold (-10%) exceeded
43764375
if (totalUsage < MaxMemory * 0.6) {
43774376
return Executor::Low;
4378-
} else if (totalUsage <= MaxMemory * 1.01) {
4377+
} else if (totalUsage <= MaxMemory * 0.9) {
43794378
return Executor::High;
43804379
}
43814380

4382-
if (totalUsage > MaxMemory * 1.01 && numStates <= 2) {
4381+
if (totalUsage > MaxMemory * 0.9 && numStates <= 2) {
43834382
haltExecution = HaltExecution::MaxMemory;
43844383
return Executor::None;
43854384
}
@@ -4917,6 +4916,7 @@ void Executor::terminateStateEarly(ExecutionState &state, const Twine &message,
49174916
storedSeeds->push_back(seed);
49184917
}
49194918
if (shouldWriteTest(state)) {
4919+
state.clearCoveredNew();
49204920
interpreterHandler->processTestCase(
49214921
state, (message + "\n").str().c_str(),
49224922
terminationTypeFileExtension(reason).c_str(),

0 commit comments

Comments
 (0)