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

scalac 2.11.1 crash in GenASM, nested Boolean/Nothing expressions #8625

Closed
scabug opened this issue May 26, 2014 · 4 comments
Closed

scalac 2.11.1 crash in GenASM, nested Boolean/Nothing expressions #8625

scabug opened this issue May 26, 2014 · 4 comments

Comments

@scabug
Copy link

scabug commented May 26, 2014

The scala compiler crashes with expressions of the form

 ((a || ???) && (b || ???))

where ??? is of type Nothing (i.e., throws an exception).
The Bug is not triggered by (a || ???).

A quick look at scala.tools.nsc.backend.jvm.GenASM indicates an undefined failure label:

2442: jcode.emitIF(cond.negate(), labels(failure))

This is a regression from Scala 2.10.

(see: scala/scala#2185, https://github.com/scala/scala/issues/3793)

Workaround: -YdisableUnreachablePrevention
(Alternatively: -Ylinearizer:normal)


java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (ArchLinux build 7.u55_2.4.7-1-x86_64)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)

Scala code runner version 2.11.1 -- Copyright 2002-2013, LAMP/EPFL

@scabug
Copy link
Author

scabug commented May 26, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8625?orig=1
Reporter: Gidon Ernst (gernst)
Affected Versions: 2.11.1
Attachments:

@scabug
Copy link
Author

scabug commented May 26, 2014

@retronym said:
Here's a diff of -Ylog:icode -Ydebug without/with unreachable block prevention:

https://gist.github.com/retronym/ccdca4c9085b36964ebb

@scabug
Copy link
Author

scabug commented May 27, 2014

@scabug scabug closed this as completed May 27, 2014
@scabug
Copy link
Author

scabug commented Jul 21, 2014

@lrytz said:
fixed in scala/scala#3794

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

No branches or pull requests

2 participants