[llvm-bugs] [Bug 44230] New: Compiler crashes with Assertion `HasHungOffUses && "alloc must have hung off uses"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Dec 5 13:28:01 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=44230

            Bug ID: 44230
           Summary: Compiler crashes with Assertion `HasHungOffUses &&
                    "alloc must have hung off uses"' failed.
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: raffael at casagrande.ch
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Created attachment 22901
  --> https://bugs.llvm.org/attachment.cgi?id=22901&action=edit
error reproducing shell

clang-linux.compile.c++.without-pth
bin.v2/libs/system/build/clang-gnu-linux-9.0.1/release/link-static/threadapi-pthread/threading-multi/error_code.o
clang-10: /opt/llvm-project/llvm/lib/IR/User.cpp:40: void
llvm::User::allocHungoffUses(unsigned int, bool): Assertion `HasHungOffUses &&
"alloc must have hung off uses"' failed.
Stack dump:
0.      Program arguments: /opt/install/clang9/bin/clang-10 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name error_code.cpp
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer
-coverage-notes-file
/home/ubuntu/.hunter/_Base/4b018ec/0ec5f66/e0c39c3/Build/Boost/__chrono/Source/bin.v2/libs/system/build/clang-gnu-linux-9.0.1/release/link-static/threadapi-pthread/threading-multi/error_code.gcno
-resource-dir /opt/install/clang9/lib/clang/9.0.1 -D BOOST_ALL_NO_LIB=1 -D
BOOST_SYSTEM_STATIC_LINK=1 -D NDEBUG -I . -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/x86_64-linux-gnu/c++/7.4.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/x86_64-linux-gnu/c++/7.4.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/backward
-internal-isystem /usr/local/include -internal-isystem
/opt/install/clang9/lib/clang/9.0.1/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O3 -Wno-inline -Wall -fdeprecated-macro
-fdebug-compilation-dir
/home/ubuntu/.hunter/_Base/4b018ec/0ec5f66/e0c39c3/Build/Boost/__chrono/Source
-ferror-limit 19 -fmessage-length 0 -pthread -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops
-vectorize-slp -faddrsig -o
bin.v2/libs/system/build/clang-gnu-linux-9.0.1/release/link-static/threadapi-pthread/threading-multi/error_code.o
-x c++ libs/system/src/error_code.cpp
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'CallGraph Pass Manager' on module
'libs/system/src/error_code.cpp'.
4.      Running pass 'Memory SSA' on function
'@_ZN5boost6system15system_categoryEv'
 #0 0x00005625ec9f1fff PrintStackTraceSignalHandler(void*)
(/opt/install/clang9/bin/clang-10+0x3cadfff)
 #1 0x00005625ec8d4034 SignalHandler(int)
(/opt/install/clang9/bin/clang-10+0x3b90034)
 #2 0x00007f67430a5f20 (/lib/x86_64-linux-gnu/libc.so.6+0x3ef20)
 #3 0x00007f67430a5e97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #4 0x00007f67430a7801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #5 0x00007f674309739a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
 #6 0x00007f6743097412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
 #7 0x00005625ecd36e7a llvm::User::allocHungoffUses(unsigned int, bool)
(.constprop.12034) (/opt/install/clang9/bin/clang-10+0x3ff2e7a)
 #8 0x00005625e9ede8eb llvm::MemorySSA::createMemoryPhi(llvm::BasicBlock*)
(/opt/install/clang9/bin/clang-10+0x119a8eb)
 #9 0x00005625e9f4510f llvm::MemorySSA::buildMemorySSA(llvm::BatchAAResults&)
(/opt/install/clang9/bin/clang-10+0x120110f)
#10 0x00005625e9f47c42 llvm::MemorySSA::MemorySSA(llvm::Function&,
llvm::AAResults*, llvm::DominatorTree*)
(/opt/install/clang9/bin/clang-10+0x1203c42)
#11 0x00005625e9f47dd1
llvm::MemorySSAWrapperPass::runOnFunction(llvm::Function&)
(/opt/install/clang9/bin/clang-10+0x1203dd1)
#12 0x00005625ea9f3aa0 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/opt/install/clang9/bin/clang-10+0x1cafaa0)
#13 0x00005625e9abf4bb (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&)
(/opt/install/clang9/bin/clang-10+0xd7b4bb)
#14 0x00005625ea9f4b2f llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/opt/install/clang9/bin/clang-10+0x1cb0b2f)
#15 0x00005625eaf8cf3f 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> >)
(/opt/install/clang9/bin/clang-10+0x2248f3f)
#16 0x00005625eb883b79
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/opt/install/clang9/bin/clang-10+0x2b3fb79)
#17 0x00005625ebd3e9f2 clang::ParseAST(clang::Sema&, bool, bool)
(/opt/install/clang9/bin/clang-10+0x2ffa9f2)
#18 0x00005625eb8441e8 clang::CodeGenAction::ExecuteAction()
(/opt/install/clang9/bin/clang-10+0x2b001e8)
#19 0x00005625eb2605e9 clang::FrontendAction::Execute()
(/opt/install/clang9/bin/clang-10+0x251c5e9)
#20 0x00005625eb2f0491
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/opt/install/clang9/bin/clang-10+0x25ac491)
#21 0x00005625ec55a87c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/opt/install/clang9/bin/clang-10+0x381687c)
#22 0x00005625eb6fbb73 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/opt/install/clang9/bin/clang-10+0x29b7b73)
#23 0x00005625e99e9289 main (/opt/install/clang9/bin/clang-10+0xca5289)
#24 0x00007f6743088b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#25 0x00005625e9a2919a _start (/opt/install/clang9/bin/clang-10+0xce519a)
clang-10: error: unable to execute command: Aborted (core dumped)
clang-10: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 9.0.1 (https://github.com/llvm/llvm-project.git
432bf48c08da748e2542cf40e3ab9aee53a744b0)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/install/clang9/bin
clang-10: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang-10: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-10: note: diagnostic msg: /tmp/error_code-7b0f24.cpp
clang-10: note: diagnostic msg: /tmp/error_code-7b0f24.sh
clang-10: note: diagnostic msg:

********************

-- 
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/20191205/19e97e21/attachment.html>


More information about the llvm-bugs mailing list