JDK-7022200 : G1: optimized build broken
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs21
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: x86
  • Submitted: 2011-02-24
  • Updated: 2013-09-18
  • Resolved: 2011-04-24
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 7 Other
7Fixed hs21Fixed
Description
I don't know how long this has been the case but g1CollectedHeap.hpp breaks the optimized build because the declaration of is_in_closed_subset is NOT_PRODUCT but the definition is DEBUG only and is_in_closed_subset is a virtual.  Is this a known issue?  By the way, it seems broken for a product virtual method to have non-product overrides.  Shouldn't it be defined in product too?

gmake[4]: Leaving directory `/home/ecaspole/views/hotspot-comp/hotspot/build/linux/linux_amd64_compiler2/optimized'
gmake[4]: Entering directory `/home/ecaspole/views/hotspot-comp/hotspot/build/linux/linux_amd64_compiler2/optimized'
echo Linking launcher...
Linking launcher...
gcc -m64 -Xlinker -O1 -Wl,--hash-style=both  -m64 -export-dynamic  -L `pwd` -o gamma launcher/java_md.o launcher/java.o launcher/jli_util.o launcher/wildcard.o -ljvm -lm -ldl -lpthread
/home/ecaspole/views/hotspot-comp/hotspot/build/linux/linux_amd64_compiler2/optimized/libjvm.so: undefined reference to `G1CollectedHeap::is_in_closed_subset(void const*) const'
collect2: ld returned 1 exit status
gmake[4]: *** [gamma] Error 1
gmake[4]: Leaving directory `/home/ecaspole/views/hotspot-comp/hotspot/build/linux/linux_amd64_compiler2/optimized'
gmake[3]: *** [the_vm] Error 2
gmake[3]: Leaving directory `/home/ecaspole/views/hotspot-comp/hotspot/build/linux/linux_amd64_compiler2/optimized'
gmake[2]: *** [optimized] Error 2
gmake[2]: Leaving directory `/home/ecaspole/views/hotspot-comp/hotspot/build/linux'
gmake[1]: *** [generic_build2] Error 2
gmake[1]: Leaving directory `/home/ecaspole/views/hotspot-comp/hotspot/make'
gmake: *** [optimized] Error 2

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/4e0069ff33df
04-03-2011

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/4e0069ff33df
01-03-2011

EVALUATION Some change inadvertently placed the override definition of G1CollectedHeap::is_in_closed_subset() inside #ifdef ASSERT....#endif making it unavailable in optimized builds (in which ASSERT is _not_ defined).
28-02-2011

SUGGESTED FIX Make the G1 specific version of is_in_closed_subset() available in _all_ builds.
28-02-2011