From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk/files/, dev-java/openjdk/
Date: Thu, 23 Apr 2020 20:42:12 +0000 (UTC) [thread overview]
Message-ID: <1587674507.15f4b287d4e51821577b32f7f7d435d0e9030461.gyakovlev@gentoo> (raw)
commit: 15f4b287d4e51821577b32f7f7d435d0e9030461
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 23 20:41:15 2020 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Apr 23 20:41:47 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15f4b287
dev-java/openjdk: add patch to 11.0.7 to fix SIGSEGV in bootstrap
Happens if bootstrap jvm was compiled with 11.0.7 (like -bin version)
Bug: https://bugs.gentoo.org/719118
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
.../openjdk/files/openjdk-11.0.7_p10-sigsegv.patch | 55 ++++++++++++++++++++++
dev-java/openjdk/openjdk-11.0.7_p10.ebuild | 4 ++
2 files changed, 59 insertions(+)
diff --git a/dev-java/openjdk/files/openjdk-11.0.7_p10-sigsegv.patch b/dev-java/openjdk/files/openjdk-11.0.7_p10-sigsegv.patch
new file mode 100644
index 00000000000..04c61c06589
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-11.0.7_p10-sigsegv.patch
@@ -0,0 +1,55 @@
+
+# HG changeset patch
+# User ccheung
+# Date 1564075552 25200
+# Node ID f1332f6025515e4fc9e42fbf79f983d782abaaf0
+# Parent 966fc6d784a737ec25cd0b1be48109a4a3fa02ad
+8228407: JVM crashes with shared archive file mismatch
+Summary: Stop processing other header fields if initial header check has failed.
+Reviewed-by: dholmes, jiangli
+
+diff -r 966fc6d784a7 -r f1332f602551 src/hotspot/share/memory/filemap.cpp
+--- a/src/hotspot/share/memory/filemap.cpp Mon Mar 02 12:30:59 2020 +0100
++++ b/src/hotspot/share/memory/filemap.cpp Thu Jul 25 10:25:52 2019 -0700
+@@ -1287,7 +1287,9 @@
+ }
+
+ init_from_file(_fd);
+- if (!validate_header()) {
++ // UseSharedSpaces could be disabled if the checking of some of the header fields in
++ // init_from_file has failed.
++ if (!UseSharedSpaces || !validate_header()) {
+ return false;
+ }
+ return true;
+diff -r 966fc6d784a7 -r f1332f602551 test/hotspot/jtreg/runtime/appcds/SharedArchiveConsistency.java
+--- a/test/hotspot/jtreg/runtime/appcds/SharedArchiveConsistency.java Mon Mar 02 12:30:59 2020 +0100
++++ b/test/hotspot/jtreg/runtime/appcds/SharedArchiveConsistency.java Thu Jul 25 10:25:52 2019 -0700
+@@ -385,8 +385,16 @@
+ output.shouldNotContain("Checksum verification failed");
+
+ copyFile(orgJsaFile, jsa);
++ // modify _jvm_ident and run with -Xshare:auto
++ System.out.println("\n2b. Corrupt _jvm_ident run with -Xshare:auto\n");
++ modifyJvmIdent();
++ output = TestCommon.execAuto(execArgs);
++ output.shouldContain("The shared archive file was created by a different version or build of HotSpot");
++ output.shouldContain("Hello World");
++
++ copyFile(orgJsaFile, jsa);
+ // modify _magic and _paths_misc_info_size, test should fail
+- System.out.println("\n2b. Corrupt _magic and _paths_misc_info_size, should fail\n");
++ System.out.println("\n2c. Corrupt _magic and _paths_misc_info_size, should fail\n");
+ modifyHeaderIntField(offset_magic, 0x00000000);
+ modifyHeaderIntField(offset_paths_misc_info_size, Integer.MAX_VALUE);
+ output = TestCommon.execCommon(execArgs);
+@@ -395,7 +403,7 @@
+
+ copyFile(orgJsaFile, jsa);
+ // modify _version and _paths_misc_info_size, test should fail
+- System.out.println("\n2c. Corrupt _version and _paths_misc_info_size, should fail\n");
++ System.out.println("\n2d. Corrupt _version and _paths_misc_info_size, should fail\n");
+ modifyHeaderIntField(offset_version, 0x00000000);
+ modifyHeaderIntField(offset_paths_misc_info_size, Integer.MAX_VALUE);
+ output = TestCommon.execCommon(execArgs);
+
diff --git a/dev-java/openjdk/openjdk-11.0.7_p10.ebuild b/dev-java/openjdk/openjdk-11.0.7_p10.ebuild
index 9df2e6c723a..76d41a4eb08 100644
--- a/dev-java/openjdk/openjdk-11.0.7_p10.ebuild
+++ b/dev-java/openjdk/openjdk-11.0.7_p10.ebuild
@@ -77,6 +77,10 @@ REQUIRED_USE="javafx? ( alsa !headless-awt )"
S="${WORKDIR}/jdk${SLOT}u-jdk-${MY_PV}"
+PATCHES=(
+ "${FILESDIR}/${P}-sigsegv.patch"
+)
+
# The space required to build varies wildly depending on USE flags,
# ranging from 2GB to 16GB. This function is certainly not exact but
# should be close enough to be useful.
next reply other threads:[~2020-04-23 20:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-23 20:42 Georgy Yakovlev [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-09-05 21:47 [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk/files/, dev-java/openjdk/ Sam James
2025-08-13 11:01 Sam James
2024-03-06 12:44 Sam James
2023-05-20 6:28 Sam James
2022-07-04 10:44 Georgy Yakovlev
2021-07-27 1:26 Georgy Yakovlev
2021-03-25 2:08 Georgy Yakovlev
2020-08-04 21:58 Georgy Yakovlev
2020-05-24 3:52 Georgy Yakovlev
2020-01-28 9:22 Georgy Yakovlev
2019-02-01 9:09 Georgy Yakovlev
2018-11-08 23:11 James Le Cuirot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1587674507.15f4b287d4e51821577b32f7f7d435d0e9030461.gyakovlev@gentoo \
--to=gyakovlev@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox