LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 44763 - Bitcode tests crash in Function Pass Manager
Summary: Bitcode tests crash in Function Pass Manager
Status: RESOLVED DUPLICATE of bug 44896
Alias: None
Product: Test Suite
Classification: Unclassified
Component: Programs Tests (show other bugs)
Version: 10.0
Hardware: PC All
: P release blocker
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks: release-10.0.0
  Show dependency tree
 
Reported: 2020-02-03 10:59 PST by Dimitry Andric
Modified: 2020-02-25 06:54 PST (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric 2020-02-03 10:59:30 PST
During test runs of 10.0.0 rc1, I could not compile the test-suite at all, as the 10.0.0 rc1 clang executable consistently crashes on all of the Bitcode source:

$ gmake
Scanning dependencies of target timeit-target
[  0%] Building C object tools/CMakeFiles/timeit-target.dir/timeit.c.o
[  0%] Linking C executable timeit-target
[  0%] Built target timeit-target
Scanning dependencies of target fpcmp-target
[  0%] Building C object tools/CMakeFiles/fpcmp-target.dir/fpcmp.c.o
[  0%] Linking C executable fpcmp-target
[  0%] Built target fpcmp-target
Scanning dependencies of target build-timeit
[  0%] [TEST_SUITE_HOST_CC] Compiling host source timeit.c
[  0%] [TEST_SUITE_HOST_CC] Linking host executable timeit
[  0%] Built target build-timeit
Scanning dependencies of target build-HashProgramOutput.sh
[  0%] Generating HashProgramOutput.sh
[  0%] Built target build-HashProgramOutput.sh
Scanning dependencies of target build-fpcmp
[  0%] [TEST_SUITE_HOST_CC] Compiling host source fpcmp.c
[  0%] [TEST_SUITE_HOST_CC] Linking host executable fpcmp
[  0%] Built target build-fpcmp
Scanning dependencies of target halide_local_laplacian
[  0%] Building CXX object Bitcode/Benchmarks/Halide/local_laplacian/CMakeFiles/halide_local_laplacian.dir/driver.cpp.o
[  0%] Building CXX object Bitcode/Benchmarks/Halide/local_laplacian/CMakeFiles/halide_local_laplacian.dir/__/common/x86_halide_runtime.bc.o
Stack dump:
0.	Program arguments: /home/dim/llvm/10.0.0/dist/clang+llvm-10.0.0-rc1-amd64-unknown-freebsd11/bin/clang++ -cc1 -triple x86_64-unknown-freebsd11.3 -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name x86_halide_runtime.bc -mrelocation-model static -mthread-model posix -mframe-pointer=all -fno-rounding-math -masm-verbose -mconstructor-aliases -munwind-tables -fno-use-init-array -target-cpu x86-64 -dwarf-column-info -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir /home/dim/llvm/10.0.0/dist/clang+llvm-10.0.0-rc1-amd64-unknown-freebsd11/lib/clang/10.0.0 -O3 -Werror=date-time -w -std=c++11 -fdebug-compilation-dir /home/dim/llvm/10.0.0/build/Bitcode/Benchmarks/Halide/local_laplacian -ferror-limit 19 -fmessage-length 200 -fgnuc-version=4.2.1 -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -faddrsig -o CMakeFiles/halide_local_laplacian.dir/__/common/x86_halide_runtime.bc.o -x ir /home/dim/llvm/10.0.0/llvm-test-suite/Bitcode/Benchmarks/Halide/common/x86_halide_runtime.bc
1.	Per-module optimization passes
2.	Running pass 'Function Pass Manager' on module '/home/dim/llvm/10.0.0/llvm-test-suite/Bitcode/Benchmarks/Halide/common/x86_halide_runtime.bc'.
3.	Running pass 'Function Alias Analysis Results' on function '@halide_set_custom_malloc'
#0 0x0000000003454b78 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (+0x3454b78)
#1 0x0000000003452bc8 llvm::sys::RunSignalHandlers() (clang++: error: unable to execute command: Segmentation fault (core dumped)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 10.0.0 (dim@tensor.andric.com:git/home-dim.git 7fbc6358ad2b7eb9bac5260ed8e4e206929b7e7b)
Target: x86_64-unknown-freebsd11.3
Thread model: posix
InstalledDir: /home/dim/llvm/10.0.0/dist/clang+llvm-10.0.0-rc1-amd64-unknown-freebsd11/bin
clang++: 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++: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
gmake[2]: *** [Bitcode/Benchmarks/Halide/local_laplacian/CMakeFiles/halide_local_laplacian.dir/build.make:87: Bitcode/Benchmarks/Halide/local_laplacian/CMakeFiles/halide_local_laplacian.dir/__/common/x86_halide_runtime.bc.o] Error 254
gmake[1]: *** [CMakeFiles/Makefile2:2781: Bitcode/Benchmarks/Halide/local_laplacian/CMakeFiles/halide_local_laplacian.dir/all] Error 2
gmake: *** [Makefile:130: all] Error 2

Gdb backtrace (unforunately no symbols are available in the test-release.sh builds):

Starting program: /home/dim/llvm/10.0.0/dist/clang+llvm-10.0.0-rc1-amd64-unknown-freebsd11/bin/clang++ -cc1 -triple x86_64-unknown-freebsd11.3 -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name x86_halide_runtime.bc -mrelocation-model static -mthread-model posix -mframe-pointer=all -fno-rounding-math -masm-verbose -mconstructor-aliases -munwind-tables -fno-use-init-array -target-cpu x86-64 -dwarf-column-info -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir /home/dim/llvm/10.0.0/dist/clang+llvm-10.0.0-rc1-amd64-unknown-freebsd11/lib/clang/10.0.0 -O3 -Werror=date-time -w -std=c++11 -fdebug-compilation-dir /home/dim/llvm/10.0.0/build/Bitcode/Benchmarks/Halide/local_laplacian -ferror-limit 19 -fmessage-length 200 -fgnuc-version=4.2.1 -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -faddrsig -o CMakeFiles/halide_local_laplacian.dir/__/common/x86_halide_runtime.bc.o -x ir /home/dim/llvm/10.0.0/llvm-test-suite/Bitcode/Benchmarks/Halide/common/x86_halide_runtime.bc

Program received signal SIGSEGV, Segmentation fault.
0x000000010000000f in ?? ()
(gdb) bt
#0  0x000000010000000f in ?? ()
#1  0x00000000028ca9c0 in llvm::AAResultsWrapperPass::runOnFunction(llvm::Function&) ()
#2  0x0000000002e8edc0 in llvm::FPPassManager::runOnFunction(llvm::Function&) ()
#3  0x0000000002e8f1d3 in llvm::FPPassManager::runOnModule(llvm::Module&) ()
#4  0x0000000002e8f6a9 in llvm::legacy::PassManagerImpl::run(llvm::Module&) ()
#5  0x00000000035de7dc in clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream> >) ()
#6  0x0000000003c17e67 in clang::CodeGenAction::ExecuteAction() ()
#7  0x0000000003b7abca in clang::FrontendAction::Execute() ()
#8  0x0000000003aea761 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) ()
#9  0x0000000003c12905 in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) ()
#10 0x0000000001cbaf0e in cc1_main(llvm::ArrayRef<char const*>, char const*, void*) ()
#11 0x0000000001cb8f65 in ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) ()
#12 0x0000000001cb8cf4 in main ()
Comment 1 Dimitry Andric 2020-02-03 12:21:14 PST
Output from debug build of clang 10.0.0rc1:

Starting program: /home/dim/llvm/10.0.0/build-clang/bin/clang -cc1 -triple x86_64-unknown-freebsd11.3 -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-name x86_halide_runtime.bc -mrelocation-model static -mthread-model posix -mframe-pointer=all -fno-rounding-math -masm-verbose -mconstructor-aliases -munwind-tables -fno-use-init-array -target-cpu x86-64 -dwarf-column-info -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir /home/dim/llvm/10.0.0/dist/clang+llvm-10.0.0-rc1-amd64-unknown-freebsd11/lib/clang/10.0.0 -O3 -Werror=date-time -w -std=c++11 -fdebug-compilation-dir /home/dim/llvm/10.0.0/build/Bitcode/Benchmarks/Halide/local_laplacian -ferror-limit 19 -fmessage-length 203 -fgnuc-version=4.2.1 -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -faddrsig -o CMakeFiles/halide_local_laplacian.dir/__/common/x86_halide_runtime.bc.o -x ir /home/dim/llvm/10.0.0/llvm-test-suite/Bitcode/Benchmarks/Halide/common/x86_halide_runtime.bc
Value still in symbol table! Type = 'i8*' Name = 'user_context'
Value still in symbol table! Type = 'void (i8*, i8*)*' Name = 'fn'
Value still in symbol table! Type = 'i8**' Name = 'object'
Value still in symbol table! Type = 'i1' Name = 'should_call'
Assertion failed: (vmap.empty() && "Values remain in symbol table!"), function ~ValueSymbolTable, file /home/dim/llvm/10.0.0/llvm-project/llvm/lib/IR/ValueSymbolTable.cpp, line 39.

Program received signal SIGABRT, Aborted.
0x00000008079e2b4a in thr_kill () from /lib/libc.so.7
(gdb) bt
#0  0x00000008079e2b4a in thr_kill () from /lib/libc.so.7
#1  0x00000008079e2b14 in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52
#2  0x00000008079e2a89 in abort () at /usr/src/lib/libc/stdlib/abort.c:65
#3  0x0000000807a5e291 in __assert (func=<optimized out>, file=<optimized out>, line=<optimized out>, failedexpr=<optimized out>) at /usr/src/lib/libc/gen/assert.c:51
#4  0x00000000036a6f34 in llvm::ValueSymbolTable::~ValueSymbolTable (this=0x807ebdd70) at /home/dim/llvm/10.0.0/llvm-project/llvm/lib/IR/ValueSymbolTable.cpp:39
#5  0x000000000359a1eb in std::__1::default_delete<llvm::ValueSymbolTable>::operator() (this=0x807f7ccf0, __ptr=0x807ebdd70) at /usr/include/c++/v1/memory:2339
#6  0x000000000359a16f in std::__1::unique_ptr<llvm::ValueSymbolTable, std::__1::default_delete<llvm::ValueSymbolTable> >::reset (this=0x807f7ccf0, __p=0x0) at /usr/include/c++/v1/memory:2652
#7  0x00000000035972a9 in std::__1::unique_ptr<llvm::ValueSymbolTable, std::__1::default_delete<llvm::ValueSymbolTable> >::~unique_ptr (this=0x807f7ccf0) at /usr/include/c++/v1/memory:2606
#8  0x000000000358ec77 in llvm::Function::~Function (this=0x807f7cc88) at /home/dim/llvm/10.0.0/llvm-project/llvm/lib/IR/Function.cpp:298
#9  0x000000000359a0f7 in llvm::ilist_alloc_traits<llvm::Function>::deleteNode (V=0x807f7cc88) at /home/dim/llvm/10.0.0/llvm-project/llvm/include/llvm/ADT/ilist.h:41
#10 0x0000000003597015 in llvm::iplist_impl<llvm::simple_ilist<llvm::Function>, llvm::SymbolTableListTraits<llvm::Function> >::erase (this=0x807f1c018, where=...) at /home/dim/llvm/10.0.0/llvm-project/llvm/include/llvm/ADT/ilist.h:266
#11 0x0000000003582719 in llvm::Function::eraseFromParent (this=0x807f7cc88) at /home/dim/llvm/10.0.0/llvm-project/llvm/lib/IR/Function.cpp:245
#12 0x000000000359c04d in llvm::GlobalValue::eraseFromParent (this=0x807f7cc88) at /home/dim/llvm/10.0.0/llvm-project/llvm/include/llvm/IR/Value.def:62
#13 0x000000000385832a in deleteIfDead (GV=..., NotDiscardableComdats=...) at /home/dim/llvm/10.0.0/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp:1793
#14 0x0000000003857213 in OptimizeFunctions(llvm::Module&, llvm::function_ref<llvm::TargetLibraryInfo& (llvm::Function&)>, llvm::function_ref<llvm::TargetTransformInfo& (llvm::Function&)>, llvm::function_ref<llvm::BlockFrequencyInfo& (llvm::Function&)>, llvm::function_ref<llvm::DominatorTree& (llvm::Function&)>, llvm::SmallPtrSetImpl<llvm::Comdat const*>&) (M=..., GetTLI=..., GetTTI=..., GetBFI=..., LookupDomTree=..., NotDiscardableComdats=...) at /home/dim/llvm/10.0.0/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp:2288
#15 0x0000000003856bbd in optimizeGlobalsInModule(llvm::Module&, llvm::DataLayout const&, llvm::function_ref<llvm::TargetLibraryInfo& (llvm::Function&)>, llvm::function_ref<llvm::TargetTransformInfo& (llvm::Function&)>, llvm::function_ref<llvm::BlockFrequencyInfo& (llvm::Function&)>, llvm::function_ref<llvm::DominatorTree& (llvm::Function&)>) (M=..., DL=..., GetTLI=..., GetTTI=..., GetBFI=..., LookupDomTree=...) at /home/dim/llvm/10.0.0/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp:2955
#16 0x0000000003863b03 in (anonymous namespace)::GlobalOptLegacyPass::runOnModule (this=0x8082a4980, M=...) at /home/dim/llvm/10.0.0/llvm-project/llvm/lib/Transforms/IPO/GlobalOpt.cpp:3036
#17 0x0000000003601598 in (anonymous namespace)::MPPassManager::runOnModule (this=0x807eda200, M=...) at /home/dim/llvm/10.0.0/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1582
#18 0x00000000036010e5 in llvm::legacy::PassManagerImpl::run (this=0x807ee6a00, M=...) at /home/dim/llvm/10.0.0/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1694
#19 0x0000000003601b21 in llvm::legacy::PassManager::run (this=0x7fffffffad48, M=...) at /home/dim/llvm/10.0.0/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1725
#20 0x0000000004328669 in (anonymous namespace)::EmitAssemblyHelper::EmitAssembly (this=0x7fffffffb040, Action=clang::Backend_EmitObj, OS=...) at /home/dim/llvm/10.0.0/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:906
#21 0x00000000043249eb in clang::EmitBackendOutput (Diags=..., HeaderOpts=..., CGOpts=..., TOpts=..., LOpts=..., TDesc=..., M=0x807f1c000, Action=clang::Backend_EmitObj, OS=...) at /home/dim/llvm/10.0.0/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1550
#22 0x0000000005043f55 in clang::CodeGenAction::ExecuteAction (this=0x807e24300) at /home/dim/llvm/10.0.0/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:1165
#23 0x0000000004ea07e1 in clang::FrontendAction::Execute (this=0x807e24300) at /home/dim/llvm/10.0.0/llvm-project/clang/lib/Frontend/FrontendAction.cpp:936
#24 0x0000000004dcc173 in clang::CompilerInstance::ExecuteAction (this=0x807edb140, Act=...) at /home/dim/llvm/10.0.0/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:965
#25 0x0000000005035233 in clang::ExecuteCompilerInvocation (Clang=0x807edb140) at /home/dim/llvm/10.0.0/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:290
#26 0x000000000257e5d4 in cc1_main (Argv=..., Argv0=0x7fffffffe3d0 "/home/dim/llvm/10.0.0/build-clang/bin/clang", MainAddr=0x2570260 <GetExecutablePath(char const*, bool)>) at /home/dim/llvm/10.0.0/llvm-project/clang/tools/driver/cc1_main.cpp:239
#27 0x0000000002571792 in ExecuteCC1Tool (ArgV=...) at /home/dim/llvm/10.0.0/llvm-project/clang/tools/driver/driver.cpp:328
#28 0x00000000025709dd in main (argc_=49, argv_=0x7fffffffdf80) at /home/dim/llvm/10.0.0/llvm-project/clang/tools/driver/driver.cpp:402
Comment 2 Hans Wennborg 2020-02-25 06:54:25 PST
I think this is Bug 44896

*** This bug has been marked as a duplicate of bug 44896 ***