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

Albert Mingkun Yang ayang at openjdk.org
Wed Feb 18 12:08:40 UTC 2026


On Tue, 17 Feb 2026 13:24:49 GMT, Casper Norrbin <cnorrbin at openjdk.org> wrote:

>> 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
>
> Casper Norrbin has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
> 
>  - move preconds to inline file
>  - Merge branch 'master' into rbtree-more-asserts
>  - changed asserts to precond
>  - nullptr asserts

Marked as reviewed by ayang (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/28922#pullrequestreview-3819502138


More information about the hotspot-dev mailing list