comparison src/share/vm/classfile/classFileParser.cpp @ 7639:22ead76da3f4

8006758: LinkResolver assertion (caused by @Contended changes) Summary: treat anonymous classes as privileged code to restore the special handling for @Compiled during class file parsing Reviewed-by: jrose, coleenp, kvn, dholmes
author kmo
date Thu, 24 Jan 2013 02:03:38 -0800
parents f422634e5828
children 24a91505f9d5
comparison
equal deleted inserted replaced
7638:522c328b8b77 7639:22ead76da3f4
1800 1800
1801 ClassFileParser::AnnotationCollector::ID 1801 ClassFileParser::AnnotationCollector::ID
1802 ClassFileParser::AnnotationCollector::annotation_index(ClassLoaderData* loader_data, 1802 ClassFileParser::AnnotationCollector::annotation_index(ClassLoaderData* loader_data,
1803 Symbol* name) { 1803 Symbol* name) {
1804 vmSymbols::SID sid = vmSymbols::find_sid(name); 1804 vmSymbols::SID sid = vmSymbols::find_sid(name);
1805 bool privileged = false; 1805 // Privileged code can use all annotations. Other code silently drops some.
1806 if (loader_data->is_the_null_class_loader_data()) { 1806 bool privileged = loader_data->is_the_null_class_loader_data() ||
1807 // Privileged code can use all annotations. Other code silently drops some. 1807 loader_data->is_anonymous();
1808 privileged = true;
1809 }
1810 switch (sid) { 1808 switch (sid) {
1811 case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_ForceInline_signature): 1809 case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_ForceInline_signature):
1812 if (_location != _in_method) break; // only allow for methods 1810 if (_location != _in_method) break; // only allow for methods
1813 if (!privileged) break; // only allow in privileged code 1811 if (!privileged) break; // only allow in privileged code
1814 return _method_ForceInline; 1812 return _method_ForceInline;