8000 SI-9264 An even-better diagnostic for an unexplained crash by retronym · Pull Request #4432 · scala/scala · GitHub
[go: up one dir, main page]

Skip to content

SI-9264 An even-better diagnostic for an unexplained crash #4432

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 Gi 8000 tHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
SI-9264 An even-better diagnostic for an unexplained crash
We have seen an intermittent crasher in the backend for the last
month or so.

In #4397, I added a diagnostic
to show the actual locals in scope in the method.

This commit further expands the diagnistic to show the method's tree.
  • Loading branch information
retronym committed Apr 7, 2015
commit a72eeb953b738ba0f0b7a9024f16bca3009f23dc
7 changes: 6 additions & 1 deletion src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,12 @@ abstract class GenICode extends SubComponent {
case None =>
val saved = settings.uniqid
settings.uniqid.value = true
try abort(s"symbol $sym does not exist in ${ctx.method}, which contains locals ${ctx.method.locals.mkString(",")}")
try {
val methodCode = unit.body.collect { case dd: DefDef
if dd.symbol == ctx.method.symbol => showCode(dd);
}.headOption.getOrElse("<unknown>")
abort(s"symbol $sym does not exist in ${ctx.method}, which contains locals ${ctx.method.locals.mkString(",")}. \nMethod code: $methodCode")
}
finally settings.uniqid.value = saved
}
}
Expand Down
0