JDK-8150063 : Optimized build fails with "undefined reference to 'test_memset_with_concurrent_readers()'"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2016-02-17
  • Updated: 2016-02-18
  • Resolved: 2016-02-18
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 9
9Resolved
Related Reports
Duplicate :  
Relates :  
Description
The optimized build fails with:

internalVMTests.o: In function `InternalVMTests::run()':
/oracle/full_jdk_build/hotspot/src/share/vm/utilities/internalVMTests.cpp:127: undefined reference to `test_memset_with_concurrent_readers()'
collect2: error: ld returned 1 exit status

JDK-8131330 removed the NOT_DEBUG_RETURN declaration for the unit test 'test_memset_with_concurrent_readers()'. To be available in the optimized build, it should be guarded by ASSERT:

diff -r 5fefcbeda616 src/share/vm/gc/shared/memset_with_concurrent_readers.cpp
--- a/src/share/vm/gc/shared/memset_with_concurrent_readers.cpp	Fri Feb 12 16:12:15 2016 -0800
+++ b/src/share/vm/gc/shared/memset_with_concurrent_readers.cpp	Wed Feb 17 16:03:04 2016 +0100
@@ -34,7 +34,7 @@
 #if INCLUDE_ALL_GCS
 
 // Unit test
-#ifdef ASSERT
+#ifndef PRODUCT
 
 static unsigned line_byte(const char* line, size_t i) {
   return unsigned(line[i]) & 0xFF;