Skip to content

UtExecutionInstrumentation requires additional checks for assemble models #997

Open
@EgorkaKulikov

Description

@EgorkaKulikov

To Reproduce

  • Run the 'antlr' project in ContestEstimator
  • Generate tests for GrammarTransformPipeline.setGrammarPtr with 200s timeout

The following exception occurs:

 GrammarTransformPipeline#setGrammarPtr
-->> In 1 method(s) :: org.utbot.instrumentation.util.ChildProcessError: Error in the child process |> com.jetbrains.rd.util.reactive.RdFault: -- no message --, reason: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.utbot.framework.concrete.MockValueConstructor$call$2.invoke(MockValueConstructor.kt:483)
	at org.utbot.framework.concrete.MockValueConstructor$call$2.invoke(MockValueConstructor.kt:482)
	at org.utbot.instrumentation.process.SecurityKt$runSandbox$1$1.invoke(Security.kt:38)
	at org.utbot.instrumentation.process.SecurityKt$sandbox$1.invoke(Security.kt:61)
	at org.utbot.instrumentation.process.SecurityKt$sandbox$2.invoke(Security.kt:77)
	at org.utbot.instrumentation.process.SecurityKt$sandbox$3.invoke(Security.kt:82)
	at org.utbot.instrumentation.process.SecurityKt$sandbox$4.run(Security.kt:88)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at org.utbot.instrumentation.process.SecurityKt.sandbox(Security.kt:88)
	at org.utbot.instrumentation.process.SecurityKt.sandbox(Security.kt:82)
	at org.utbot.instrumentation.process.SecurityKt.sandbox(Security.kt:77)
	at org.utbot.instrumentation.process.SecurityKt.sandbox(Security.kt:61)
	at org.utbot.instrumentation.process.SecurityKt.runSandbox(Security.kt:38)
	at org.utbot.framework.concrete.MockValueConstructor.call(MockValueConstructor.kt:482)
	at org.utbot.framework.concrete.MockValueConstructor.updateWithExecutableCallModel(MockValueConstructor.kt:421)
	at org.utbot.framework.concrete.MockValueConstructor.constructFromAssembleModel(MockValueConstructor.kt:362)
	at org.utbot.framework.concrete.MockValueConstructor.construct(MockValueConstructor.kt:132)
	at org.utbot.framework.concrete.MockValueConstructor.value(MockValueConstructor.kt:466)
	at org.utbot.framework.concrete.MockValueConstructor.updateWithExecutableCallModel(MockValueConstructor.kt:417)
	at org.utbot.framework.concrete.MockValueConstructor.constructFromAssembleModel(MockValueConstructor.kt:362)
	at org.utbot.framework.concrete.MockValueConstructor.construct(MockValueConstructor.kt:132)
	at org.utbot.framework.concrete.MockValueConstructor.constructMethodParameters(MockValueConstructor.kt:107)
	at org.utbot.framework.concrete.UtExecutionInstrumentation.invoke(UtExecutionInstrumentation.kt:155)

This happens because our proccessing of the assemble model (for example, in MockValueConstructor) thinks that if this model is constructed, it is correct. It is 99% reliable for models generated with AssembleModelGenerator, but for Fuzzer it is a problem that leads us to exceptions like this.

This should possible by fixed with wrapping some logic with some try/catch blocks for instrumentation logic.

Metadata

Metadata

Labels

comp-symbolic-engineIssue is related to the symbolic execution enginectg-bugIssue is a bug

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions