RFR: 8267611: Print more info when pointer_delta assert fails

Kim Barrett kbarrett at openjdk.java.net
Wed May 26 08:35:12 UTC 2021


On Mon, 24 May 2021 11:11:01 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

> We've seen a few new failures with the new pointer_delta assert. It would be nice if the assert printed the 'left' and 'right' pointer values.

Changes requested by kbarrett (Reviewer).

src/hotspot/share/utilities/globalDefinitions.hpp line 155:

> 153: 
> 154: // Convert pointer to intptr_t, for use in printing pointers.
> 155: inline intptr_t p2i(const void* p) {

I don't think the `const void*` overload is needed, given the presence of the `const volatile void*` overload.

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

PR: https://git.openjdk.java.net/jdk/pull/4163


More information about the hotspot-dev mailing list