JDK-8295895 : build error after JDK-8279366
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 20
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: generic
  • Submitted: 2022-10-25
  • Updated: 2022-10-27
  • Resolved: 2022-10-25
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 20
20 b21Fixed
Related Reports
Relates :  
Description
[2022-10-25T18:04:37,954Z] /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S8385/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/94e60bac-4c32-47f6-a74c-678754acd011/runs/0263fe07-26ce-4e18-8204-28060c6f339c/workspace/open/src/hotspot/share/cds/filemap.cpp: In member function 'bool FileMapInfo::check_paths(int, int, GrowableArray<const char*>*, unsigned int, unsigned int)':
[2022-10-25T18:04:37,954Z] /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S8385/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/94e60bac-4c32-47f6-a74c-678754acd011/runs/0263fe07-26ce-4e18-8204-28060c6f339c/workspace/open/src/hotspot/share/cds/filemap.cpp:898:45: error: operation on 'runtime_path' may be undefined [-Werror=sequence-point]
[2022-10-25T18:04:37,954Z]   898 |     const char* runtime_path = runtime_path = rp_array->at(i)  + runtime_prefix_len;
[2022-10-25T18:04:37,954Z]       |                                ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comments
Yeah, it is a good technique to rebase before integration to catch these kind of merge issues, but that does not always help either.
25-10-2022

So this is a case where a pre-integration Mach5 Tier1 would not have necessarily caught the problem if the 'remove "sequence-point" warning' changeset hit the repo just before Calvin integrated.
25-10-2022

AFAICS, JDK-8279366 PR was based on version that did not yet remove "sequence-point" warning off the global ignore list. Current mainline contains the changeset that does it. This error is almost exactly why we wanted to limit these warnings to particular files, and then even fix them :)
25-10-2022

Weird, it passed GHA.
25-10-2022

Changeset: 0caea818 Author: Calvin Cheung <ccheung@openjdk.org> Date: 2022-10-25 18:54:48 +0000 URL: https://git.openjdk.org/jdk/commit/0caea818b59f7e2cd60708b1002fba328c5357fe
25-10-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10858 Date: 2022-10-25 18:43:52 +0000
25-10-2022

This might be simply due to a typo: $ git diff diff --git a/src/hotspot/share/cds/filemap.cpp b/src/hotspot/share/cds/filemap.cpp index fc1e65a96eb..f9b1c66348e 100644 --- a/src/hotspot/share/cds/filemap.cpp +++ b/src/hotspot/share/cds/filemap.cpp @@ -895,7 +895,7 @@ bool FileMapInfo::check_paths(int shared_path_start_idx, int num_paths, Growable assert(strlen(shared_path(j)->name()) > (size_t)dumptime_prefix_len, "sanity"); const char* dumptime_path = shared_path(j)->name() + dumptime_prefix_len; assert(strlen(rp_array->at(i)) > (size_t)runtime_prefix_len, "sanity"); - const char* runtime_path = runtime_path = rp_array->at(i) + runtime_prefix_len; + const char* runtime_path = rp_array->at(i) + runtime_prefix_len; if (!os::same_files(dumptime_path, runtime_path)) { return true; }
25-10-2022