Request for review (XS): JDK-8006758: LinkResolver assertion (caused by @Contended changes)
Krystal Mo
krystal.mo at oracle.com
Thu Jan 24 01:18:02 PST 2013
Aleksey,
Thanks for you explanation. Comments below:
On 01/24/2013 05:03 PM, Aleksey Shipilev wrote:
> This was discussed a numerous times at this list, e.g. here:
> http://mail.openjdk.java.net/pipermail/hotspot-dev/2012-December/007502.html
>
> The current consensus is that sun.misc.* members should be
> unaccessible/noop-ed for unprivileged classes. This applies as the
> general rule, and some annotations can have the exception with the VM
> flag (-XX:-RestrictContended in this case).
Actually I'm a little bit confused on the noop consensus. It'd work
perfectly fine for @Contended, because it's only a optional marker for
performance.
But the JSR 292 annotations, at least @Compiled, are mandatory
annotations used for core functionalities. Silently noop-ing them can be
disastrous, as we've seen in this bug.
Maybe we should add an assertion when a @Compiled is found on
unprivileged code, to catch the problem right there.
Thanks,
Kris
> -Aleksey.
>
More information about the hotspot-dev
mailing list