Compilation failure with clang 20
Pedro Lamarão
pedro.lamarao at prodist.com.br
Tue Jun 24 17:08:28 UTC 2025
Hello all,
Thanks for your hard work on this project!
I am posting here because the issue tracker in Github is disabled and I am
unsure where else to post such issues.
I am seeing a compilation failure with current HEAD and clang 20, three
instances of the same complaint:
* For target hotspot_variant-server_libjvm_objs_resolvedMethodEntry.o:
/home/centos/valhalla/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));
| ^
/home/centos/valhalla/src/hotspot/share/oops/resolvedMethodEntry.cpp:43:12:
note: explicitly cast the pointer to silence this warning
43 | memset(this, 0, sizeof(*this));
| ^
| (void*)
Taking a quick look at the declaration for ResolvedMethodEntry, it seems to
me that it could be made trivially copyable by defining copy
constructor and copy assignment = default. I suppose the compiler considers
this in principle to invoke undefined behaviour.
git HEAD:
commit cab7c4bdbf91a58c22b2d42f7ccd805238c349e4
BuIld configuration:
Configuration summary:
* Name: linux-x86_64-server-release
* Debug level: release
* HS debug level: product
* JVM variants: server
* JVM features: server: 'cds compiler1 compiler2 epsilongc g1gc jfr
jni-check jvmci jvmti management parallelgc serialgc services shenandoahgc
vm-structs zgc'
* OpenJDK target: OS: linux, CPU architecture: x86, address length: 64
* Version string: 25-internal-adhoc.centos.valhalla (25-internal)
* Source date: 1740061836 (2025-02-20T14:30:36Z)
Tools summary:
* Boot JDK: openjdk version "24" 2025-03-18 OpenJDK Runtime
Environment (build 24+36-3646) OpenJDK 64-Bit Server VM (build 24+36-3646,
mixed mode, sharing) (at /home/centos/jdk-24)
* Toolchain: clang (clang/LLVM)
* C Compiler: Version 20.1.2 (at /usr/bin/clang)
* C++ Compiler: Version 20.1.2 (at /usr/bin/clang++)
Build performance summary:
* Build jobs: 15
* Memory limit: 15861 MB
--
Pedro Lamarão
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-dev/attachments/20250624/de3a6110/attachment.htm>
More information about the valhalla-dev
mailing list