diff --git a/jprofilecache-should-set-log-permission.patch b/jprofilecache-should-set-log-permission.patch new file mode 100644 index 0000000000000000000000000000000000000000..b4a084cccac429a6c3f0be9f13e97c0c0325f7d3 --- /dev/null +++ b/jprofilecache-should-set-log-permission.patch @@ -0,0 +1,42 @@ +From d5da3176523a6273b2c213d42616713725c679e5 Mon Sep 17 00:00:00 2001 +Date: Wed, 11 Jun 2025 14:04:29 +0800 +Subject: jprofilecache should set log permission + +--- + .../src/share/vm/jprofilecache/jitProfileRecord.cpp | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/hotspot/src/share/vm/jprofilecache/jitProfileRecord.cpp b/hotspot/src/share/vm/jprofilecache/jitProfileRecord.cpp +index 58e00c251..798726940 100644 +--- a/hotspot/src/share/vm/jprofilecache/jitProfileRecord.cpp ++++ b/hotspot/src/share/vm/jprofilecache/jitProfileRecord.cpp +@@ -86,6 +86,11 @@ void JitProfileRecorder::init() { + _record_file_name = buf; + } else { + set_logfile_name(ProfilingCacheFile); ++ if (_record_file_name == NULL) { ++ jprofilecache_log_error(profilecache)("[JitProfileCache] ERROR: file name check fail, file name is too long."); ++ _recorder_state = IS_ERR; ++ return; ++ } + } + + _class_init_list = new (ResourceObj::C_HEAP, mtInternal) LinkedListImpl(); +@@ -547,6 +552,14 @@ void JitProfileRecorder::flush_record() { + } + set_flushed(true); + ++ // set log permission ++ int fd = open(logfile_name(), O_CREAT, S_IRUSR | S_IWUSR); ++ if (fd < 0) { ++ jprofilecache_log_error(profilecache)("[JitProfileCache] ERROR : open log file fail! path is %s", logfile_name()); ++ return; ++ } ++ close(fd); ++ + // open randomAccessFileStream + _profilelog = new (ResourceObj::C_HEAP, mtInternal) randomAccessFileStream(logfile_name(), "wb+"); + if (_profilelog == NULL || !_profilelog->is_open()) { +-- +2.19.0 + diff --git a/openjdk-1.8.0.spec b/openjdk-1.8.0.spec index 481d62cee28f45c2ed87482e4f69a253d5a6b53f..202bca3b97d058a35c2fc024d223cd04e90cdb27 100644 --- a/openjdk-1.8.0.spec +++ b/openjdk-1.8.0.spec @@ -953,7 +953,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever}.%{buildver} -Release: 3 +Release: 4 # 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 @@ -1377,6 +1377,7 @@ Patch462: compilercommand-support-dontprediction.patch Patch463: 8290451-Incorrect-result-when-switching-to-C2-OSR-co.patch Patch464: 8026976-ECParameters-Point-does-not-match-field-size.patch Patch465: Add-JitProfileCache-feature.patch +Patch466: jprofilecache-should-set-log-permission.patch ############################################# # @@ -2062,6 +2063,7 @@ pushd %{top_level_dir_name} %patch463 -p1 %patch464 -p1 %patch465 -p1 +%patch466 -p1 %endif %ifarch loongarch64 @@ -2729,6 +2731,9 @@ cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect %endif %changelog +* Fri Jun 13 2025 huangjie -1:1.8.0.452.b09-4 +- add jprofilecache-should-set-log-permission.patch + * Sat Jun 7 2025 kuenking111 -1:1.8.0.452.b09-3 - add Add-Dynamic-Max-Heap-feature-for-G1GC.patch - add Simply-the-parameters-of-AppCDS.patch