[11u] RFR 8263558: Possible NULL dereference in fast path arena free if ZapResourceArea is true
Zhengyu Gu
zgu at redhat.com
Tue Apr 6 18:01:26 UTC 2021
I would like to backport this patch to 11u for parity with Oracle
11.0.12-oracle.
The original bug: https://bugs.openjdk.java.net/browse/JDK-8263558
The original patch: https://github.com/openjdk/jdk/commit/d2c137d4
The original patch does not apply cleanly. The conflict is due to
JDK-8195100 [1], which changed Afree() method signature.
diff -r 490ba2d4ad94 src/hotspot/share/memory/arena.hpp
--- a/src/hotspot/share/memory/arena.hpp Sat Mar 20 09:06:53 2021
+0000
+++ b/src/hotspot/share/memory/arena.hpp Tue Apr 06 13:53:44 2021
-0400
@@ -201,7 +201,7 @@
// Fast delete in area. Common case is: NOP (except for storage
reclaimed)
void Afree(void *ptr, size_t size) {
if (ptr == NULL) {
- return true; // as with free(3), freeing NULL is a noop.
+ return; // as with free(3), freeing NULL is a noop.
}
11u webrev: http://cr.openjdk.java.net/~zgu/JDK-8263558-11u/webrev.00/
Thanks,
-Zhengyu
[1] https://bugs.openjdk.java.net/browse/JDK-8195100
More information about the jdk-updates-dev
mailing list