Skip to content

Commit 66573e0

Browse files
authored
Make thisInstance null checks under timeout #2393 (#2394)
Place thisInstance null check after timeout check
1 parent abe43e6 commit 66573e0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -433,12 +433,6 @@ class UtBotSymbolicEngine(
433433
names = names,
434434
providers = listOf(valueProviders),
435435
) { thisInstance, descr, values ->
436-
if (thisInstance?.model is UtNullModel) {
437-
// We should not try to run concretely any models with null-this.
438-
// But fuzzer does generate such values, because it can fail to generate any "good" values.
439-
return@runJavaFuzzing BaseFeedback(Trie.emptyNode(), Control.PASS)
440-
}
441-
442436
val diff = until - System.currentTimeMillis()
443437
val thresholdMillisForFuzzingOperation = 0 // may be better use 10-20 millis as it might not be possible
444438
// to concretely execute that values because request to instrumentation process involves
@@ -452,6 +446,12 @@ class UtBotSymbolicEngine(
452446
return@runJavaFuzzing BaseFeedback(result = Trie.emptyNode(), control = Control.STOP)
453447
}
454448

449+
if (thisInstance?.model is UtNullModel) {
450+
// We should not try to run concretely any models with null-this.
451+
// But fuzzer does generate such values, because it can fail to generate any "good" values.
452+
return@runJavaFuzzing BaseFeedback(Trie.emptyNode(), Control.PASS)
453+
}
454+
455455
val stateBefore = EnvironmentModels(thisInstance?.model, values.map { it.model }, mapOf())
456456

457457
val concreteExecutionResult: UtConcreteExecutionResult? = try {

0 commit comments

Comments
 (0)