[llvm-bugs] [Bug 42003] New: Crash in cc1_main with -flto
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri May 24 02:03:28 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42003
Bug ID: 42003
Summary: Crash in cc1_main with -flto
Product: new-bugs
Version: 8.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: dilyan.palauzov at aegee.org
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
Created attachment 22007
--> https://bugs.llvm.org/attachment.cgi?id=22007&action=edit
Test case
I call:
CC=clang CXX=clang++ CFLAGS=-flto -O3 CXXFLAGS=-flto -O3 LDFLAGS=-fuse-ld=bfd
-flto -Wl,-O1 ./configure
with llvm 8.0. I prints:
checking whether we are cross compiling... configure: error: in
`/git/aegee-milter':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
config.log contains:
configure:3685: checking whether we are cross compiling
configure:3693: clang -o conftest -flto -O3 -fuse-ld=bfd -flto -Wl,-O1
conftest.c >&5
clang-8: /src/llvm/llvm-8.0.0.src/lib/IR/User.cpp:41: void
llvm::User::allocHungoffUses(unsigned int, bool): Assertion `HasHungOffUses &&
"alloc m
ust have hung off uses"' failed.
Stack dump:
0. Program arguments: /usr/local/bin/clang-8 -cc1 -triple
x86_64-unknown-linux-gnu -emit-llvm-bc -flto -flto-unit -disable-free
-main-file-na
me conftest.c -mrelocation-model static -mthread-model posix -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -ta
rget-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb
-momit-leaf-frame-pointer -resource-dir /usr/local/lib/clang/8.0.0
-internal-isystem /usr/
local/include -internal-isystem /usr/local/lib/clang/8.0.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -
fdebug-compilation-dir /git/aegee-milter -ferror-limit 19 -fmessage-length 0
-fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops -vector
ize-slp -o /tmp/conftest-950cda.o -x c conftest.c -faddrsig
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'conftest.c'.
4. Running pass 'Memory SSA' on function '@main'
#0 0x00000000027d850f PrintStackTraceSignalHandler(void*)
(/usr/local/bin/clang-8+0x27d850f)
#1 0x00000000026cbd94 SignalHandler(int) (/usr/local/bin/clang-8+0x26cbd94)
#2 0x00007fdacc96a300 __restore_rt (/lib64/libpthread.so.0+0x12300)
#3 0x00007fdacb6dcbea __GI_raise
/src/glibc-2.29/signal/../sysdeps/unix/sysv/linux/internal-signals.h:84:10
#4 0x00007fdacb6c8524 __GI_abort /src/glibc-2.29/stdlib/abort.c:81:7
#5 0x00007fdacb6c840f get_sysdep_segment_value
/src/glibc-2.29/intl/loadmsgcat.c:509:8
#6 0x00007fdacb6c840f _nl_load_domain.cold.0
/src/glibc-2.29/intl/loadmsgcat.c:970:34
#7 0x00007fdacb6d5582 (/lib64/libc.so.6+0x2f582)
#8 0x000000000094e168 llvm::User::allocHungoffUses(unsigned int, bool)
(.constprop.14058) (/usr/local/bin/clang-8+0x94e168)
#9 0x0000000000e0d77b llvm::MemorySSA::createMemoryPhi(llvm::BasicBlock*)
(/usr/local/bin/clang-8+0xe0d77b)
#10 0x0000000000e16c1f
llvm::MemorySSA::placePHINodes(llvm::SmallPtrSetImpl<llvm::BasicBlock*> const&)
(/usr/local/bin/clang-8+0xe16c1f)
#11 0x0000000000e79b85 llvm::MemorySSA::buildMemorySSA()
(/usr/local/bin/clang-8+0xe79b85)
#12 0x0000000000e7a267
llvm::MemorySSAWrapperPass::runOnFunction(llvm::Function&)
(/usr/local/bin/clang-8+0xe7a267)
#13 0x0000000002b08260 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/local/bin/clang-8+0x2b08260)
#14 0x000000000309e8a0 (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&)
(/usr/local/bin/clang-8+0x309e8a0)
#15 0x0000000002b07715 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/bin/clang-8+0x2b07715)
#16 0x000000000266fe61 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_s
tream, std::default_delete<llvm::raw_pwrite_stream> >)
(/usr/local/bin/clang-8+0x266fe61)
#17 0x0000000001d090b1
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/bin/clang-8+0x1d090b1)
#18 0x00000000018ab9a2 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/bin/clang-8+0x18ab9a2)
#19 0x0000000001d269f8 clang::CodeGenAction::ExecuteAction()
(/usr/local/bin/clang-8+0x1d269f8)
#20 0x000000000212dab6 clang::FrontendAction::Execute()
(/usr/local/bin/clang-8+0x212dab6)
#21 0x00000000021e1d5e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/bin/clang-8+0x21e1d5e)
#22 0x00000000021e28d3
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/bin/clang-8+0x21e28d3)
#23 0x0000000003c4c2b8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/bin/clang-8+0x3c4c2b8)
#24 0x00000000008a94f9 main (/usr/local/bin/clang-8+0x8a94f9)
#25 0x00007fdacb6c9b5b __libc_start_main
/src/glibc-2.29/csu/../csu/libc-start.c:308:16
#26 0x00000000008a9fea _start
/src/glibc-2.29/csu/../sysdeps/x86_64/start.S:122:0
clang-8: error: unable to execute command: Aborted (core dumped)
clang-8: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 8.0.0 (tags/RELEASE_800/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-8: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and asso
ciated run script.
clang-8: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-8: note: diagnostic msg: /tmp/conftest-86feae.c
clang-8: note: diagnostic msg: /tmp/conftest-86feae.sh
clang-8: note: diagnostic msg:
********************
configure:3697: $? = 254
configure:3704: ./conftest
./configure: line 3706: ./conftest: No such file or directory
configure:3708: $? = 127
configure:3715: error: in `/git/aegee-milter':
configure:3717: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
/tmp/conftest-86feae.c and /tmp/conftest-86feae.sh are attached.
--
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/20190524/5f371ef5/attachment.html>
More information about the llvm-bugs
mailing list