JDK-8194859 : Bad backport of 8024468 breaks Zero build due to lack of 8010862 in OpenJDK 7
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: openjdk7u
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2018-01-10
  • Updated: 2023-07-21
  • Resolved: 2023-07-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjdk7uFixed
Related Reports
Relates :  
Relates :  
Description
/home/andrew/projects/openjdk/upstream/jdk7/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: In static member function 'static int CppInterpreter::native_entry(methodOop, intptr_t, Thread*)':
/home/andrew/projects/openjdk/upstream/jdk7/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp:253:42: error: 'mcs' was not declared in this scope
     if (counter->reached_InvocationLimit(mcs->backedge_counter())) {
                                          ^~~
make[6]: *** [/home/andrew/projects/openjdk/upstream/jdk7/hotspot/make/linux/makefiles/rules.make:151: cppInterpreter_zero.o] Error 1

mcs is only added by 8013607 (not in OpenJDK 7):

diff --git a/src/cpu/zero/vm/cppInterpreter_zero.cpp b/src/cpu/zero/vm/cppInterpreter_zero.cpp
--- a/src/cpu/zero/vm/cppInterpreter_zero.cpp
+++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp
@@ -212,7 +212,13 @@
 
   // Update the invocation counter
   if ((UseCompiler || CountCompiledCalls) && !method->is_synchronized()) {
-    InvocationCounter *counter = method->invocation_counter();
+    MethodCounters* mcs = method->method_counters();
+    if (mcs == NULL) {
+      CALL_VM_NOCHECK(mcs = InterpreterRuntime::build_method_counters(thread, method));
+      if (HAS_PENDING_EXCEPTION)
+        goto unwind_and_return;
+    }
+    InvocationCounter *counter = mcs->invocation_counter();
     counter->increment();
     if (counter->reached_InvocationLimit()) {
       CALL_VM_NOCHECK(

Comments
This issue had fix version 7 when the fix was pushed to 7u so a backport was created automatically. Copy of HG Updates comment: HG Updates added a comment - 2018-03-21 17:25 URL: http://hg.openjdk.java.net/jdk7u/jdk7u/hotspot/rev/d8a079873393 User: andrew Date: 2018-03-21 16:23:50 +0000
19-09-2018