typetools / typetools/checker-framework
Crash: AsSuperVisitor Declared_Primitive: type is not a boxed primitive
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
The Checker Framework crashes while running Whole Program Inference (WPI) in the NJR benchmark. The error occurs during the analysis of a specific Java file, resulting in the exception: AsSuperVisitor Declared_Primitive: type is not a boxed primitive.
Crash Details:
Checker Framework Version: 3.48-SNAPSHOT4
JDK Version: 11
Commit ID: d15b6bed510135305724f361a4799a5cbf3f8122
Stacktrace:
error: AsSuperVisitor Declared_Primitive: type is not a boxed primitive.
; The Checker Framework crashed. Please report the crash. Version: Checker Framework 3.48.-SNAPSHOT4.
Compilation unit: /home/smala009/RLF/cf-rlc/june2020_dataset_NJR/urle381b6cba7_IkarosKappler_ikrs_http_tgz-pJ8-ikrs_json_rpc_JSONRPCHandlerJ8/src/ikrs/httpd/AbstractPreparedResponse.java
Last visited tree at line 491 column 16:
return total_length;
Exception: java.lang.Throwable; java.lang.Throwable
at org.checkerframework.javacutil.BugInCF.<init>(BugInCF.java:26)
at org.checkerframework.framework.type.AsSuperVisitor.visitDeclared_Primitive(AsSuperVisitor.java:362)
at org.checkerframework.framework.type.AsSuperVisitor.visitDeclared_Primitive(AsSuperVisitor.java:30)
at org.checkerframework.framework.util.AtmCombo.accept(AtmCombo.java:333)
at org.checkerframework.framework.type.visitor.AbstractAtmComboVisitor.visit(AbstractAtmComboVisitor.java:34)
at org.checkerframework.framework.type.AsSuperVisitor.visit(AsSuperVisitor.java:107)
at org.checkerframework.framework.type.AsSuperVisitor.asSuper(AsSuperVisitor.java:88)
at org.checkerframework.framework.util.AnnotatedTypes.asSuper(AnnotatedTypes.java:118)
at org.checkerframework.common.wholeprograminference.WholeProgramInferenceImplementation.updateAtmWithLub(WholeProgramInferenceImplementation.java:1067)
at org.checkerframework.framework.type.AnnotatedTypeFactory.makeConditionConsistentWithOtherMethod(AnnotatedTypeFactory.java:5661)
at org.checkerframework.framework.type.AnnotatedTypeFactory.wpiPrepareMethodForWriting(AnnotatedTypeFactory.java:5608)
at org.checkerframework.common.wholeprograminference.WholeProgramInferenceJavaParserStorage.wpiPrepareMethodForWriting(WholeProgramInferenceJavaParserStorage.java:1008)
at org.checkerframework.common.wholeprograminference.WholeProgramInferenceJavaParserStorage.wpiPrepareClassForWriting(WholeProgramInferenceJavaParserStorage.java:959)
at org.checkerframework.common.wholeprograminference.WholeProgramInferenceJavaParserStorage.wpiPrepareCompilationUnitForWriting(WholeProgramInferenceJavaParserStorage.java:929)
at org.checkerframework.common.wholeprograminference.WholeProgramInferenceJavaParserStorage.writeResultsToFile(WholeProgramInferenceJavaParserStorage.java:1028)
at org.checkerframework.common.wholeprograminference.WholeProgramInferenceImplementation.writeResultsToFile(WholeProgramInferenceImplementation.java:1147)
at org.checkerframework.framework.type.AnnotatedTypeFactory.postProcessClassTree(AnnotatedTypeFactory.java:1461)
at org.checkerframework.common.basetype.BaseTypeVisitor.visitClass(BaseTypeVisitor.java:559)
at org.checkerframework.common.basetype.BaseTypeVisitor.visitClass(BaseTypeVisitor.java:189)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:56)
at org.checkerframework.framework.source.SourceVisitor.visit(SourceVisitor.java:88)
at org.checkerframework.framework.source.SourceChecker.typeProcess(SourceChecker.java:1347)
at org.checkerframework.framework.source.SourceChecker.typeProcess(SourceChecker.java:1268)
at org.checkerframework.javacutil.AbstractTypeProcessor$AttributionTaskListener.finished(AbstractTypeProcessor.java:188)
at jdk.compiler/com.sun.tools.javac.api.ClientCodeWrapper$WrappedTaskListener.finished(ClientCodeWrapper.java:828)
at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1417)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1374)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.desugar(JavaCompiler.java:1515)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.desugar(JavaCompiler.java:1431)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:311)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
Reproducer: reproducer.zip
chmod +x wpi.sh && ./wpi.sh urle381b6cba7_IkarosKappler_ikrs_http_tgz-pJ8-ikrs_json_rpc_JSONRPCHandlerJ8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided wpi.sh reproducer against the NJR case and inspect AsSuperVisitor.java at visitDeclared_Primitive. Trace the call through AnnotatedTypes.asSuper and WholeProgramInferenceImplementation.updateAtmWithLub using the supplied stack trace. Done means the reproducer completes without the AsSuperVisitor crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100