Summary: | emulators/rpcs3: clang 15 crashes during build | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Jan Beich <jbeich> | ||||||
Component: | Individual Port(s) | Assignee: | Dimitry Andric <dim> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Only Me | CC: | dim | ||||||
Priority: | --- | ||||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
URL: | https://pkg-status.freebsd.org/beefy18/data/main-amd64-default/p58633340e9ed_s5636590214/logs/errors/rpcs3-0.0.26.14694.log | ||||||||
See Also: | https://github.com/llvm/llvm-project/issues/58207 | ||||||||
Attachments: |
|
Description
Jan Beich
2023-02-11 11:06:44 UTC
Created attachment 240079 [details] faudio_enumerator.cpp (preprocessed, compressed) Affects multiple files, so let's inspect one of the smallest. https://github.com/RPCS3/rpcs3/blob/master/rpcs3/Emu/Audio/FAudio/faudio_enumerator.cpp FAILED: rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/Audio/FAudio/faudio_enumerator.cpp.o /usr/bin/c++ -DDATADIR=\"/usr/local/share/rpcs3\" -DGLX_GLXEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES -DHAVE_FAUDIO -DHAVE_LIBEVDEV -DHAVE_VULKAN -DHAVE_X11 -DLLVM_AVAILABLE -DSOUNDTOUCH_ALLOW_SSE -DSOUNDTOUCH_FLOAT_SAMPLES -DST_NO_EXCEPTION_HANDLING -DUSE_MULTICH_ALWAYS -DVK_USE_PLATFORM_WAYLAND_KHR -DWC_NO_HARDEN -Irpcs3 -I. -I3rdparty/yaml-cpp/yaml-cpp/include -I/usr/local/include/AL -I3rdparty/cubeb/cubeb/include -I../.build/exports -I3rdparty/SoundTouch/soundtouch/include -I3rdparty/stblib/include -Illvm/include -I../.build/3rdparty/llvm_build/include -I3rdparty/asmjit/asmjit/src -I3rdparty/GL -I3rdparty/glslang/glslang/SPIRV/.. -I../.build/include -I3rdparty/SPIRV/SPIRV-Tools/include -I3rdparty/SPIRV/SPIRV-Headers/include -I3rdparty/wolfssl/wolfssl -I../.build/3rdparty/wolfssl/wolfssl -isystem /usr/local/include/libevdev-1.0 -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -Wl,--exclude-libs,ALL -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG -pthread -Wall -fno-exceptions -fstack-protector -msse -msse2 -mcx16 -Werror=old-style-cast -Werror=sign-compare -Werror=reorder -Werror=return-type -Werror=overloaded-virtual -Werror=missing-noreturn -Wunused-parameter -Wignored-qualifiers -Wredundant-move -Wcast-qual -Wdeprecated-copy -Wtautological-compare -Wempty-body -Wredundant-decls -Wstrict-aliasing=1 -Werror=inconsistent-missing-override -fconstexpr-steps=16777216 -Wno-unused-lambda-capture -Wno-unused-private-field -Wno-delete-non-virtual-dtor -Wno-unused-command-line-argument -std=gnu++20 -MD -MT rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/Audio/FAudio/faudio_enumerator.cpp.o -MF rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/Audio/FAudio/faudio_enumerator.cpp.o.d -o rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/Audio/FAudio/faudio_enumerator.cpp.o -c rpcs3/Emu/Audio/FAudio/faudio_enumerator.cpp Created attachment 240080 [details]
command line arguments (preprocessed, specific to clang 15)
Previously, built fine with Clang 14: https://pkg-status.freebsd.org/beefy18/data/main-amd64-default/p96a5483c708f_s77934b7a13/logs/rpcs3-qt6-0.0.26.14614.log https://pkg-status.freebsd.org/beefy18/data/main-amd64-default/p2f5a35cecf5c_sdfbe8f6483/logs/rpcs3-0.0.26.14614.log This appears to be caused by <https://github.com/llvm/llvm-project/commit/1c55f05c6a6>. It still reproduces with the latest upstream main branch. I will minimize and submit a bug upstream. This was reported a while before, in https://github.com/llvm/llvm-project/issues/58207. Looks like the minimized test case is mostly the same. I've pinged the author of the commit in the upstream bug report, we'll see if it leads to a quick response. Otherwise, I can revert the upstream commit for now. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=56f2446575c78d962b6dda5e3310bec078622f3d commit 56f2446575c78d962b6dda5e3310bec078622f3d Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-04-28 14:08:42 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-04-28 14:09:45 +0000 Apply clang fix for assertion building emulators/rpcs3 Merge commit a5e1a93ea10f from llvm-project (by Mariya Podchishchaeva): [clang] Fix crash when handling nested immediate invocations Before this patch it was expected that if there was several immediate invocations they all belong to the same expression evaluation context. During parsing of non local variable initializer a new evaluation context is pushed, so code like this ``` namespace scope { struct channel { consteval channel(const char* name) noexcept { } }; consteval const char* make_channel_name(const char* name) { return name;} channel rsx_log(make_channel_name("rsx_log")); } ``` produced a nested immediate invocation whose subexpressions are attached to different expression evaluation contexts. The constructor call belongs to TU context and `make_channel_name` call to context of variable initializer. This patch removes this assumption and adds tracking of previously failed immediate invocations, so it is possible when handling an immediate invocation th check that its subexpressions from possibly another evaluation context contains errors and not produce duplicate diagnostics. Fixes https://github.com/llvm/llvm-project/issues/58207 Reviewed By: aaron.ballman, shafik Differential Revision: https://reviews.llvm.org/D146234 PR: 269489 MFC after: 3 days .../llvm-project/clang/include/clang/Sema/Sema.h | 3 +++ contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 26 +++++++++++++++------- 2 files changed, 21 insertions(+), 8 deletions(-) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=a7e6ae2dc64b313520adc6141e4cffb1fa962b66 commit a7e6ae2dc64b313520adc6141e4cffb1fa962b66 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-04-28 14:08:42 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-05-03 08:18:46 +0000 Apply clang fix for assertion building emulators/rpcs3 Merge commit a5e1a93ea10f from llvm-project (by Mariya Podchishchaeva): [clang] Fix crash when handling nested immediate invocations Before this patch it was expected that if there was several immediate invocations they all belong to the same expression evaluation context. During parsing of non local variable initializer a new evaluation context is pushed, so code like this ``` namespace scope { struct channel { consteval channel(const char* name) noexcept { } }; consteval const char* make_channel_name(const char* name) { return name;} channel rsx_log(make_channel_name("rsx_log")); } ``` produced a nested immediate invocation whose subexpressions are attached to different expression evaluation contexts. The constructor call belongs to TU context and `make_channel_name` call to context of variable initializer. This patch removes this assumption and adds tracking of previously failed immediate invocations, so it is possible when handling an immediate invocation th check that its subexpressions from possibly another evaluation context contains errors and not produce duplicate diagnostics. Fixes https://github.com/llvm/llvm-project/issues/58207 Reviewed By: aaron.ballman, shafik Differential Revision: https://reviews.llvm.org/D146234 PR: 269489 MFC after: 3 days (cherry picked from commit 56f2446575c78d962b6dda5e3310bec078622f3d) .../llvm-project/clang/include/clang/Sema/Sema.h | 3 +++ contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 26 +++++++++++++++------- 2 files changed, 21 insertions(+), 8 deletions(-) A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=44f4aaee6be33d7e2afe3ce0f0fb856e83da01d7 commit 44f4aaee6be33d7e2afe3ce0f0fb856e83da01d7 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-04-28 14:08:42 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-05-03 08:25:29 +0000 Apply clang fix for assertion building emulators/rpcs3 Merge commit a5e1a93ea10f from llvm-project (by Mariya Podchishchaeva): [clang] Fix crash when handling nested immediate invocations Before this patch it was expected that if there was several immediate invocations they all belong to the same expression evaluation context. During parsing of non local variable initializer a new evaluation context is pushed, so code like this ``` namespace scope { struct channel { consteval channel(const char* name) noexcept { } }; consteval const char* make_channel_name(const char* name) { return name;} channel rsx_log(make_channel_name("rsx_log")); } ``` produced a nested immediate invocation whose subexpressions are attached to different expression evaluation contexts. The constructor call belongs to TU context and `make_channel_name` call to context of variable initializer. This patch removes this assumption and adds tracking of previously failed immediate invocations, so it is possible when handling an immediate invocation th check that its subexpressions from possibly another evaluation context contains errors and not produce duplicate diagnostics. Fixes https://github.com/llvm/llvm-project/issues/58207 Reviewed By: aaron.ballman, shafik Differential Revision: https://reviews.llvm.org/D146234 PR: 269489 MFC after: 3 days (cherry picked from commit 56f2446575c78d962b6dda5e3310bec078622f3d) .../llvm-project/clang/include/clang/Sema/Sema.h | 3 +++ contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 26 +++++++++++++++------- 2 files changed, 21 insertions(+), 8 deletions(-) |