[llvm-bugs] [Bug 48865] clang crashes at -O3 on x86_64-linux-gnu: Assertion `IDom && "Block must have a valid IDom."' failed
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Jan 30 09:08:48 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=48865
Zhendong Su <zhendong.su at inf.ethz.ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #4 from Zhendong Su <zhendong.su at inf.ethz.ch> ---
> Please re-open the issue with a new reproducer if the crash still happens.
It seems a very similar snippet still triggers the same crash:
[511] % clangtk -v
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
5c1cea6f406366b85f3c200a1c48f713da4450ba)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/suz-local/opfuzz/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
[512] %
[512] % clangtk -O2 -c -w small.c
[513] %
[513] % clangtk -O3 -c -w small.c
clangtk:
/local/suz-local/software/clangbuild/llvm-project/llvm/lib/Analysis/MemorySSAUpdater.cpp:1154:
void
llvm::MemorySSAUpdater::applyInsertUpdates(llvm::ArrayRef<llvm::cfg::Update<llvm::BasicBlock*>
>, llvm::DominatorTree&, const llvm::GraphDiff<llvm::BasicBlock*, false>*):
Assertion `IDom && "Block must have a valid IDom."' failed.
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: clangtk -I/usr/local/include/csmith -O3 -c -w
small.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'small.c'.
4. Running pass 'Loop Pass Manager' on function '@f'
5. Running pass 'Unswitch loops' on basic block '%while.body'
#0 0x0000557e11a09d2c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x34add2c)
#1 0x0000557e11a079f4 llvm::sys::RunSignalHandlers()
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x34ab9f4)
#2 0x0000557e11a07c75 llvm::sys::CleanupOnSignal(unsigned long)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x34abc75)
#3 0x0000557e11968448 CrashRecoverySignalHandler(int)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x340c448)
#4 0x00007f5f03d9c8a0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x128a0)
#5 0x00007f5f02a4df47 raise
/build/glibc-2ORdQG/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#6 0x00007f5f02a4f8b1 abort /build/glibc-2ORdQG/glibc-2.27/stdlib/abort.c:81:0
#7 0x00007f5f02a3f42a __assert_fail_base
/build/glibc-2ORdQG/glibc-2.27/assert/assert.c:89:0
#8 0x00007f5f02a3f4a2 (/lib/x86_64-linux-gnu/libc.so.6+0x304a2)
#9 0x0000557e10b3e7a2
llvm::MemorySSAUpdater::applyInsertUpdates(llvm::ArrayRef<llvm::cfg::Update<llvm::BasicBlock*>
>, llvm::DominatorTree&, llvm::GraphDiff<llvm::BasicBlock*, false> const*)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x25e27a2)
#10 0x0000557e10b3eaf2
llvm::MemorySSAUpdater::applyInsertUpdates(llvm::ArrayRef<llvm::cfg::Update<llvm::BasicBlock*>
>, llvm::DominatorTree&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x25e2af2)
#11 0x0000557e10b3ec44
llvm::MemorySSAUpdater::updateExitBlocksForClonedLoop(llvm::ArrayRef<llvm::BasicBlock*>,
llvm::ValueMap<llvm::Value const*, llvm::WeakTrackingVH,
llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex<false> > >
const&, llvm::DominatorTree&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x25e2c44)
#12 0x0000557e11830ae3 (anonymous
namespace)::LoopUnswitch::unswitchNontrivialCondition(llvm::Value*,
llvm::Constant*, llvm::Loop*, llvm::Instruction*,
llvm::ArrayRef<llvm::Instruction*>)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x32d4ae3)
#13 0x0000557e118311ec (anonymous
namespace)::LoopUnswitch::unswitchIfProfitable(llvm::Value*, llvm::Constant*,
llvm::Instruction*, llvm::ArrayRef<llvm::Instruction*>)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x32d51ec)
#14 0x0000557e118321c2 (anonymous
namespace)::LoopUnswitch::processCurrentLoop()
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x32d61c2)
#15 0x0000557e1183353f (anonymous
namespace)::LoopUnswitch::runOnLoop(llvm::Loop*, llvm::LPPassManager&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x32d753f)
#16 0x0000557e10af9b53 llvm::LPPassManager::runOnFunction(llvm::Function&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x259db53)
#17 0x0000557e11223408 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x2cc7408)
#18 0x0000557e10a18f24 (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x24bcf24)
#19 0x0000557e11222c86 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x2cc6c86)
#20 0x0000557e11cbf90c (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x376390c)
#21 0x0000557e11cc15b5 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> >)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x37655b5)
#22 0x0000557e128f7936
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x439b936)
#23 0x0000557e13714d89 clang::ParseAST(clang::Sema&, bool, bool)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x51b8d89)
#24 0x0000557e128f7ae0 clang::CodeGenAction::ExecuteAction()
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x439bae0)
#25 0x0000557e1229d1f1 clang::FrontendAction::Execute()
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x3d411f1)
#26 0x0000557e12241bc1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x3ce5bc1)
#27 0x0000557e1236885a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x3e0c85a)
#28 0x0000557e0f767a5c cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/local/suz-local/software/local/clang-trunk/bin/clang-13+0x120ba5c)
#29 0x0000557e0f7631d9 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x12071d9)
#30 0x0000557e12108b15 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)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x3bacb15)
#31 0x0000557e11968523
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x340c523)
#32 0x0000557e121096d4
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const (.part.170)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x3bad6d4)
#33 0x0000557e120e249a
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x3b8649a)
#34 0x0000557e120e313f
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x3b8713f)
#35 0x0000557e120ebafa
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x3b8fafa)
#36 0x0000557e0f68d637 main
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x1131637)
#37 0x00007f5f02a30b97 __libc_start_main
/build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:344:0
#38 0x0000557e0f762d3a _start
(/local/suz-local/software/local/clang-trunk/bin/clang-13+0x1206d3a)
clang-13: error: clang frontend command failed with exit code 134 (use -v to
see invocation)
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
5c1cea6f406366b85f3c200a1c48f713da4450ba)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/suz-local/opfuzz/bin
clang-13: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-13: note: diagnostic msg: /tmp/small-f48234.c
clang-13: note: diagnostic msg: /tmp/small-f48234.sh
clang-13: note: diagnostic msg:
********************
[514] %
[514] % cat small.c
extern void g (void);
int a, c, d, *e = &d;
short b;
void f () {
a = 0;
while (a < 1) {
b--;
if (*e)
continue;
for (; c; c = 0)
;
for (d = 0; d; g())
;
}
}
--
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/20210130/673d0634/attachment.html>
More information about the llvm-bugs
mailing list