/hg/release/icedtea7-forest-2.3/hotspot: 8001307: Modify ACC_SUP...

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Sat Feb 2 11:15:10 PST 2013


changeset f2b98ad97b3c in /hg/release/icedtea7-forest-2.3/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=f2b98ad97b3c
author: kamg
date: Thu Nov 08 17:45:05 2012 -0500

	8001307: Modify ACC_SUPER behavior
	Summary: Disallow non-virtual calls even when ACC_SUPER is absent.
	Reviewed-by: kvn, acorn


diffstat:

 src/share/vm/interpreter/linkResolver.cpp |  2 +-
 src/share/vm/runtime/globals.hpp          |  5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r beecf0b9e760 -r f2b98ad97b3c src/share/vm/interpreter/linkResolver.cpp
--- a/src/share/vm/interpreter/linkResolver.cpp	Mon Jan 14 22:25:00 2013 +0000
+++ b/src/share/vm/interpreter/linkResolver.cpp	Thu Nov 08 17:45:05 2012 -0500
@@ -712,7 +712,7 @@
 
     if (check_access &&
         // a) check if ACC_SUPER flag is set for the current class
-        current_klass->is_super() &&
+        (current_klass->is_super() || !AllowNonVirtualCalls) &&
         // b) check if the method class is a superclass of the current class (superclass relation is not reflexive!)
         current_klass->is_subtype_of(method_klass()) && current_klass() != method_klass() &&
         // c) check if the method is not <init>
diff -r beecf0b9e760 -r f2b98ad97b3c src/share/vm/runtime/globals.hpp
--- a/src/share/vm/runtime/globals.hpp	Mon Jan 14 22:25:00 2013 +0000
+++ b/src/share/vm/runtime/globals.hpp	Thu Nov 08 17:45:05 2012 -0500
@@ -3902,7 +3902,10 @@
   product(bool, UseVMInterruptibleIO, false,                                \
           "(Unstable, Solaris-specific) Thread interrupt before or with "   \
           "EINTR for I/O operations results in OS_INTRPT. The default value"\
-          " of this flag is true for JDK 6 and earlier")
+          " of this flag is true for JDK 6 and earlier")                    \
+                                                                            \
+  product(bool, AllowNonVirtualCalls, false,                                \
+         "Obey the ACC_SUPER flag and allow invokenonvirtual calls")
 
 /*
  *  Macros for factoring of globals



More information about the distro-pkg-dev mailing list