RFR: 8357579: Compilation error: first argument in call to 'memset' is a pointer to non-trivially copyable type [v2]
Abdelhak Zaaim
duke at openjdk.org
Wed Jul 2 18:29:38 UTC 2025
On Wed, 2 Jul 2025 16:54:55 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:
>> 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
Marked as reviewed by abdelhak-zaaim at github.com (no known OpenJDK username).
-------------
PR Review: https://git.openjdk.org/jdk/pull/26098#pullrequestreview-2980225708
More information about the hotspot-dev
mailing list