JcMachine failed with Trying cast not primitive type <> to primitive type <>

Open
#122 0 comments 0 reactions 1 assignee View on GitHub

@CaelmBleidd is already working on this.

Since Nov 20, 2023.

Assessment

This issue has not been assessed yet.

Description

bug

Run tests generation with the following settings:

timeLimit = 120
methodFilter = "com.google.common.util.concurrent.SimpleTimeLimiter.*"
projectFilter = listOf("guava-26.0")

The following JcMachine failure is found in logs multiple times:

JcMachine failed
java.lang.IllegalStateException: Trying cast not primitive type org.jacodb.impl.types.JcClassTypeImpl@18aecfe8 to primitive type org.jacodb.api.PredefinedPrimitive@32c67c
	at org.usvm.machine.interpreter.JcExprResolver$resolvePrimitiveCast$1.invoke(JcExprResolver.kt:893) ~[usvm-jvm-comp-231118-1620.jar:?]
	at org.usvm.machine.interpreter.JcExprResolver$resolvePrimitiveCast$1.invoke(JcExprResolver.kt:891) ~[usvm-jvm-comp-231118-1620.jar:?]
	at org.usvm.machine.interpreter.JcExprResolver.resolveAfterResolved(JcExprResolver.kt:940) ~[usvm-jvm-comp-231118-1620.jar:?]
	at org.usvm.machine.interpreter.JcExprResolver.resolvePrimitiveCast(JcExprResolver.kt:891) ~[usvm-jvm-comp-231118-1620.jar:?]
	at org.usvm.machine.interpreter.JcExprResolver.resolveJcExpr(JcExprResolver.kt:152) ~[usvm-jvm-comp-231118-1620.jar:?]
	at org.usvm.machine.interpreter.JcExprResolver.visitJcSpecialCallExpr(JcExprResolver.kt:1283) ~[usvm-jvm-comp-231118-1620.jar:?]
	at org.usvm.machine.interpreter.JcExprResolver.visitJcSpecialCallExpr(JcExprResolver.kt:127) ~[usvm-jvm-comp-231118-1620.jar:?]
	at org.jacodb.api.cfg.JcSpecialCallExpr.accept(JcInst.kt:773) ~[jacodb-api-1.4.0.jar:1.4.0]
	at org.usvm.machine.interpreter.JcExprResolver.resolveJcExpr(JcExprResolver.kt:154) ~[usvm-jvm-comp-231118-1620.jar:?]
	at org.usvm.machine.interpreter.JcExprResolver.resolveJcExpr$default(JcExprResolver.kt:149) ~[usvm-jvm-comp-231118-1620.jar:?]
	at org.usvm.machine.interpreter.JcInterpreter.visitCallStmt(JcInterpreter.kt:472) ~[usvm-jvm-comp-231118-1620.jar:?]
	at org.usvm.machine.interpreter.JcInterpreter.step(JcInterpreter.kt:166) ~[usvm-jvm-comp-231118-1620.jar:?]
	at org.usvm.machine.interpreter.JcInterpreter.step(JcInterpreter.kt:82) ~[usvm-jvm-comp-231118-1620.jar:?]
	at org.usvm.UMachine.run(Machine.kt:40) ~[usvm-core-comp-231118-1620.jar:?]
	at org.usvm.machine.JcMachine.analyze(JcMachine.kt:148) ~[usvm-jvm-comp-231118-1620.jar:?]
	at org.usvm.machine.JcMachine.analyze$default(JcMachine.kt:53) ~[usvm-jvm-comp-231118-1620.jar:?]
	at org.utbot.contest.usvm.ContestUsvmKt$runUsvmGeneration$1$9$8$states$2$1.invoke(ContestUsvm.kt:184) ~[main/:?]
Dominant language
Kotlin
Stars
33
Forks
27
Avg merge
4d 3h
Merged PRs (30d)
15

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from UnitTestBot/usvm

All issues in UnitTestBot/usvm

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.