Inliner? error, perhaps JDK-8129397

Rex Kerr ichoran at
Tue Aug 18 15:25:03 UTC 2015

I have run into what may be JDK-8129397 in some data analysis code.  This
is especially concerning because it manifests as corrupting integer
values.  These are used as indices into an array, so I eventually get an
ArrayIndexOutOfBoundsError, but similarly structured code that does not
ultimately result in array indexing could be wrong without warning.

I can provide the files needed to reproduce the failure (tested on Java(TM)
SE Runtime Environment (build 1.8.0_51-b16); Java HotSpot(TM) 64-Bit Server
VM (build 25.51-b03, mixed mode) on both Linux and Mac OS), but they're not
small: about 15 MB of jars (some compiled with Scala) and a 40 MB data
file.  The problem does not appear in 1.8.0_25; I have not bisected further.

Although the problem is solved by -XX:-Inline, I am not entirely sure
whether it is an inlining error alone, or whether it is an interaction
between inlining and other optimizations.  I can't pinpoint it by disabling
inlining of every method in the problematic area.  It also is fixed with

The bytecode for the problematic method(s) is/are rather hairy, but it uses
inner methods, which Scala implements by using boxing-classes to hold
variable quantities referred to by the methods.  It also uses tail
recursion, implemented by fixing up the stack and using goto to return to
the start of the method.  (I cannot be 100% certain that the logic of the
bytecode produced by Scala is correct, but it was correct-enough as of u25.)

Note that although the run always (so far!) crashes, the results _are not
identical_ from run to run.  This strongly suggests that there is some
interaction with uninitialized values or memory.

How can I proceed?  Thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the hotspot-compiler-dev mailing list