# HG changeset patch # User Tom Rodriguez # Date 1412879541 25200 # Node ID 9e1ec84d28992c6dda32d028c9f8c3ce68892748 # Parent 0c8442b0d4c45f395dab08f913f8cd881070fb16 fix privileged check for Stable diff -r 0c8442b0d4c4 -r 9e1ec84d2899 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/Stable.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/Stable.java Thu Oct 09 16:30:49 2014 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/Stable.java Thu Oct 09 11:32:21 2014 -0700 @@ -25,7 +25,10 @@ import java.lang.annotation.*; -// TODO remove this annotation after we moved to JDK 8 and use sun.invoke.Stable instead +/** + * This annotation functions as an alias for the sun.invoke.Stable annotation within Graal code. It + * is specially recognized during class file parsing in the same way as that annotation. + */ @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) diff -r 0c8442b0d4c4 -r 9e1ec84d2899 src/share/vm/classfile/classFileParser.cpp --- a/src/share/vm/classfile/classFileParser.cpp Thu Oct 09 16:30:49 2014 +0200 +++ b/src/share/vm/classfile/classFileParser.cpp Thu Oct 09 11:32:21 2014 -0700 @@ -1790,7 +1790,7 @@ #ifdef GRAAL case vmSymbols::VM_SYMBOL_ENUM_NAME(com_oracle_graal_hotspot_Stable_signature): if (_location != _in_field) break; // only allow for fields - // Ignore privilged for now + if (!privileged && loader_data->class_loader() != SystemDictionary::graal_loader()) break; // only allow in privileged code return _field_Stable; #endif case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_Stable_signature):