RFR: 8357579: Compilation error: first argument in call to 'memset' is a pointer to non-trivially copyable type [v2]

Jan Kratochvil jkratochvil at openjdk.org
Wed Jul 2 16:54:55 UTC 2025


> src/hotspot/share/oops/resolvedFieldEntry.cpp:49:10: error: first argument in call to 'memset' is a pointer to non-trivially copyable type 'ResolvedFieldEntry' [-Werror,-Wnontrivial-memcall]
>    49 |   memset(this, 0, sizeof(*this));
>       |          ^
> src/hotspot/share/oops/resolvedFieldEntry.cpp:49:10: note: explicitly cast the pointer to silence this warning
>    49 |   memset(this, 0, sizeof(*this));
>       |          ^
>       |          (void*)
> 1 error generated.
> src/hotspot/share/oops/resolvedMethodEntry.cpp:43:12: error: first argument in call to 'memset' is a pointer to non-trivially copyable type 'ResolvedMethodEntry' [-Werror,-Wnontrivial-memcall]
>    43 |     memset(this, 0, sizeof(*this));
>       |            ^
> src/hotspot/share/oops/resolvedMethodEntry.cpp:43:12: note: explicitly cast the pointer to silence this warning
>    43 |     memset(this, 0, sizeof(*this));
>       |            ^
>       |            (void*)
> src/hotspot/share/oops/resolvedMethodEntry.cpp:48:12: error: first argument in call to 'memset' is a pointer to non-trivially copyable type 'ResolvedMethodEntry' [-Werror,-Wnontrivial-memcall]
>    48 |     memset(this, 0, sizeof(*this));
>       |            ^
> src/hotspot/share/oops/resolvedMethodEntry.cpp:48:12: note: explicitly cast the pointer to silence this warning
>    48 |     memset(this, 0, sizeof(*this));
>       |            ^
>       |            (void*)
> 2 errors generated.

Jan Kratochvil has updated the pull request incrementally with two additional commits since the last revision:

 - Revert "8361288: Fix build of JTReg: wget exited with exit code 4"
   
   This reverts commit 6e6b8f6a26f8e555f1e70544546b92bbafcae6cc.
 - 8361288: Fix build of JTReg: wget exited with exit code 4

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/26098/files
  - new: https://git.openjdk.org/jdk/pull/26098/files/fe514b44..09a45c6d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=26098&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26098&range=00-01

  Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/26098.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26098/head:pull/26098

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


More information about the hotspot-dev mailing list