Skip to content

Conversation

@HJLeee
Copy link
Contributor

@HJLeee HJLeee commented Dec 8, 2025

linux-x64 build with clang-21 fails with below error.

[  248s] In file included from /home/abuild/rpmbuild/BUILD/coreclr-diagnostics-8.0.547301/src/SOS/Strike/disasm.cpp:57:
[  248s] In file included from /home/abuild/rpmbuild/BUILD/coreclr-diagnostics-8.0.547301/src/shared/gcdump/gcdumpnonx86.cpp:13:
[  248s] In file included from /home/abuild/rpmbuild/BUILD/coreclr-diagnostics-8.0.547301/src/shared/inc/gcinfodecoder.h:170:
[  248s] /home/abuild/rpmbuild/BUILD/coreclr-diagnostics-8.0.547301/src/shared/inc/regdisp.h:261:16: error: first argument in call to 'memset' is a pointer to non-trivially copyable type 'REGDISPLAY' [-Werror,-Wnontrivial-memcall]
[  248s]   261 |         memset(this, 0, sizeof(REGDISPLAY));
[  248s]       |                ^
[  248s] /home/abuild/rpmbuild/BUILD/coreclr-diagnostics-8.0.547301/src/shared/inc/regdisp.h:261:16: note: explicitly cast the pointer to silence this warning
[  248s]   261 |         memset(this, 0, sizeof(REGDISPLAY));
[  248s]       |                ^
[  248s]       |                (void*)
[  248s] In file included from /home/abuild/rpmbuild/BUILD/coreclr-diagnostics-8.0.547301/src/SOS/Strike/disasm.cpp:57:
[  248s] In file included from /home/abuild/rpmbuild/BUILD/coreclr-diagnostics-8.0.547301/src/shared/gcdump/gcdumpnonx86.cpp:591:
[  248s] /home/abuild/rpmbuild/BUILD/coreclr-diagnostics-8.0.547301/src/shared/gcdump/../gcinfo/gcinfodumper.cpp:620:16: error: first argument in call to 'memset' is a pointer to non-trivially copyable type 'REGDISPLAY' [-Werror,-Wnontrivial-memcall]
[  248s]   620 |     ZeroMemory(&regdisp, sizeof(regdisp));
[  248s]       |                ^
[  248s] /home/abuild/rpmbuild/BUILD/coreclr-diagnostics-8.0.547301/src/shared/gcdump/../gcinfo/gcinfodumper.cpp:620:16: note: explicitly cast the pointer to silence this warning
[  248s] 2 errors generated.
[  248s] make[2]: *** [src/SOS/Strike/CMakeFiles/sos.dir/build.make:79: src/SOS/Strike/CMakeFiles/sos.dir/disasm.cpp.o] Error 1
[  248s] make[2]: *** Waiting for unfinished jobs....
[  248s] [ 99%] Linking CXX shared library libdbgshim.so
[  248s] [ 99%] Built target dbgshim
[  249s] [ 99%] Linking CXX shared library libsosplugin.so
[  249s] [ 99%] Built target sosplugin
[  250s] make[1]: *** [CMakeFiles/Makefile2:742: src/SOS/Strike/CMakeFiles/sos.dir/all] Error 2
[  250s] make: *** [Makefile:136: all] Error 2
[  250s] Failed to build.

refer to 6b1e6c5

@HJLeee HJLeee requested a review from a team as a code owner December 8, 2025 07:15
@HJLeee HJLeee changed the title Fix clang-21 error on linux-x64 build Fix build break with clang-21 on linux-x64 Dec 8, 2025
@steveisok steveisok merged commit 5d3d7c4 into dotnet:main Dec 8, 2025
19 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants