RFR: 8346714: [ASAN] compressedKlass.cpp reported applying non-zero offset to null pointer [v4]

SendaoYan syan at openjdk.org
Mon Dec 23 10:21:38 UTC 2024


On Mon, 23 Dec 2024 09:41:55 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

> It should work without the second cast, but there may be compiler warnings like "warning: implicit conversion changes signedness: 'long' to 'unsigned long' [-Wsign-conversion]".

Yes, below example can reproduce the gcc/clang compile warning.


#include <stdio.h>

int main()
{
  unsigned long a = 1;
  signed long b = 2;
  printf("%llu\n", (long long unsigned int)(a + b));
  return 0;
}

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22848#discussion_r1895571206


More information about the hotspot-dev mailing list