Skip to content

Clang v15.0.2: crash #58207

@RipleyTom

Description

@RipleyTom

Clang v15.0.2 seems to fail to compile rpcs3 ( https://github.com/RPCS3/rpcs3 ):

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /usr/lib/llvm/15/bin/clang++ -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 -DWC_NO_HARDEN -I/home/ripley/Repos/rpcs3/rpcs3 -I/home/ripley/Repos/rpcs3 -I/home/ripley/Repos/rpcs3/3rdparty/yaml-cpp/yaml-cpp/include -I/home/ripley/Repos/rpcs3/3rdparty/flatbuffers/include -I/home/ripley/Repos/rpcs3/3rdparty/pugixml/src -I/home/ripley/Repos/rpcs3/3rdparty/FAudio/src -I/home/ripley/Repos/rpcs3/3rdparty/FAudio/include -I/usr/include/AL -I/home/ripley/Repos/rpcs3/3rdparty/cubeb/cubeb/include -I/home/ripley/Repos/rpcs3_build/build_clang/exports -I/home/ripley/Repos/rpcs3/3rdparty/SoundTouch/soundtouch/include -I/home/ripley/Repos/rpcs3/3rdparty/stblib/include -I/home/ripley/Repos/rpcs3_build/build_clang/3rdparty/libpng/libpng -I/home/ripley/Repos/rpcs3/3rdparty/libpng/libpng -I/home/ripley/Repos/rpcs3/llvm/include -I/home/ripley/Repos/rpcs3_build/build_clang/3rdparty/llvm_build/include -I/home/ripley/Repos/rpcs3/3rdparty/asmjit/asmjit/src -I/home/ripley/Repos/rpcs3/3rdparty/ffmpeg/include -I/home/ripley/Repos/rpcs3/3rdparty/GL -I/home/ripley/Repos/rpcs3/3rdparty/glslang/glslang/SPIRV/.. -I/home/ripley/Repos/rpcs3_build/build_clang/include -I/home/ripley/Repos/rpcs3/3rdparty/SPIRV/SPIRV-Tools/include -I/home/ripley/Repos/rpcs3/3rdparty/SPIRV/SPIRV-Headers/include -I/home/ripley/Repos/rpcs3/3rdparty/libusb/libusb/libusb -I/home/ripley/Repos/rpcs3/3rdparty/wolfssl/wolfssl -I/home/ripley/Repos/rpcs3_build/build_clang/3rdparty/wolfssl/wolfssl -I/home/ripley/Repos/rpcs3/3rdparty/xxHash/cmake_unofficial/.. -I/home/ripley/Repos/rpcs3/3rdparty/xxHash -isystem /usr/include/libevdev-1.0 -isystem /usr/include/SDL2 -Wl,--exclude-libs,ALL -O3 -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 -march=native -std=gnu++20 -MD -MT rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/cache_utils.cpp.o -MF CMakeFiles/rpcs3_emu.dir/cache_utils.cpp.o.d -o CMakeFiles/rpcs3_emu.dir/cache_utils.cpp.o -c /home/ripley/Repos/rpcs3/rpcs3/Emu/cache_utils.cpp
1.      <eof> parser at end of file
 #0 0x00007fdf5f2a98a1 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib/llvm/15/bin/../lib64/libLLVM-15.so+0xef38a1)
 #1 0x00007fdf5f2a72f4 llvm::sys::RunSignalHandlers() (/usr/lib/llvm/15/bin/../lib64/libLLVM-15.so+0xef12f4)
 #2 0x00007fdf5f1b7bb8 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007fdf5dfaec10 __restore_rt libc_sigaction.c:0:0
 #4 0x00007fdf5e00a8c5 cfree@GLIBC_2.2.5 (/lib64/libc.so.6+0x938c5)
 #5 0x00007fdf66d45693 clang::Sema::PopExpressionEvaluationContext() (/usr/lib/llvm/15/bin/../lib64/libclang-cpp.so.15+0x1643693)
 #6 0x00007fdf662aa7e6 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/llvm/15/bin/../lib64/libclang-cpp.so.15+0xba87e6)
 #7 0x00007fdf67dead19 clang::FrontendAction::Execute() (/usr/lib/llvm/15/bin/../lib64/libclang-cpp.so.15+0x26e8d19)
 #8 0x00007fdf67d83e62 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/llvm/15/bin/../lib64/libclang-cpp.so.15+0x2681e62)
 #9 0x00007fdf67e5e517 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/llvm/15/bin/../lib64/libclang-cpp.so.15+0x275c517)
#10 0x000055e6b2f6e05c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/lib/llvm/15/bin/clang+++0x1805c)
#11 0x000055e6b2f69661 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#12 0x00007fdf67a55ed5 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#13 0x00007fdf5f1b7cc3 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/lib/llvm/15/bin/../lib64/libLLVM-15.so+0xe01cc3)
#14 0x00007fdf67a57974 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/usr/lib/llvm/15/bin/../lib64/libclang-cpp.so.15+0x2355974)
#15 0x00007fdf67a22463 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/lib/llvm/15/bin/../lib64/libclang-cpp.so.15+0x2320463)
#16 0x00007fdf67a22bfd clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/usr/lib/llvm/15/bin/../lib64/libclang-cpp.so.15+0x2320bfd)
#17 0x00007fdf67a3211c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/lib/llvm/15/bin/../lib64/libclang-cpp.so.15+0x233011c)
#18 0x000055e6b2f6b84c clang_main(int, char**) (/usr/lib/llvm/15/bin/clang+++0x1584c)
#19 0x00007fdf5df9a34a __libc_start_call_main libc-start.c:0:0
#20 0x00007fdf5df9a3fc __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x233fc)
#21 0x000055e6b2f66a41 _start (/usr/lib/llvm/15/bin/clang+++0x10a41)
clang-15: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 15.0.2
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/15/bin
Configuration file: /etc/clang/clang++.cfg
clang-15: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-15: note: diagnostic msg: /tmp/cache_utils-93deb0.cpp
clang-15: note: diagnostic msg: /tmp/cache_utils-93deb0.sh
clang-15: note: diagnostic msg: 

********************
make[2]: *** [rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/build.make:76: rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/cache_utils.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:29773: rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

I wish I could give you a small sample but all I can give you are those 5MB preprocessed sources:

cache_utils-93deb0..zip

Clang15 seems to compile all the submodules(including llvm14 itself) just fine but fails on rpcs3 itself.
Of note is that Rpcs3 uses C++20 extensively.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyconstevalC++20 constevalcrashPrefer [crash-on-valid] or [crash-on-invalid]release:backportrelease:merged

    Type

    No type

    Projects

    Status

    Done

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions