RFR: 8207025: Simplify PathString::set_value() in arguments.cpp
David Holmes
dholmes at openjdk.java.net
Mon Mar 28 06:23:45 UTC 2022
On Mon, 28 Mar 2022 04:14:32 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> Please review this trivial change. Remove unnecessary NULL check and change return type to void, since the function will never return with a failure status.
See comment
Hi Ioi,
I think the real bug in this code is that
`_value = AllocateHeap(strlen(value)+1, mtArguments);`
should be:
`_value = AllocateHeap(strlen(value)+1, mtArguments, AllocFailStrategy::RETURN_NULL);`
as this code is used from `JvmtiEnv::SetSystemProperty` and it seems wrong to abort the VM on that path.
-------------
Changes requested by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7981
More information about the hotspot-runtime-dev
mailing list