[jdk17u-dev] RFR: 8328085: C2: Use after free in PhaseChaitin::Register_Allocate()

Richard Reingruber rrich at openjdk.org
Mon Jan 13 14:13:27 UTC 2025


Hi all,

This pull request contains a backport of commit [a21862ab](https://github.com/openjdk/jdk21u-dev/commit/a21862ab00317842da006eae453865badd4dc30f) from the [openjdk/jdk21u-dev](https://git.openjdk.org/jdk21u-dev) repository.

The commit being backported was authored by Richard Reingruber on 17 Dec 2024 and had no reviewers.

I'd consider the risk medium. There could be scenarios with higher memory usage in c2 register allocation.
I've done some testing with which did not reveal higher higher memory usage.
(the measuring code was part of the [original pull request](https://github.com/openjdk/jdk/pull/22200/commits))


Max. ResourceArea size in KB after C2 PhaseChaitin::merge_multidefs

DaCapo Benchmark        Basline        Pull Request

avrora                  2273           2259
batik                   3456           3179
biojava                 3372           3541
cassandra               563            595
eclipse                 4044           4090
fop                     3986           3986
graphchi                3024           3024
h2                      3826           3712
h2o                     5750           5962
jme                     2209           2147
jython                  9734           9774
kafka                   3115           3493
luindex                 3380           3447
lusearch                3866           3381
pmd                     6497           5779
spring                  4771           4944
sunflow                 3088           3088
tomcat                  3375           3467
tradebeans              3348           3672
tradesoap               3480           3353
xalan                   3476           3106
zxing                   3741           4766


`zxing` results are volatile. I've made 3 additional runs:

Max. ResourceArea size in KB after C2 PhaseChaitin::merge_multidefs running DaCapo::zxing

Baseline:     3844 6146 5448
Pull Request: 6013 3615 4472


The fix passed our CI testing: JTReg tests: tier1-4 of hotspot and jdk. All of Langtools and jaxp. JCK, SPECjvm2008, SPECjbb2015, Renaissance Suite, and SAP specific tests.
Testing was done with fastdebug builds on the main platforms and also on Linux/PPC64le and AIX.

Thanks, Richard.

-------------

Commit messages:
 - Backport a21862ab00317842da006eae453865badd4dc30f

Changes: https://git.openjdk.org/jdk17u-dev/pull/3197/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=3197&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8328085
  Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/3197.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/3197/head:pull/3197

PR: https://git.openjdk.org/jdk17u-dev/pull/3197


More information about the jdk-updates-dev mailing list