[llvm-bugs] [Bug 50643] New: Clang crashes during code generation
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 9 08:20:42 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50643
Bug ID: 50643
Summary: Clang crashes during code generation
Product: clang
Version: 12.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: simon at bl4ckb0ne.ca
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
This bug occurs when compiling the latest commit on master from
https://github.com/swaywm/wlroots
GCC 11.1.0 compiles the file without issue on the same machine.
[9/181] Compiling C object libwlroots.so.9.p/backend_drm_drm.c.o
FAILED: libwlroots.so.9.p/backend_drm_drm.c.o
clang -Ilibwlroots.so.9.p -I. -I.. -Iinclude -I../include -Iprotocol
-I../protocol -I/usr/include/libdrm -I/usr/include/pixman-1 -fcolor-diagnostics
-D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -g
-DWLR_USE_UNSTABLE -DWLR_LITTLE_ENDIAN=1 -DWLR_BIG_ENDIAN=0 -Wundef
-Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self
-Wstrict-prototypes -Wendif-labels -Wstrict-aliasing=2 -Woverflow
-Wmissing-prototypes -Walloca -Wno-missing-braces
-Wno-missing-field-initializers -Wno-unused-parameter -fmacro-prefix-map=../=
-DHAS_GBM_BO_GET_FD_FOR_PLANE=1 '-DICONDIR="/usr/local/share/icons"'
-DHAS_XCB_ERRORS=1 -fPIC -MD -MQ libwlroots.so.9.p/backend_drm_drm.c.o -MF
libwlroots.so.9.p/backend_drm_drm.c.o.d -o
libwlroots.so.9.p/backend_drm_drm.c.o -c ../backend/drm/drm.c
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang -Ilibwlroots.so.9.p -I. -I.. -Iinclude
-I../include -Iprotocol -I../protocol -I/usr/include/libdrm
-I/usr/include/pixman-1 -fcolor-diagnostics -D_FILE_OFFSET_BITS=64 -Wall
-Winvalid-pch -Wextra -Werror -std=c11 -g -DWLR_USE_UNSTABLE
-DWLR_LITTLE_ENDIAN=1 -DWLR_BIG_ENDIAN=0 -Wundef -Wmissing-include-dirs
-Wold-style-definition -Wpointer-arith -Winit-self -Wstrict-prototypes
-Wendif-labels -Wstrict-aliasing=2 -Woverflow -Wmissing-prototypes -Walloca
-Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-parameter
-fmacro-prefix-map=../= -DHAS_GBM_BO_GET_FD_FOR_PLANE=1
-DICONDIR=\"/usr/local/share/icons\" -DHAS_XCB_ERRORS=1 -fPIC -MD -MQ
libwlroots.so.9.p/backend_drm_drm.c.o -MF
libwlroots.so.9.p/backend_drm_drm.c.o.d -o
libwlroots.so.9.p/backend_drm_drm.c.o -c ../backend/drm/drm.c
1. <eof> parser at end of file
2. Code generation
#0 0x00007f3b13afc643 (/usr/bin/../lib/libLLVM-12.so+0xb48643)
#1 0x00007f3b13afa1b4 llvm::sys::CleanupOnSignal(unsigned long)
(/usr/bin/../lib/libLLVM-12.so+0xb461b4)
#2 0x00007f3b13a0b1e9 (/usr/bin/../lib/libLLVM-12.so+0xa571e9)
#3 0x00007f3b12c0eda0 __restore_rt (/usr/bin/../lib/libc.so.6+0x3cda0)
#4 0x00007f3b14497af0 llvm::DIE::getUnitDie() const
(/usr/bin/../lib/libLLVM-12.so+0x14e3af0)
#5 0x00007f3b144b8f3d llvm::DwarfDebug::finishEntityDefinitions()
(/usr/bin/../lib/libLLVM-12.so+0x1504f3d)
#6 0x00007f3b144cd456 llvm::DwarfDebug::finalizeModuleInfo()
(/usr/bin/../lib/libLLVM-12.so+0x1519456)
#7 0x00007f3b144d5130 llvm::DwarfDebug::endModule()
(/usr/bin/../lib/libLLVM-12.so+0x1521130)
#8 0x00007f3b14480026 llvm::AsmPrinter::doFinalization(llvm::Module&)
(/usr/bin/../lib/libLLVM-12.so+0x14cc026)
#9 0x00007f3b13c4d67d llvm::FPPassManager::doFinalization(llvm::Module&)
(/usr/bin/../lib/libLLVM-12.so+0xc9967d)
#10 0x00007f3b13c5a2b8 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/bin/../lib/libLLVM-12.so+0xca62b8)
#11 0x00007f3b1aae6173 (/usr/bin/../lib/libclang-cpp.so.12+0x1898173)
#12 0x00007f3b1aae8035 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/usr/bin/../lib/libclang-cpp.so.12+0x189a035)
#13 0x00007f3b1ae655e2 (/usr/bin/../lib/libclang-cpp.so.12+0x1c175e2)
#14 0x00007f3b19b85659 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/bin/../lib/libclang-cpp.so.12+0x937659)
#15 0x00007f3b1b5d0249 clang::FrontendAction::Execute()
(/usr/bin/../lib/libclang-cpp.so.12+0x2382249)
#16 0x00007f3b1b56754e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/bin/../lib/libclang-cpp.so.12+0x231954e)
#17 0x00007f3b1b650929
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/bin/../lib/libclang-cpp.so.12+0x2402929)
#18 0x000055e8e880b8de cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/bin/clang-12+0x128de)
#19 0x000055e8e8808ee8 (/usr/bin/clang-12+0xfee8)
#20 0x00007f3b1b238fd5 (/usr/bin/../lib/libclang-cpp.so.12+0x1feafd5)
#21 0x00007f3b13a0b2f3
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/usr/bin/../lib/libLLVM-12.so+0xa572f3)
#22 0x00007f3b1b239380 (/usr/bin/../lib/libclang-cpp.so.12+0x1feb380)
#23 0x00007f3b1b20d298
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/usr/bin/../lib/libclang-cpp.so.12+0x1fbf298)
#24 0x00007f3b1b20dd29
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/usr/bin/../lib/libclang-cpp.so.12+0x1fbfd29)
#25 0x00007f3b1b21dc5a
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/usr/bin/../lib/libclang-cpp.so.12+0x1fcfc5a)
#26 0x000055e8e8806c13 main (/usr/bin/clang-12+0xdc13)
#27 0x00007f3b12bf9b25 __libc_start_main (/usr/bin/../lib/libc.so.6+0x27b25)
#28 0x000055e8e880886e _start (/usr/bin/clang-12+0xf86e)
clang-12: error: clang frontend command failed with exit code 139 (use -v to
see invocation)
clang version 12.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-12: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/drm-058963.c
clang-12: note: diagnostic msg: /tmp/drm-058963.sh
clang-12: note: diagnostic msg:
********************
I have attached a tarball containing bot files.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210609/503f679b/attachment-0001.html>
More information about the llvm-bugs
mailing list