[jdk11u-dev] RFR: 8269661: JNI_GetStringCritical does not lock char array
Zhengyu Gu
zgu at openjdk.java.net
Wed Jul 7 18:17:03 UTC 2021
I would like to backport this patch to openjdk11u.
This patch mainly impacts Shenandoah GC, which is the only GC that supports object pinning and string deduplication.
The original patch does not apply cleanly, because it uses new string deduplication API introduced in jdk17. openjdk11u cannot prevent a string from being deduplicated, so it risks the possibility that string deduplication modifies string value while string critical session is in progress.
I purpose openjdk11u to take an alternative approach in openjdk11u: return a copy of string value when object pinning + string deduplication is enabled.
Test:
- [x] tier1 with UseShenandoahGC + UseStringDeduplication on Linux x86_64.
-------------
Commit messages:
- v1
- v0
Changes: https://git.openjdk.java.net/jdk11u-dev/pull/109/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk11u-dev&pr=109&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8269661
Stats: 56 lines in 1 file changed: 42 ins; 7 del; 7 mod
Patch: https://git.openjdk.java.net/jdk11u-dev/pull/109.diff
Fetch: git fetch https://git.openjdk.java.net/jdk11u-dev pull/109/head:pull/109
PR: https://git.openjdk.java.net/jdk11u-dev/pull/109
More information about the jdk-updates-dev
mailing list