JDK-8222333 : fastdebug build broken after JDK-8221393 (phase_mapping[] doesn't match enum Phase in WeakProcessorPhases)
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 13
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-04-11
  • Updated: 2019-08-07
  • Resolved: 2019-04-11
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.
JDK 13
13 b17Fixed
Related Reports
Relates :  
Description
It seems that phase_mapping[] doesn't match enum Phase in WeakProcessorPhases anymore.

$ make hotspot CONF=linux-x86_64-server-fastdebug
Building target 'hotspot' in configuration 'linux-x86_64-server-fastdebug'
Updating support/modules_libs/java.base/server/libjvm.so due to 10 file(s)
In file included from /home/aoqi/jdk/src/hotspot/share/utilities/globalDefinitions.hpp:29:0,
                 from /home/aoqi/jdk/src/hotspot/share/utilities/align.hpp:28,
                 from /home/aoqi/jdk/src/hotspot/share/runtime/globals.hpp:29,
                 from /home/aoqi/jdk/src/hotspot/share/memory/allocation.hpp:28,
                 from /home/aoqi/jdk/src/hotspot/share/classfile/classLoaderData.hpp:28,
                 from /home/aoqi/jdk/src/hotspot/share/precompiled/precompiled.hpp:34:
/home/aoqi/jdk/src/hotspot/share/utilities/debug.hpp:189:5: error: incomplete type 'STATIC_ASSERT_FAILURE<false>' used in nested name specifier
     STATIC_ASSERT_FAILURE< (Cond) >::value ]
     ^
/home/aoqi/jdk/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp:61:1: note: in expansion of macro 'STATIC_ASSERT'
 STATIC_ASSERT(sizeof(phase_mapping) / sizeof(PhaseMap) == WeakProcessorPhases::phase_count);
 ^
cc1plus: warning: unrecognized command line option "-Wno-misleading-indentation" [enabled by default]
cc1plus: warning: unrecognized command line option "-Wno-implicit-fallthrough" [enabled by default]
cc1plus: warning: unrecognized command line option "-Wno-int-in-bool-context" [enabled by default]
gmake[3]: *** [/home/aoqi/jdk/build/linux-x86_64-server-fastdebug/hotspot/variant-server/libjvm/objs/shenandoahRootProcessor.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[2]: *** [hotspot-server-libs] Error 1

ERROR: Build failed for target 'hotspot' in configuration 'linux-x86_64-server-fastdebug' (exit code 2) 

=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_objs_shenandoahRootProcessor.o:
In file included from /home/aoqi/jdk/src/hotspot/share/utilities/globalDefinitions.hpp:29:0,
                 from /home/aoqi/jdk/src/hotspot/share/utilities/align.hpp:28,
                 from /home/aoqi/jdk/src/hotspot/share/runtime/globals.hpp:29,
                 from /home/aoqi/jdk/src/hotspot/share/memory/allocation.hpp:28,
                 from /home/aoqi/jdk/src/hotspot/share/classfile/classLoaderData.hpp:28,
                 from /home/aoqi/jdk/src/hotspot/share/precompiled/precompiled.hpp:34:
/home/aoqi/jdk/src/hotspot/share/utilities/debug.hpp:189:5: error: incomplete type 'STATIC_ASSERT_FAILURE<false>' used in nested name specifier
     STATIC_ASSERT_FAILURE< (Cond) >::value ]
     ^
/home/aoqi/jdk/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp:61:1: note: in expansion of macro 'STATIC_ASSERT'
 STATIC_ASSERT(sizeof(phase_mapping) / sizeof(PhaseMap) == WeakProcessorPhases::phase_count);
 ^
   ... (rest of output omitted)

* All command lines available in /home/aoqi/jdk/build/linux-x86_64-server-fastdebug/make-support/failure-logs.
=== End of repeated output ===

No indication of failed target found.
Hint: Try searching the build log for '] Error'.
Hint: See doc/building.html#troubleshooting for assistance.

make[1]: *** [main] Error 1
make: *** [hotspot] Error 2

Comments
URL: http://hg.openjdk.java.net/jdk/jdk/rev/138f47e9d8c4 User: shade Date: 2019-04-11 17:10:02 +0000
11-04-2019

I think yes. I am not sure if something like {WeakProcessorPhases::resolved_method_table, ShenandoahPhaseTimings::Resolved_Method_TableRoots} should be added. I just make a workaround to pass the build: diff -r fbfcebad8e66 src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp --- a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp Wed Apr 10 15:41:04 2019 +0200 +++ b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp Thu Apr 11 18:50:30 2019 +0800 @@ -58,7 +58,7 @@ {WeakProcessorPhases::vm, ShenandoahPhaseTimings::VMWeakRoots} }; -STATIC_ASSERT(sizeof(phase_mapping) / sizeof(PhaseMap) == WeakProcessorPhases::phase_count); +STATIC_ASSERT(sizeof(phase_mapping) / sizeof(PhaseMap) == WeakProcessorPhases::phase_count - 1); ShenandoahRootProcessor::ShenandoahRootProcessor(ShenandoahHeap* heap, uint n_workers, ShenandoahPhaseTimings::Phase phase) : but some tests failed.
11-04-2019

Need help with this?
11-04-2019