[9] RFR (XXS): 8173404: C2: wrong nmethod dependency can be recorded for CallSite.target
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Thu Jan 26 16:32:20 UTC 2017
http://cr.openjdk.java.net/~vlivanov/8173404/webrev.00
https://jbs.oracle.com/browse/JDK-8173404
When C2 constant folds mutable call site target, it records a dependency
on the value, but repeatedly reads the value from the call site. Since
there's a race between compilation thread and application thread doing
CallSite.setTarget(), it's possible to end up with different values used
as the constant and recorded in the dependency.
The fix is to reuse target constant when recording the dependency.
Testing: regression test, RBT (in progress)
Thanks!
Best regards,
Vladimir Ivanov
More information about the hotspot-compiler-dev
mailing list