代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/openjdk-1.8.0 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Subject: Fix GCC 12 build jdk8 fastdebug error
---
.../vm/gc_implementation/g1/concurrentMark.cpp | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
index df901a52d..1347a7e16 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
@@ -2914,13 +2914,23 @@ void ConcurrentMark::print_reachable(const char* str,
return;
}
- char file_name[JVM_MAXPATHLEN];
+ // fix gcc 12 build jdk8 fastdebug compiler error:
+ // directive writing up to 4096 bytes into a region of size between 0 and 4096 [-Werror=format-overflow=]
+ // about old code:
+ // char file_name[JVM_MAXPATHLEN];
+ // Leave L 2911~2915 code unchanged, so not affect original logic.
+ char *file_name = (char *) NEW_C_HEAP_ARRAY(char, strlen(G1PrintReachableBaseFile) + 2 + strlen(str), mtGC);
+ if (NULL == file_name) {
+ gclog_or_tty->print_cr(" #### error: NEW_C_HEAP_ARRAY failed.");
+ return;
+ }
sprintf(file_name, "%s.%s", G1PrintReachableBaseFile, str);
gclog_or_tty->print_cr(" dumping to file %s", file_name);
fileStream fout(file_name);
if (!fout.is_open()) {
gclog_or_tty->print_cr(" #### error: could not open file");
+ FREE_C_HEAP_ARRAY(char, file_name, mtGC);
return;
}
@@ -2936,6 +2946,7 @@ void ConcurrentMark::print_reachable(const char* str,
gclog_or_tty->print_cr(" done");
gclog_or_tty->flush();
+ FREE_C_HEAP_ARRAY(char, file_name, mtGC);
}
#endif // PRODUCT
--
2.22.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。