RFR: 8373638: RBTree public interface does not check all input parameters for validity

Casper Norrbin cnorrbin at openjdk.org
Fri Dec 19 11:15:07 UTC 2025


Hi everyone,

The public interface for the `RBTree` assumes most input is valid, and does not check for null pointers. This could lead to potential null pointer dereferences. We should instead assert to give clearer errors in debug builds and to avoid trying to dereference these null pointers.

Testing:
- Oracle tiers 1-3

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

Commit messages:
 - nullptr asserts

Changes: https://git.openjdk.org/jdk/pull/28922/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28922&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8373638
  Stats: 7 lines in 2 files changed: 7 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/28922.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28922/head:pull/28922

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


More information about the hotspot-dev mailing list