RFR: JDK-8294902: Undefined Behavior in C2 regalloc with null references [v11]

Andrew Haley aph at openjdk.org
Mon Dec 12 17:53:34 UTC 2022


> This patch fixes the remaining null pointer dereference bugs that I know of.
> 
> For the main bug, C2 was using a null reference to indicate an uninitialized `Node_List`. I replaced the null reference with a static sentinel.
> 
> I also turned on `-fsanitize=null` and found and fixed a bunch of other null pointer dereferences. With this,I have run a full bootstrap and tier1 tests with `-fsanitize=null` enabled.
> 
> I have checked that the code generated by GCC is not worse in any significant way, so I don't expect to see any performance regressions.
> 
> I'd like to enable `-fsanitize=null` in debug builds to prevent regressions in this area. What do you think?

Andrew Haley has updated the pull request incrementally with three additional commits since the last revision:

 - Reviewer feedback
 - Fix merge
 - Fix merge

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/10920/files
  - new: https://git.openjdk.org/jdk/pull/10920/files/59802eb4..7caa719b

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=10920&range=10
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10920&range=09-10

  Stats: 28 lines in 4 files changed: 6 ins; 21 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/10920.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10920/head:pull/10920

PR: https://git.openjdk.org/jdk/pull/10920


More information about the hotspot-dev mailing list