RFR: 8357579: Compilation error: first argument in call to 'memset' is a pointer to non-trivially copyable type [v3]
Jan Kratochvil
jkratochvil at openjdk.org
Tue Nov 4 22:11:09 UTC 2025
> With clang-20 using --with-toolchain-type=clang resolveFieldEntry.cpp and resolveMethodEntry.cpp break the build with similar warnings like:
>
> 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*)
>
> The patch follows the suggested fix.
Jan Kratochvil has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
- Merge branch 'master' into clangmemset
- 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
- 8357579: Compilation error: first argument in call to 'memset' is a pointer to non-trivially copyable type
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/26098/files
- new: https://git.openjdk.org/jdk/pull/26098/files/09a45c6d..3745a8af
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=26098&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=26098&range=01-02
Stats: 422061 lines in 6258 files changed: 284237 ins; 95996 del; 41828 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