Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] openjdk11/17: fix memory corruption bug on musl
@ 2022-06-30 16:50 classabbyamp
  2022-06-30 16:52 ` [PR PATCH] [Updated] " classabbyamp
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: classabbyamp @ 2022-06-30 16:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

There is a new pull request by classabbyamp against master on the void-packages repository

https://github.com/void-linux/void-packages fix/openjdk-11-17-musl
https://github.com/void-linux/void-packages/pull/37762

openjdk11/17: fix memory corruption bug on musl
- openjdk11: fix memory corruption issue on musl
- openjdk17: fix memory corruption issue on musl

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**



A patch file from https://github.com/void-linux/void-packages/pull/37762.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix/openjdk-11-17-musl-37762.patch --]
[-- Type: text/x-diff, Size: 1384 bytes --]

From bfaf7fc5c62f1ba44ddfa9e32ba55f866f7a7f03 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 30 Jun 2022 12:49:03 -0400
Subject: [PATCH 1/2] openjdk11: fix memory corruption issue on musl

---
 srcpkgs/openjdk11/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/openjdk11/template b/srcpkgs/openjdk11/template
index 48be7fa6bfc8..8d74b7c131f1 100644
--- a/srcpkgs/openjdk11/template
+++ b/srcpkgs/openjdk11/template
@@ -1,7 +1,7 @@
 # Template file for 'openjdk11'
 pkgname=openjdk11
 version=11.0.12+7
-revision=2
+revision=3
 _java_ver="${version%%.*}"
 _jdk_home="usr/lib/jvm/openjdk${_java_ver}"
 archs="x86_64* i686* aarch64* armv7* ppc64*"

From 26cfc964a13b723626c87bfa23fbc26820ecbc62 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 30 Jun 2022 12:49:14 -0400
Subject: [PATCH 2/2] openjdk17: fix memory corruption issue on musl

---
 srcpkgs/openjdk17/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/openjdk17/template b/srcpkgs/openjdk17/template
index 03ac17c81b4d..0763d2d5a41e 100644
--- a/srcpkgs/openjdk17/template
+++ b/srcpkgs/openjdk17/template
@@ -1,7 +1,7 @@
 # Template file for 'openjdk17'
 pkgname=openjdk17
 version=17.0.3+7
-revision=2
+revision=3
 _gtest_ver=1.8.1
 _java_ver="${version%%.*}"
 _jdk_update="${version#*+}"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] openjdk11/17: fix memory corruption bug on musl
  2022-06-30 16:50 [PR PATCH] openjdk11/17: fix memory corruption bug on musl classabbyamp
@ 2022-06-30 16:52 ` classabbyamp
  2022-06-30 20:09 ` classabbyamp
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: classabbyamp @ 2022-06-30 16:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/void-linux/void-packages fix/openjdk-11-17-musl
https://github.com/void-linux/void-packages/pull/37762

openjdk11/17: fix memory corruption bug on musl
- openjdk11: fix memory corruption issue on musl
- openjdk17: fix memory corruption issue on musl

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**



A patch file from https://github.com/void-linux/void-packages/pull/37762.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix/openjdk-11-17-musl-37762.patch --]
[-- Type: text/x-diff, Size: 5242 bytes --]

From 48f907296be2a5f96cccd26cf044ee73b25a2d96 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 30 Jun 2022 12:49:03 -0400
Subject: [PATCH 1/2] openjdk11: fix memory corruption issue on musl

https://bugs.openjdk.org/browse/JDK-8289477
---
 .../files/musl_patches/8289477.patch          | 35 +++++++++++++++++++
 srcpkgs/openjdk11/template                    |  2 +-
 2 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/openjdk11/files/musl_patches/8289477.patch

diff --git a/srcpkgs/openjdk11/files/musl_patches/8289477.patch b/srcpkgs/openjdk11/files/musl_patches/8289477.patch
new file mode 100644
index 000000000000..57ac4866b578
--- /dev/null
+++ b/srcpkgs/openjdk11/files/musl_patches/8289477.patch
@@ -0,0 +1,35 @@
+From da6d1fc0e0aeb1fdb504aced4b0dba0290ec240f Mon Sep 17 00:00:00 2001
+From: Thomas Stuefe <stuefe@openjdk.org>
+Date: Thu, 30 Jun 2022 06:19:25 +0000
+Subject: [PATCH] 8289477: Memory corruption with CPU_ALLOC, CPU_FREE on muslc
+
+Reviewed-by: dholmes, clanger
+---
+ src/hotspot/os/linux/os_linux.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
+index 726926218907..8ee10e201c69 100644
+--- a/src/hotspot/os/linux/os_linux.cpp
++++ b/src/hotspot/os/linux/os_linux.cpp
+@@ -4591,7 +4591,8 @@ static int _cpu_count(const cpu_set_t* cpus) {
+ // dynamic check - see 6515172 for details.
+ // If anything goes wrong we fallback to returning the number of online
+ // processors - which can be greater than the number available to the process.
+-int os::Linux::active_processor_count() {
++static int get_active_processor_count() {
++  // Note: keep this function, with its CPU_xx macros, *outside* the os namespace (see JDK-8289477).
+   cpu_set_t cpus;  // can represent at most 1024 (CPU_SETSIZE) processors
+   cpu_set_t* cpus_p = &cpus;
+   int cpus_size = sizeof(cpu_set_t);
+@@ -4663,6 +4664,10 @@ int os::Linux::active_processor_count() {
+   return cpu_count;
+ }
+ 
++int os::Linux::active_processor_count() {
++  return get_active_processor_count();
++}
++
+ // Determine the active processor count from one of
+ // three different sources:
+ //
diff --git a/srcpkgs/openjdk11/template b/srcpkgs/openjdk11/template
index 48be7fa6bfc8..8d74b7c131f1 100644
--- a/srcpkgs/openjdk11/template
+++ b/srcpkgs/openjdk11/template
@@ -1,7 +1,7 @@
 # Template file for 'openjdk11'
 pkgname=openjdk11
 version=11.0.12+7
-revision=2
+revision=3
 _java_ver="${version%%.*}"
 _jdk_home="usr/lib/jvm/openjdk${_java_ver}"
 archs="x86_64* i686* aarch64* armv7* ppc64*"

From b14582ecbc760bdd022d7a9d24ac958a3bb1a428 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 30 Jun 2022 12:49:14 -0400
Subject: [PATCH 2/2] openjdk17: fix memory corruption issue on musl

https://bugs.openjdk.org/browse/JDK-8289477
---
 .../files/musl_patches/8289477.patch          | 35 +++++++++++++++++++
 srcpkgs/openjdk17/template                    |  2 +-
 2 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/openjdk17/files/musl_patches/8289477.patch

diff --git a/srcpkgs/openjdk17/files/musl_patches/8289477.patch b/srcpkgs/openjdk17/files/musl_patches/8289477.patch
new file mode 100644
index 000000000000..57ac4866b578
--- /dev/null
+++ b/srcpkgs/openjdk17/files/musl_patches/8289477.patch
@@ -0,0 +1,35 @@
+From da6d1fc0e0aeb1fdb504aced4b0dba0290ec240f Mon Sep 17 00:00:00 2001
+From: Thomas Stuefe <stuefe@openjdk.org>
+Date: Thu, 30 Jun 2022 06:19:25 +0000
+Subject: [PATCH] 8289477: Memory corruption with CPU_ALLOC, CPU_FREE on muslc
+
+Reviewed-by: dholmes, clanger
+---
+ src/hotspot/os/linux/os_linux.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
+index 726926218907..8ee10e201c69 100644
+--- a/src/hotspot/os/linux/os_linux.cpp
++++ b/src/hotspot/os/linux/os_linux.cpp
+@@ -4591,7 +4591,8 @@ static int _cpu_count(const cpu_set_t* cpus) {
+ // dynamic check - see 6515172 for details.
+ // If anything goes wrong we fallback to returning the number of online
+ // processors - which can be greater than the number available to the process.
+-int os::Linux::active_processor_count() {
++static int get_active_processor_count() {
++  // Note: keep this function, with its CPU_xx macros, *outside* the os namespace (see JDK-8289477).
+   cpu_set_t cpus;  // can represent at most 1024 (CPU_SETSIZE) processors
+   cpu_set_t* cpus_p = &cpus;
+   int cpus_size = sizeof(cpu_set_t);
+@@ -4663,6 +4664,10 @@ int os::Linux::active_processor_count() {
+   return cpu_count;
+ }
+ 
++int os::Linux::active_processor_count() {
++  return get_active_processor_count();
++}
++
+ // Determine the active processor count from one of
+ // three different sources:
+ //
diff --git a/srcpkgs/openjdk17/template b/srcpkgs/openjdk17/template
index 03ac17c81b4d..0763d2d5a41e 100644
--- a/srcpkgs/openjdk17/template
+++ b/srcpkgs/openjdk17/template
@@ -1,7 +1,7 @@
 # Template file for 'openjdk17'
 pkgname=openjdk17
 version=17.0.3+7
-revision=2
+revision=3
 _gtest_ver=1.8.1
 _java_ver="${version%%.*}"
 _jdk_update="${version#*+}"

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] openjdk11/17: fix memory corruption bug on musl
  2022-06-30 16:50 [PR PATCH] openjdk11/17: fix memory corruption bug on musl classabbyamp
  2022-06-30 16:52 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-06-30 20:09 ` classabbyamp
  2022-06-30 22:52 ` classabbyamp
  2022-07-01 21:03 ` [PR PATCH] [Merged]: " classabbyamp
  3 siblings, 0 replies; 5+ messages in thread
