Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classfile parser crash #5957

Closed
scabug opened this issue Jun 21, 2012 · 3 comments
Closed

Classfile parser crash #5957

scabug opened this issue Jun 21, 2012 · 3 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Jun 21, 2012

<trunk>
$ ../build/quick/bin/scala -cp ../lib/fjbg.jar
Welcome to Scala version 2.10.0-20120618-131942-6167ec678e (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_32).
Type in expressions to have them evaluated.
Type :help for more information.

scala> :power
** Power User mode enabled - BEEP WHIR GYVE **
** :phase has been set to 'typer'.          **
** scala.tools.nsc._ has been imported      **
** global._, definitions._ also imported    **
** Try  :help, :vals, power.<tab>           **

scala> rootMirror.RootClass.info.member(newTermName("ch")).info.member(newTermName("epfl")).info.member(newTermName("lamp")).info.member(newTermName("fjbg")).info.member(newTypeName("JConstantPool$NameAndTypeEntryIndex")).info
java.lang.AssertionError: assertion failed: 
     while compiling: <console>
        during phase: global=terminal, atPhase=parser
     library version: version 2.10.0-20120618-131942-6167ec678e
    compiler version: version 2.10.0-20120618-131942-6167ec678e
  reconstructed args: -classpath ../lib/fjbg.jar

  last tree to typer: Apply(method $asInstanceOf)
              symbol: method $asInstanceOf in class Object (flags: final <method> <synthetic> <triedcooking>)
   symbol definition: final def $asInstanceOf[T0](): T0
                 tpe: String
       symbol owners: method $asInstanceOf -> class Object -> package lang
      context owners: anonymous class $anonfun$1 -> object $eval -> package $line10

== Enclosing template or block ==

Template( // val <local $anonfun>: <notype>, tree.tpe=scala.runtime.AbstractFunction0[String] with Serializable
  "scala.runtime.AbstractFunction0", "scala.Serializable" // parents
  ValDef(
    private
    "_"
    <tpt>
    <empty>
  )
  // 3 statements
  DefDef( // final def apply(): String
    final <method> <triedcooking>
    "apply"
    []
    List(Nil)
    <tpt> // tree.tpe=String
    Block( // tree.tpe=String
      "$line10"."$read$$iw" // object $iw, tree.tpe=type
      Apply( // final def +(x$1: Any): String in class String, tree.tpe=String
        "res0: $r.intp.global.Type = "."$plus" // final def +(x$1: Any): String in class String, tree.tpe=(x$1: Object)String
        Apply( // def replStringOf(arg: Any,maxElements: Int): String in object ScalaRunTime, tree.tpe=String
          "scala"."runtime"."ScalaRunTime"."replStringOf" // def replStringOf(arg: Any,maxElements: Int): String in object ScalaRunTime, tree.tpe=(arg: Object, maxElements: Int)String
          // 2 arguments
          Apply( // val res0: $r.intp.global.Type, tree.tpe=scala.reflect.internal.Type
            "$line10"."$read$$iw"."res0" // val res0: $r.intp.global.Type, tree.tpe=()scala.reflect.internal.Type
            Nil
          )
          1000
        )
      )
    )
  )
  DefDef( // final def apply(): Object
    final <method> <bridge>
    "apply"
    []
    List(Nil)
    <tpt> // tree.tpe=Object
    Apply( // final def apply(): String, tree.tpe=String
      $anonfun$1.this."apply" // final def apply(): String, tree.tpe=()String
      Nil
    )
  )
  DefDef( // def <init>(): scala.runtime.AbstractFunction0[String] with Serializable
    <method> <triedcooking>
    "<init>"
    []
    List(Nil)
    <tpt> // tree.tpe=scala.runtime.AbstractFunction0[String] with Serializable
    Block( // tree.tpe=Unit
      Apply( // def <init>(): scala.runtime.AbstractFunction0[R] in class AbstractFunction0, tree.tpe=scala.runtime.AbstractFunction0
        $anonfun$1.super."<init>" // def <init>(): scala.runtime.AbstractFunction0[R] in class AbstractFunction0, tree.tpe=()scala.runtime.AbstractFunction0
        Nil
      )
      ()
    )
  )
)

== Expanded type of tree ==

TypeRef(
  TypeSymbol(
    final class String extends Serializable with Comparable[String] with CharSequence
    
  )
)

class JConstantPool: package fjbg
	at scala.Predef$.assert(Predef.scala:162)
	at scala.tools.nsc.Global.assert(Global.scala:235)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parseMethod(ClassfileParser.scala:648)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$scala$tools$nsc$symtab$classfile$ClassfileParser$$queueLoad$1$2.apply$mcVI$sp(ClassfileParser.scala:562)
	at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:142)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.scala$tools$nsc$symtab$classfile$ClassfileParser$$queueLoad$1(ClassfileParser.scala:562)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$parseClass$1.apply$mcV$sp(ClassfileParser.scala:572)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parseClass(ClassfileParser.scala:577)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$parse$1.apply$mcV$sp(ClassfileParser.scala:102)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$parse$1.apply(ClassfileParser.scala:94)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$parse$1.apply(ClassfileParser.scala:94)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.pushBusy(ClassfileParser.scala:81)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parse(ClassfileParser.scala:94)
	at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader.doComplete(SymbolLoaders.scala:240)
	at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:176)
	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1209)
	at .<init>(<console>:35)
	at .<clinit>(<console>)
	at $anonfun$1.apply(<console>:7)
	at $anonfun$1.apply(<console>:6)
	at scala.reflect.internal.SymbolTable.atPhase(SymbolTable.scala:191)
	at scala.tools.nsc.interpreter.Phased$class.atCurrent(Phased.scala:71)
	at scala.tools.nsc.interpreter.Power$$anon$3.atCurrent(Power.scala:412)
	at .<init>(<console>:6)
	at .<clinit>(<console>)
	at $print(<console>)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:736)
	at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:991)
	at scala.tools.nsc.interpreter.IMain.loadAndRunReq$1(IMain.scala:579)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:610)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:574)
	at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:742)
	at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:787)
	at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:699)
	at scala.tools.nsc.interpreter.ILoop.processLine$1(ILoop.scala:563)
	at scala.tools.nsc.interpreter.ILoop.innerLoop$1(ILoop.scala:570)
	at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:573)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:864)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:819)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:819)
	at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135)
	at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:819)
	at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:79)
	at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:92)
	at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:101)
	at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Jun 21, 2012

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Jun 21, 2012

@adriaanm said:
Please re-assign to Hubert or Iulian if this is outside your territory. Git Blame says they were also here.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Jul 13, 2012

@lrytz said:
fixed in [https://github.com/scala/scala/commit/21f14e371c0baa9d59678fe5645cea80586ef116]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.