You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that for any value -Xmax-inlines it is possible to construct a method that has the recursion deep enough to make the compiler crash with a StackOverflowError. We are currently just in the boundary to make neg/power.scala compile. The following code shows a simple way to create a method that will crash the compiler.
I think it's fine to decrease max-inline's default to, say, 32. There's also another option for the user: increase stacksize. But in any case, it's always possible to write programs that cause stackoverflows in the compiler, whether you use inline or not.
The issue is that for any value
-Xmax-inlines
it is possible to construct a method that has the recursion deep enough to make the compiler crash with aStackOverflowError
. We are currently just in the boundary to makeneg/power.scala
compile. The following code shows a simple way to create a method that will crash the compiler.The simplest way to workaround this is to decrease the
-Xmax-inlines
. This is not a solution as it forces an upper bound on possible-Xmax-inlines
.We might need to take into account the deepness of the reclusive inlined code to limit the number of inlines.
We might also consider having an annotation to limit the recursion of a specific method.
The text was updated successfully, but these errors were encountered: