[jdk17u-dev] RFR: 8332825: ubsan: guardedMemory.cpp:35:11: runtime error: null pointer passed as argument 2, which is declared to never be null

Thomas Stuefe stuefe at openjdk.org
Fri Sep 13 14:31:13 UTC 2024


On Fri, 13 Sep 2024 14:16:14 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> Yes, but the new code checks whether "ptr" is null. That is passed in as an argument.
>
> we call
> `GuardedMemory::wrap_copy(no_data, 0);`
> This makes `ptr == NULL / nullptr` .
> See the full backtrace here https://github.com/openjdk/jdk/pull/19382
> It is a clean backport so should be the same in 17.  The check was added to handle to no_data / length 0 case .

Okay, I just misread the code. Sorry for the confusion, I was too tired.

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

PR Review Comment: https://git.openjdk.org/jdk17u-dev/pull/2829#discussion_r1758975287


More information about the jdk-updates-dev mailing list