Mercurial > hg > graal-jvmci-8
comparison src/share/vm/classfile/javaClasses.cpp @ 11011:be131aa5a529
8011896: Add check for invalid offset for new AccessControlContext isAuthorized field
Reviewed-by: acorn
author | mullan |
---|---|
date | Mon, 22 Apr 2013 08:33:12 -0400 |
parents | b295e132102d |
children | 4b52137b07c9 |
comparison
equal
deleted
inserted
replaced
11010:b295e132102d | 11011:be131aa5a529 |
---|---|
2817 oop result = InstanceKlass::cast(SystemDictionary::AccessControlContext_klass())->allocate_instance(CHECK_0); | 2817 oop result = InstanceKlass::cast(SystemDictionary::AccessControlContext_klass())->allocate_instance(CHECK_0); |
2818 // Fill in values | 2818 // Fill in values |
2819 result->obj_field_put(_context_offset, context()); | 2819 result->obj_field_put(_context_offset, context()); |
2820 result->obj_field_put(_privilegedContext_offset, privileged_context()); | 2820 result->obj_field_put(_privilegedContext_offset, privileged_context()); |
2821 result->bool_field_put(_isPrivileged_offset, isPrivileged); | 2821 result->bool_field_put(_isPrivileged_offset, isPrivileged); |
2822 // whitelist AccessControlContexts created by the JVM. | 2822 // whitelist AccessControlContexts created by the JVM if present |
2823 result->bool_field_put(_isAuthorized_offset, true); | 2823 if (_isAuthorized_offset != -1) { |
2824 result->bool_field_put(_isAuthorized_offset, true); | |
2825 } | |
2824 return result; | 2826 return result; |
2825 } | 2827 } |
2826 | 2828 |
2827 | 2829 |
2828 // Support for java_lang_ClassLoader | 2830 // Support for java_lang_ClassLoader |