Request for reviews (XS): 7087727: JSR 292: C2 crash if ScavengeRootsInCode=2 when "static final" MethodHandle constants are in use
Tom Rodriguez
tom.rodriguez at oracle.com
Tue Nov 8 09:15:25 PST 2011
Looks good.
tom
On Nov 8, 2011, at 3:57 AM, Christian Thalinger wrote:
> http://cr.openjdk.java.net/~twisti/7087727/
>
> 7087727: JSR 292: C2 crash if ScavengeRootsInCode=2 when "static final" MethodHandle constants are in use
> Reviewed-by:
>
> The flag setting ScavengeRootsInCode=2 causes the JIT to inline more
> constants. This is generally a good thing for performance, but can
> cause bugs in compiled code.
>
> The test case has a code pattern that looks similar to the
> selectAlternative idiom but boils down to a different invoke bytecode
> (invokevirtual in that case). The current code in
> PredictedDynamicCallGenerator::generate checks for invokespecial
> (which is used by selectAlternative) and so code for invokedynamic is
> generated (in non-debug builds) which eventually leads to a crash.
>
> src/share/vm/opto/callGenerator.cpp
>
More information about the hotspot-compiler-dev
mailing list