RFR: JDK-8294902: Undefined Behavior in C2 regalloc with null references [v10]
Andrew Haley
aph at openjdk.org
Mon Dec 12 17:35:57 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 with a new target base due to a merge or a rebase. The pull request now contains 15 commits:
- Merge from HEAD
- Reviewer feedback
- Reviewer feedback
- Align temp buffer used by offset_of().
- Feedback from reviewers
- Feedback from reviewers
- Migrate postaloc.cpp migrated away from references to pointers when it comes to Node_List.
Co-authored-by: Vladimir Ivanov <vaivanov at openjdk.org>
- Merge from JDK head
- Revert "Push ScopedValue tests"
This reverts commit d298edfa9eda48ace9a27f83d38320fe6ba79e67.
- Push ScopedValue tests
- ... and 5 more: https://git.openjdk.org/jdk/compare/56c438bf...59802eb4
-------------
Changes: https://git.openjdk.org/jdk/pull/10920/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10920&range=09
Stats: 81 lines in 6 files changed: 44 ins; 1 del; 36 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