RFR[11u]: backport 8218966: AArch64: String.compareTo() can read memory after string

Dmitrij Pochepko dmitrij.pochepko at bell-sw.com
Wed Aug 21 17:53:02 UTC 2019


Hi,

please review backport of JDK-8218966 "AArch64: String.compareTo() can 
read memory after string" [1]

The original patch [1] does not apply cleanly with 2 failed hunks [2] 
because of JDK-8206895 [3] (not in jdk11u), which changed 2 "cmp" 
instructions to 2 "subs" instructions. Patch for [3] was introduced to 
handle potential immediate constant overflow, but for current patch 
these constants are within acceptable range because of [4], which is 
already present in 11u and no additional code changes are required. The 
only difference between current and original patch is that "cmp -> subs" 
change is taken into account.

new patch: 
http://cr.openjdk.java.net/~dpochepk/8218966.backport.11u/webrev.01/

testing:
- tier1 hotspot jtreg tests passed
- jck-runtime passed
- new tests, which demonstrate this issue is also passed after patch is 
applied

Thanks,
Dmitrij


[1] original patch: http://hg.openjdk.java.net/jdk/jdk/rev/82fd8793ba5e, 
original bug: https://bugs.openjdk.java.net/browse/JDK-8218966, original 
review: 
https://mail.openjdk.java.net/pipermail/aarch64-port-dev/2019-May/007367.html

[2] rejects of original apply: 
http://cr.openjdk.java.net/~dpochepk/8218966.backport.11u/webrev.01/stubGenerator_aarch64.cpp.rej

[3] https://bugs.openjdk.java.net/browse/JDK-8206895, patch: 
http://hg.openjdk.java.net/jdk/jdk/rev/7be0084191ed

[4] https://bugs.openjdk.java.net/browse/JDK-8206265, patch 
http://hg.openjdk.java.net/jdk-updates/jdk11u-dev/rev/44483330f7cf




More information about the jdk-updates-dev mailing list