reachability bug crashes J2C

Bug #680068 reported by Jesper Öqvist on 2010-11-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LJRT
High
Unassigned

Bug Description

There seems to be a bug in the reachability analysis or JastAddJ which crashes the J2C frontend.

This bug was reported by Alfred at the bugzilla tracker: http://torvalds.cs.lth.se/cgi-bin/bugzilla3/show_bug.cgi?id=171

The bug can be reproduced by trying to compile any Java program which imports java.util.HashMap.

Jesper Öqvist (jesper-oqvist) wrote :

Stack trace:
AST.ClassDecl cannot be cast to AST.GenericClassDecl
java.lang.ClassCastException: AST.ClassDecl cannot be cast to
AST.GenericClassDecl
        at AST.ClassAccess.type_compute(ClassAccess.java:166)
        at AST.ClassAccess.type(ClassAccess.java:159)
        at AST.AbstractDot.Define_Collection_lookupMethod(AbstractDot.java:683)
        at AST.Expr.lookupMethod(Expr.java:1057)
        at AST.MethodAccess.decls_compute(MethodAccess.java:863)
        at AST.MethodAccess.decls(MethodAccess.java:854)
        at AST.MethodAccess.decl_compute(MethodAccess.java:921)
        at AST.MethodAccess.decl(MethodAccess.java:914)
        at AST.MethodAccess.rewriteTo(MethodAccess.java:1449)
        at AST.ASTNode.getChild(ASTNode.java:962)
        at AST.ASTNode.getChild(ASTNode.java:943)
        at AST.Dot.getRight(Dot.java:141)
        at AST.AbstractDot.lastAccess_compute(AbstractDot.java:416)
        at AST.AbstractDot.lastAccess(AbstractDot.java:412)
        at AST.AbstractDot.lastAccess_compute(AbstractDot.java:416)
        at AST.AbstractDot.lastAccess(AbstractDot.java:412)
        at AST.AbstractDot.isConstant_compute(AbstractDot.java:207)
        at AST.AbstractDot.isConstant(AbstractDot.java:203)
        at AST.Binary.isConstant_compute(Binary.java:221)
        at AST.Binary.isConstant(Binary.java:184)
        at AST.Binary.rewriteTo(Binary.java:415)
        at AST.LogicalExpr.rewriteTo(LogicalExpr.java:136)
        at AST.OrLogicalExpr.rewriteTo(OrLogicalExpr.java:397)
        at AST.ASTNode.getChild(ASTNode.java:962)
        at AST.ASTNode.getChild(ASTNode.java:943)
        at AST.WhileStmt.getCondition(WhileStmt.java:208)
        at AST.WhileStmt.typeCheck(WhileStmt.java:78)
        at AST.ASTNode.collectErrors(ASTNode.java:240)
        at AST.ASTNode.collectErrors(ASTNode.java:247)
        at AST.ASTNode.collectErrors(ASTNode.java:247)
        at AST.ASTNode.collectErrors(ASTNode.java:247)
        at AST.ASTNode.collectErrors(ASTNode.java:247)
        at AST.ASTNode.collectErrors(ASTNode.java:247)
        at AST.ASTNode.collectErrors(ASTNode.java:247)
        at AST.ASTNode.collectErrors(ASTNode.java:247)
        at AST.ASTNode.collectErrors(ASTNode.java:247)
        at AST.ASTNode.collectErrors(ASTNode.java:247)
        at AST.ASTNode.collectErrors(ASTNode.java:247)
        at AST.CompilationUnit.errorCheck(CompilationUnit.java:143)
        at AST.Frontend.process(Frontend.java:55)
        at JavaGenCCode.compile(JavaGenCCode.java:12)
        at JavaGenCCode.main(JavaGenCCode.java:6)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers