JDK-8258438 : build error in test/hotspot/gtest/runtime/test_os.cpp
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2020-12-15
  • Updated: 2021-07-15
  • Resolved: 2020-12-15
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 17
17 b02Fixed
Related Reports
Relates :  
Description
There's a Tier1 build error:

[2020-12-15T18:53:21,120Z] Compiling 1765 files for java.xml
[2020-12-15T18:53:33,606Z] /opt/mach5/mesos/work_dir/slaves/983c483a-6907-44e0-ad29-98c7183575e2-S14567/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/75312b10-77dc-421e-958b-91e0761d734d/runs/634efc72-6483-4604-9f03-3e0c3d52f8c6/workspace/open/test/hotspot/gtest/runtime/test_os.cpp: In member function 'virtual void os_show_mappings_full_range_vm_Test::TestBody()':
[2020-12-15T18:53:33,606Z] /opt/mach5/mesos/work_dir/slaves/983c483a-6907-44e0-ad29-98c7183575e2-S14567/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/75312b10-77dc-421e-958b-91e0761d734d/runs/634efc72-6483-4604-9f03-3e0c3d52f8c6/workspace/open/test/hotspot/gtest/runtime/test_os.cpp:525:39: error: cannot convert 'const MEMFLAGS' to 'bool'
[2020-12-15T18:53:33,606Z]   525 |   char* p = os::reserve_memory(1 * M, mtInternal);
[2020-12-15T18:53:33,606Z]       |                                       ^~~~~~~~~~
[2020-12-15T18:53:33,606Z]       |                                       |
[2020-12-15T18:53:33,606Z]       |                                       const MEMFLAGS
[2020-12-15T18:53:33,606Z] In file included from /opt/mach5/mesos/work_dir/slaves/983c483a-6907-44e0-ad29-98c7183575e2-S14567/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/75312b10-77dc-421e-958b-91e0761d734d/runs/634efc72-6483-4604-9f03-3e0c3d52f8c6/workspace/open/src/hotspot/share/runtime/mutex.hpp:30,
[2020-12-15T18:53:33,606Z]                  from /opt/mach5/mesos/work_dir/slaves/983c483a-6907-44e0-ad29-98c7183575e2-S14567/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/75312b10-77dc-421e-958b-91e0761d734d/runs/634efc72-6483-4604-9f03-3e0c3d52f8c6/workspace/open/src/hotspot/share/classfile/classLoaderData.hpp:34,
[2020-12-15T18:53:33,606Z]                  from /opt/mach5/mesos/work_dir/slaves/983c483a-6907-44e0-ad29-98c7183575e2-S14567/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/75312b10-77dc-421e-958b-91e0761d734d/runs/634efc72-6483-4604-9f03-3e0c3d52f8c6/workspace/open/src/hotspot/share/precompiled/precompiled.hpp:34:
[2020-12-15T18:53:33,606Z] /opt/mach5/mesos/work_dir/slaves/983c483a-6907-44e0-ad29-98c7183575e2-S14567/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/75312b10-77dc-421e-958b-91e0761d734d/runs/634efc72-6483-4604-9f03-3e0c3d52f8c6/workspace/open/src/hotspot/share/runtime/os.hpp:330:51: note:   initializing argument 2 of 'static char* os::reserve_memory(size_t, bool, MEMFLAGS)'
[2020-12-15T18:53:33,606Z]   330 |   static char*  reserve_memory(size_t bytes, bool executable = false, MEMFLAGS flags = mtOther);
[2020-12-15T18:53:33,606Z]       |                                              ~~~~~^~~~~~~~~~~~~~~~~~
[2020-12-15T18:53:34,307Z] make[3]: *** [/opt/mach5/mesos/work_dir/slaves/983c483a-6907-44e0-ad29-98c7183575e2-S14567/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/75312b10-77dc-421e-958b-91e0761d734d/runs/634efc72-6483-4604-9f03-3e0c3d52f8c6/workspace/build/linux-x64-debug/hotspot/variant-server/libjvm/gtest/objs/test_os.o] Error 1
[2020-12-15T18:53:34,307Z] lib/CompileGtest.gmk:86: recipe for target '/opt/mach5/mesos/work_dir/slaves/983c483a-6907-44e0-ad29-98c7183575e2-S14567/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/75312b10-77dc-421e-958b-91e0761d734d/runs/634efc72-6483-4604-9f03-3e0c3d52f8c6/workspace/build/linux-x64-debug/hotspot/variant-server/libjvm/gtest/objs/test_os.o' failed
[2020-12-15T18:53:34,307Z] make[3]: *** Waiting for unfinished jobs....
Comments
Sorry, I've just saw this. @iklam, thanks for taking care. This is my fault, I should have checked results of latest merge, conclusions are made.
16-12-2020

Changeset: 8bf46c73 Author: Ioi Lam <iklam@openjdk.org> Date: 2020-12-15 21:42:01 +0000 URL: https://git.openjdk.java.net/jdk/commit/8bf46c73
15-12-2020

Fix: $ git diff diff --git a/test/hotspot/gtest/runtime/test_os.cpp b/test/hotspot/gtest/runtime/test_os.cpp index 1f1c270c492..ac8636af5fc 100644 --- a/test/hotspot/gtest/runtime/test_os.cpp +++ b/test/hotspot/gtest/runtime/test_os.cpp @@ -523,7 +523,7 @@ TEST_VM(os, show_mappings_small_range) { TEST_VM(os, show_mappings_full_range) { // Reserve a small range and fill it with a marker string, should show up // on implementations displaying range snippets - char* p = os::reserve_memory(1 * M, mtInternal); + char* p = os::reserve_memory(1 * M, false, mtInternal); if (p != nullptr) { if (os::commit_memory(p, 1 * M, false)) { strcpy(p, "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
15-12-2020

[~akozlov] - Please take a look at this bug. This is causing Tier1 build failures in the JDK17 CI.
15-12-2020

It looks like os::reserve_memory() parameters were changed by this fix: JDK-8234930 Use MAP_JIT when allocating pages for code cache on macOS but clearly this test file: test/hotspot/gtest/runtime/test_os.cpp was missed.
15-12-2020