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

VerifyError under -Yinline -Yinline-handlers #7589

scabug opened this issue Jun 19, 2013 · 4 comments

VerifyError under -Yinline -Yinline-handlers #7589

scabug opened this issue Jun 19, 2013 · 4 comments


Copy link

scabug commented Jun 19, 2013

object Test {
  object RE extends RuntimeException

  def await0: Unit =
    if (false) {
      if (false) await0
    } else throw RE

  def body = {
    try {
    } catch {
      case e: Throwable 
        new Some((None getOrElse this).getClass)
        throw e

  def main(args: Array[String]) {
    try { body } catch {
      case RE => // okay

JAVA_HOME=$JAVA8_HOME qbin/scala -nc -Yinline -Yinline-handlers test/inliner-bug.scala
java.lang.VerifyError: Bad type on operand stack
Exception Details:
Main$.body()V @77: invokespecial
Type top (current frame, stack[1]) is not assignable to reference type
Current Frame:
bci: @77
flags: { }
locals: { 'Main$', 'java/lang/Throwable', 'Main$$anonfun$body$1', 'scala/None$' }
stack: { top, top, 'java/lang/Class' }
0000000: 2a3a 07b2 0012 4cbb 0016 59b2 001b bb00
0000010: 1d59 b700 1e4d 4e2d b600 2499 001e a700
0000020: 224c bb00 1659 b200 1bbb 001d 59b7 001e
0000030: 4d4e 2db6 0024 9a00 0a2d b600 28a7 000d
0000040: 2c3a 0519 053a 08b2 002a b600 2eb7 0031
0000050: 572b bf
Exception Handler Table:
bci [0, 7] => handler: 33
Stackmap Table:

at Main.main(inliner-bug.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method){noformat}
Copy link

scabug commented Jun 19, 2013

Imported From:
Reporter: @retronym
Assignee: @JamesIry
Affected Versions: 2.10.0, 2.11.0-M3

Copy link

scabug commented Jun 19, 2013

@retronym said:
This is another one distilled from Akka.

Copy link

scabug commented Jun 19, 2013

@magarciaEPFL said:
The example works fine with the new optimizer, , at all optimization levels. BTW no equivalent of -Yinline-handlers is supported by the new optimizer. That's on purpose. No performance gain results from -Yinline-handlers .

@scabug scabug added this to the Backlog milestone Apr 7, 2017
Copy link

SethTisue commented Mar 2, 2018

seems fixed in 2.12

@SethTisue SethTisue modified the milestones: Backlog, 2.12.0 Mar 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

No branches or pull requests

2 participants