From: classabbyamp @ 2022-06-30 20:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/void-linux/void-packages fix/openjdk-11-17-musl
https://github.com/void-linux/void-packages/pull/37762

openjdk11/17: fix memory corruption bug on musl
- openjdk11: fix memory corruption issue on musl
- openjdk17: fix memory corruption issue on musl

https://bugs.openjdk.org/browse/JDK-8289477

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**



A patch file from https://github.com/void-linux/void-packages/pull/37762.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix/openjdk-11-17-musl-37762.patch --]
[-- Type: text/x-diff, Size: 5685 bytes --]

From f1ddd35a6225452e7e12c714d57f078738be53cf Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 30 Jun 2022 12:49:03 -0400
Subject: [PATCH 1/2] openjdk11: fix memory corruption issue on musl

https://bugs.openjdk.org/browse/JDK-8289477
---
 .../files/musl_patches/8289477.patch          | 35 +++++++++++++++++++
 srcpkgs/openjdk11/template                    |  3 +-
 2 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/openjdk11/files/musl_patches/8289477.patch

diff --git a/srcpkgs/openjdk11/files/musl_patches/8289477.patch b/srcpkgs/openjdk11/files/musl_patches/8289477.patch
new file mode 100644
index 000000000000..57ac4866b578
--- /dev/null
+++ b/srcpkgs/openjdk11/files/musl_patches/8289477.patch
@@ -0,0 +1,35 @@
+From da6d1fc0e0aeb1fdb504aced4b0dba0290ec240f Mon Sep 17 00:00:00 2001
+From: Thomas Stuefe <stuefe@openjdk.org>
+Date: Thu, 30 Jun 2022 06:19:25 +0000
+Subject: [PATCH] 8289477: Memory corruption with CPU_ALLOC, CPU_FREE on muslc
+
+Reviewed-by: dholmes, clanger
+---
+ src/hotspot/os/linux/os_linux.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
+index 726926218907..8ee10e201c69 100644
+--- a/src/hotspot/os/linux/os_linux.cpp
++++ b/src/hotspot/os/linux/os_linux.cpp
+@@ -4591,7 +4591,8 @@ static int _cpu_count(const cpu_set_t* cpus) {
+ // dynamic check - see 6515172 for details.
+ // If anything goes wrong we fallback to returning the number of online
+ // processors - which can be greater than the number available to the process.
+-int os::Linux::active_processor_count() {
++static int get_active_processor_count() {
++  // Note: keep this function, with its CPU_xx macros, *outside* the os namespace (see JDK-8289477).
+   cpu_set_t cpus;  // can represent at most 1024 (CPU_SETSIZE) processors
+   cpu_set_t* cpus_p = &cpus;
+   int cpus_size = sizeof(cpu_set_t);
+@@ -4663,6 +4664,10 @@ int os::Linux::active_processor_count() {
+   return cpu_count;
+ }
+ 
++int os::Linux::active_processor_count() {
++  return get_active_processor_count();
++}
++
+ // Determine the active processor count from one of
+ // three different sources:
+ //
diff --git a/srcpkgs/openjdk11/template b/srcpkgs/openjdk11/template
index 48be7fa6bfc8..b148ebe1e008 100644
--- a/srcpkgs/openjdk11/template
+++ b/srcpkgs/openjdk11/template
@@ -1,7 +1,7 @@
 # Template file for 'openjdk11'
 pkgname=openjdk11
 version=11.0.12+7
-revision=2
+revision=3
 _java_ver="${version%%.*}"
 _jdk_home="usr/lib/jvm/openjdk${_java_ver}"
 archs="x86_64* i686* aarch64* armv7* ppc64*"
@@ -43,6 +43,7 @@ provides="java-environment-${version}_1"
 
 # Build is still parallel, but don't use -jN.
 disable_parallel_build=yes
+disable_parallel_check=yes
 build_options="docs"
 
 case "$XBPS_TARGET_MACHINE" in

From 92d4e29e7b3bbc449af5061f3b88bb888ac5c1bc Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 30 Jun 2022 12:49:14 -0400
Subject: [PATCH 2/2] openjdk17: fix memory corruption issue on musl

https://bugs.openjdk.org/browse/JDK-8289477
---
 .../files/musl_patches/8289477.patch          | 35 +++++++++++++++++++
 srcpkgs/openjdk17/template                    |  3 +-
 2 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/openjdk17/files/musl_patches/8289477.patch

diff --git a/srcpkgs/openjdk17/files/musl_patches/8289477.patch b/srcpkgs/openjdk17/files/musl_patches/8289477.patch
new file mode 100644
index 000000000000..57ac4866b578
--- /dev/null
+++ b/srcpkgs/openjdk17/files/musl_patches/8289477.patch
@@ -0,0 +1,35 @@
+From da6d1fc0e0aeb1fdb504aced4b0dba0290ec240f Mon Sep 17 00:00:00 2001
+From: Thomas Stuefe <stuefe@openjdk.org>
+Date: Thu, 30 Jun 2022 06:19:25 +0000
+Subject: [PATCH] 8289477: Memory corruption with CPU_ALLOC, CPU_FREE on muslc
+
+Reviewed-by: dholmes, clanger
+---
+ src/hotspot/os/linux/os_linux.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
+index 726926218907..8ee10e201c69 100644
+--- a/src/hotspot/os/linux/os_linux.cpp
++++ b/src/hotspot/os/linux/os_linux.cpp
+@@ -4591,7 +4591,8 @@ static int _cpu_count(const cpu_set_t* cpus) {
+ // dynamic check - see 6515172 for details.
+ // If anything goes wrong we fallback to returning the number of online
+ // processors - which can be greater than the number available to the process.
+-int os::Linux::active_processor_count() {
++static int get_active_processor_count() {
++  // Note: keep this function, with its CPU_xx macros, *outside* the os namespace (see JDK-8289477).
+   cpu_set_t cpus;  // can represent at most 1024 (CPU_SETSIZE) processors
+   cpu_set_t* cpus_p = &cpus;
+   int cpus_size = sizeof(cpu_set_t);
+@@ -4663,6 +4664,10 @@ int os::Linux::active_processor_count() {
+   return cpu_count;
+ }
+ 
++int os::Linux::active_processor_count() {
++  return get_active_processor_count();
++}
++
+ // Determine the active processor count from one of
+ // three different sources:
+ //
diff --git a/srcpkgs/openjdk17/template b/srcpkgs/openjdk17/template
index 03ac17c81b4d..3ae920a80676 100644
--- a/srcpkgs/openjdk17/template
+++ b/srcpkgs/openjdk17/template
@@ -1,7 +1,7 @@
 # Template file for 'openjdk17'
 pkgname=openjdk17
 version=17.0.3+7
-revision=2
+revision=3
 _gtest_ver=1.8.1
 _java_ver="${version%%.*}"
 _jdk_update="${version#*+}"
@@ -52,6 +52,7 @@ patch_args="-Np1 --directory=$build_wrksrc"
 
 # Build is still parallel, but don't use -jN.
 disable_parallel_build=yes
+disable_parallel_check=yes
 build_options="docs"
 
 case "$XBPS_TARGET_MACHINE" in

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Updated] openjdk11/17: fix memory corruption bug on musl
  2022-06-30 16:50 [PR PATCH] openjdk11/17: fix memory corruption bug on musl classabbyamp
  2022-06-30 16:52 ` [PR PATCH] [Updated] " classabbyamp
  2022-06-30 20:09 ` classabbyamp
@ 2022-06-30 22:52 ` classabbyamp
  2022-07-01 21:03 ` [PR PATCH] [Merged]: " classabbyamp
  3 siblings, 0 replies; 5+ messages in thread
From: classabbyamp @ 2022-06-30 22:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/void-linux/void-packages fix/openjdk-11-17-musl
https://github.com/void-linux/void-packages/pull/37762

openjdk11/17: fix memory corruption bug on musl
- openjdk11: fix memory corruption issue on musl
- openjdk17: fix memory corruption issue on musl

https://bugs.openjdk.org/browse/JDK-8289477

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**



A patch file from https://github.com/void-linux/void-packages/pull/37762.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix/openjdk-11-17-musl-37762.patch --]
[-- Type: text/x-diff, Size: 5685 bytes --]

From 45afe43c8833a000429f082b4a05afe8d5985fd8 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 30 Jun 2022 12:49:03 -0400
Subject: [PATCH 1/2] openjdk11: fix memory corruption issue on musl

https://bugs.openjdk.org/browse/JDK-8289477
---
 .../files/musl_patches/8289477.patch          | 35 +++++++++++++++++++
 srcpkgs/openjdk11/template                    |  3 +-
 2 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/openjdk11/files/musl_patches/8289477.patch

diff --git a/srcpkgs/openjdk11/files/musl_patches/8289477.patch b/srcpkgs/openjdk11/files/musl_patches/8289477.patch
new file mode 100644
index 000000000000..57ac4866b578
--- /dev/null
+++ b/srcpkgs/openjdk11/files/musl_patches/8289477.patch
@@ -0,0 +1,35 @@
+From da6d1fc0e0aeb1fdb504aced4b0dba0290ec240f Mon Sep 17 00:00:00 2001
+From: Thomas Stuefe <stuefe@openjdk.org>
+Date: Thu, 30 Jun 2022 06:19:25 +0000
+Subject: [PATCH] 8289477: Memory corruption with CPU_ALLOC, CPU_FREE on muslc
+
+Reviewed-by: dholmes, clanger
+---
+ src/hotspot/os/linux/os_linux.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
+index 726926218907..8ee10e201c69 100644
+--- a/src/hotspot/os/linux/os_linux.cpp
++++ b/src/hotspot/os/linux/os_linux.cpp
+@@ -4591,7 +4591,8 @@ static int _cpu_count(const cpu_set_t* cpus) {
+ // dynamic check - see 6515172 for details.
+ // If anything goes wrong we fallback to returning the number of online
+ // processors - which can be greater than the number available to the process.
+-int os::Linux::active_processor_count() {
++static int get_active_processor_count() {
++  // Note: keep this function, with its CPU_xx macros, *outside* the os namespace (see JDK-8289477).
+   cpu_set_t cpus;  // can represent at most 1024 (CPU_SETSIZE) processors
+   cpu_set_t* cpus_p = &cpus;
+   int cpus_size = sizeof(cpu_set_t);
+@@ -4663,6 +4664,10 @@ int os::Linux::active_processor_count() {
+   return cpu_count;
+ }
+ 
++int os::Linux::active_processor_count() {
++  return get_active_processor_count();
++}
++
+ // Determine the active processor count from one of
+ // three different sources:
+ //
diff --git a/srcpkgs/openjdk11/template b/srcpkgs/openjdk11/template
index 48be7fa6bfc8..b148ebe1e008 100644
--- a/srcpkgs/openjdk11/template
+++ b/srcpkgs/openjdk11/template
@@ -1,7 +1,7 @@
 # Template file for 'openjdk11'
 pkgname=openjdk11
 version=11.0.12+7
-revision=2
+revision=3
 _java_ver="${version%%.*}"
 _jdk_home="usr/lib/jvm/openjdk${_java_ver}"
 archs="x86_64* i686* aarch64* armv7* ppc64*"
@@ -43,6 +43,7 @@ provides="java-environment-${version}_1"
 
 # Build is still parallel, but don't use -jN.
 disable_parallel_build=yes
+disable_parallel_check=yes
 build_options="docs"
 
 case "$XBPS_TARGET_MACHINE" in

From c63e81b3753dceece19d3bce2b3a840a62ce3269 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Thu, 30 Jun 2022 12:49:14 -0400
Subject: [PATCH 2/2] openjdk17: fix memory corruption issue on musl

https://bugs.openjdk.org/browse/JDK-8289477
---
 .../files/musl_patches/8289477.patch          | 35 +++++++++++++++++++
 srcpkgs/openjdk17/template                    |  3 +-
 2 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/openjdk17/files/musl_patches/8289477.patch

diff --git a/srcpkgs/openjdk17/files/musl_patches/8289477.patch b/srcpkgs/openjdk17/files/musl_patches/8289477.patch
new file mode 100644
index 000000000000..57ac4866b578
--- /dev/null
+++ b/srcpkgs/openjdk17/files/musl_patches/8289477.patch
@@ -0,0 +1,35 @@
+From da6d1fc0e0aeb1fdb504aced4b0dba0290ec240f Mon Sep 17 00:00:00 2001
+From: Thomas Stuefe <stuefe@openjdk.org>
+Date: Thu, 30 Jun 2022 06:19:25 +0000
+Subject: [PATCH] 8289477: Memory corruption with CPU_ALLOC, CPU_FREE on muslc
+
+Reviewed-by: dholmes, clanger
+---
+ src/hotspot/os/linux/os_linux.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
+index 726926218907..8ee10e201c69 100644
+--- a/src/hotspot/os/linux/os_linux.cpp
++++ b/src/hotspot/os/linux/os_linux.cpp
+@@ -4591,7 +4591,8 @@ static int _cpu_count(const cpu_set_t* cpus) {
+ // dynamic check - see 6515172 for details.
+ // If anything goes wrong we fallback to returning the number of online
+ // processors - which can be greater than the number available to the process.
+-int os::Linux::active_processor_count() {
++static int get_active_processor_count() {
++  // Note: keep this function, with its CPU_xx macros, *outside* the os namespace (see JDK-8289477).
+   cpu_set_t cpus;  // can represent at most 1024 (CPU_SETSIZE) processors
+   cpu_set_t* cpus_p = &cpus;
+   int cpus_size = sizeof(cpu_set_t);
+@@ -4663,6 +4664,10 @@ int os::Linux::active_processor_count() {
+   return cpu_count;
+ }
+ 
++int os::Linux::active_processor_count() {
++  return get_active_processor_count();
++}
++
+ // Determine the active processor count from one of
+ // three different sources:
+ //
diff --git a/srcpkgs/openjdk17/template b/srcpkgs/openjdk17/template
index 03ac17c81b4d..3ae920a80676 100644
--- a/srcpkgs/openjdk17/template
+++ b/srcpkgs/openjdk17/template
@@ -1,7 +1,7 @@
 # Template file for 'openjdk17'
 pkgname=openjdk17
 version=17.0.3+7
-revision=2
+revision=3
 _gtest_ver=1.8.1
 _java_ver="${version%%.*}"
 _jdk_update="${version#*+}"
@@ -52,6 +52,7 @@ patch_args="-Np1 --directory=$build_wrksrc"
 
 # Build is still parallel, but don't use -jN.
 disable_parallel_build=yes
+disable_parallel_check=yes
 build_options="docs"
 
 case "$XBPS_TARGET_MACHINE" in

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PR PATCH] [Merged]: openjdk11/17: fix memory corruption bug on musl
  2022-06-30 16:50 [PR PATCH] openjdk11/17: fix memory corruption bug on musl classabbyamp
                   ` (2 preceding siblings ...)
  2022-06-30 22:52 ` classabbyamp
@ 2022-07-01 21:03 ` classabbyamp
  3 siblings, 0 replies; 5+ messages in thread
From: classabbyamp @ 2022-07-01 21:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 490 bytes --]

There's a merged pull request on the void-packages repository

openjdk11/17: fix memory corruption bug on musl
https://github.com/void-linux/void-packages/pull/37762

Description:
- openjdk11: fix memory corruption issue on musl
- openjdk17: fix memory corruption issue on musl

https://bugs.openjdk.org/browse/JDK-8289477

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-01 21:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 16:50 [PR PATCH] openjdk11/17: fix memory corruption bug on musl classabbyamp
2022-06-30 16:52 ` [PR PATCH] [Updated] " classabbyamp
2022-06-30 20:09 ` classabbyamp
2022-06-30 22:52 ` classabbyamp
2022-07-01 21:03 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).