RFR: 8286876: NMT.test_unaliged_block_address_vm_assert fails if using clang toolchain [v6]

Albert Mingkun Yang ayang at openjdk.org
Tue Jan 17 15:40:37 UTC 2023


On Tue, 17 Jan 2023 11:14:54 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Both functions are needed.

The signature of `inline static MallocHeader* resolve_checked(void* memblock);` is too permissive -- the callee is allowed to mutate content of `memblock`, but it shouldn't.

> What you suggest would lead to a violation of constness.

As I pointed out before, constructing a `MallocHeader*` from a `const void*` can be a valid use case.

> Why drop protection? To gain what, save one line?

I think the bigger issue is having `void*` as the arg, which forces callers to check the impl of this method.

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

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


More information about the hotspot-runtime-dev mailing list