mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8135208: VM permits illegal <clinit> access_flags, versions 51-52
Check access flags for <clinit> methods that are not class init methods. Reviewed-by: kamg, gtriantafill
This commit is contained in:
parent
23813ce92e
commit
1890d7a430
1 changed files with 4 additions and 0 deletions
|
@ -1989,6 +1989,10 @@ methodHandle ClassFileParser::parse_method(bool is_interface,
|
|||
flags = JVM_ACC_STATIC;
|
||||
} else if ((flags & JVM_ACC_STATIC) == JVM_ACC_STATIC) {
|
||||
flags &= JVM_ACC_STATIC | JVM_ACC_STRICT;
|
||||
} else {
|
||||
// As of major_version 51, a method named <clinit> without ACC_STATIC is
|
||||
// just another method. So, do a normal method modifer check.
|
||||
verify_legal_method_modifiers(flags, is_interface, name, CHECK_(nullHandle));
|
||||
}
|
||||
} else {
|
||||
verify_legal_method_modifiers(flags, is_interface, name, CHECK_(nullHandle));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue