diff --git a/dynamic-cds-_header-and-_fd-handles-are-not-free.patch b/dynamic-cds-_header-and-_fd-handles-are-not-free.patch new file mode 100644 index 0000000000000000000000000000000000000000..e11210e9af5b4197ea704838d66ba9685d264177 --- /dev/null +++ b/dynamic-cds-_header-and-_fd-handles-are-not-free.patch @@ -0,0 +1,34 @@ +From cf12a2fae11baf41773308a48d9cfad9031f5344 Mon Sep 17 00:00:00 2001 +Date: Fri, 9 Sep 2022 11:26:22 +0800 +Subject: dynamic cds _header and _fd handles are not free. + +--- + hotspot/src/share/vm/memory/filemap.cpp | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/hotspot/src/share/vm/memory/filemap.cpp b/hotspot/src/share/vm/memory/filemap.cpp +index adb043f77..6549828e3 100644 +--- a/hotspot/src/share/vm/memory/filemap.cpp ++++ b/hotspot/src/share/vm/memory/filemap.cpp +@@ -169,6 +169,18 @@ FileMapInfo::~FileMapInfo() { + assert(_dynamic_archive_info == this, "must be singleton"); // not thread safe + _dynamic_archive_info = NULL; + } ++ ++ if (_header != NULL) { ++ delete _header; ++ } ++ ++ if (_file_open) { ++ if (::close(_fd) < 0) { ++ fail_stop("Unable to close the shared archive file."); ++ } ++ _file_open = false; ++ _fd = -1; ++ } + } + + void FileMapInfo::populate_header(size_t alignment) { +-- +2.22.0 + diff --git a/openjdk-1.8.0.spec b/openjdk-1.8.0.spec index 441b90fba3fcf63c85d2c65eae882681903d0a3c..2baf2a1d71e94b28905b84a3d3cc6f20b5453393 100644 --- a/openjdk-1.8.0.spec +++ b/openjdk-1.8.0.spec @@ -916,7 +916,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever}.%{buildver} -Release: 8 +Release: 9 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -1144,6 +1144,7 @@ Patch254: kae-usability-enhancement.patch Patch255: Dynamic-CDS-Archive.patch Patch256: 8202951-Support-default-jsa.patch Patch257: 8200332-Improve-GCM-counting.patch +Patch258: dynamic-cds-_header-and-_fd-handles-are-not-free.patch ############################################# # @@ -1628,6 +1629,7 @@ pushd %{top_level_dir_name} %patch255 -p1 %patch256 -p1 %patch257 -p1 +%patch258 -p1 popd # System library fixes @@ -2252,6 +2254,9 @@ cjc.mainProgram(arg) %endif %changelog +* Fri Sep 16 2022 kuenking111 - 1:1.8.0.342-b07.9 +- add dynamic-cds-_header-and-_fd-handles-are-not-free.patch + * Fri Sep 16 2022 kuenking111 - 1:1.8.0.342-b07.8 - add 8200332-Improve-GCM-counting.patch