You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ICE on valid code with -O1: llvm::FixedVectorType* llvm::FixedVectorType::get(llvm::Type*, unsigned int): Assertion `NumElts > 0 && "#Elements of a VectorType must be greater than 0"' failed.
#50254
Closed
chengniansun opened this issue
Jun 27, 2021
· 4 comments
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/mutant-c879ed.c
clang-13: note: diagnostic msg: /tmp/mutant-c879ed.sh
clang-13: note: diagnostic msg:
The text was updated successfully, but these errors were encountered:
Extended Description
$ clang-trunk -v
clang version 13.0.0 (https:/llvm/llvm-project.git 699d474)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/cnsun/usr/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@MX32
Selected multilib: .;@m64
$ cat mutant.c
typedef
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
struct {
long
dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} dat[2]
} gsl_complex_long_double;
gsl_vector_complex_long_double_set_zero() {
gsl_complex_long_double zero = {
}
;
}
$ clang-trunk -O1 -w mutant.c
clang-13: /tmp/tmp.MZZAoX1zOr-clang-builder/llvm-project/llvm/lib/IR/Type.cpp:651: static llvm::FixedVectorType* llvm::FixedVectorType::get(llvm::Type*, unsigned int): Assertion `NumElts > 0 && "#Elements of a VectorType must be greater than 0"' 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: /scratch/software/clang-trunk/bin/clang-13 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj --mrelax-relocations -disable-free -main-file-name mutant.c -mrelocation-model static -mframe-pointer=none -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/scratch/cnsun/workspace/perses-fuzzer/default_c_finding_folder/crash_20210626_082532_060d/delta/perses_result -resource-dir /scratch/software/clang-trunk/lib/clang/13.0.0 -c-isystem . -c-isystem /usr/local/include/cmsith -internal-isystem /scratch/software/clang-trunk/lib/clang/13.0.0/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O1 -w -fdebug-compilation-dir=/scratch/cnsun/workspace/perses-fuzzer/default_c_finding_folder/crash_20210626_082532_060d/delta/perses_result -ferror-limit 19 -fgnuc-version=4.2.1 -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/mutant-ff529f.o -x c mutant.c
#0 0x000056119b9ad684 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
#1 0x000056119b9aae3e SignalHandler(int) Signals.cpp:0:0
#2 0x00007f09552773c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
#3 0x00007f0954d1618b raise /build/glibc-ZN95T4/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#4 0x00007f0954cf5859 abort /build/glibc-ZN95T4/glibc-2.31/stdlib/abort.c:81:7
#5 0x00007f0954cf5729 get_sysdep_segment_value /build/glibc-ZN95T4/glibc-2.31/intl/loadmsgcat.c:509:8
#6 0x00007f0954cf5729 _nl_load_domain /build/glibc-ZN95T4/glibc-2.31/intl/loadmsgcat.c:970:34
#7 0x00007f0954d06f36 (/lib/x86_64-linux-gnu/libc.so.6+0x36f36)
#8 0x000056119b0fe11c llvm::FixedVectorType::get(llvm::Type*, unsigned int) (/scratch/software/clang-trunk/bin/clang-13+0x30ae11c)
#9 0x000056119b8358ba llvm::sroa::AllocaSliceRewriter::visitMemSetInst(llvm::MemSetInst&) (/scratch/software/clang-trunk/bin/clang-13+0x37e58ba)
#10 0x000056119b83ecc4 llvm::sroa::AllocaSliceRewriter::visit((anonymous namespace)::Slice const*) SROA.cpp:0:0
#11 0x000056119b84373f llvm::SROA::rewritePartition(llvm::AllocaInst&, llvm::sroa::AllocaSlices&, llvm::sroa::Partition&) (/scratch/software/clang-trunk/bin/clang-13+0x37f373f)
#12 0x000056119b84525a llvm::SROA::splitAlloca(llvm::AllocaInst&, llvm::sroa::AllocaSlices&) (.part.0) SROA.cpp:0:0
#13 0x000056119b847847 llvm::SROA::runOnAlloca(llvm::AllocaInst&) (/scratch/software/clang-trunk/bin/clang-13+0x37f7847)
#14 0x000056119b84960d llvm::SROA::runImpl(llvm::Function&, llvm::DominatorTree&, llvm::AssumptionCache&) (/scratch/software/clang-trunk/bin/clang-13+0x37f960d)
#15 0x000056119b84a6d9 llvm::SROA::run(llvm::Function&, llvm::AnalysisManagerllvm::Function&) (/scratch/software/clang-trunk/bin/clang-13+0x37fa6d9)
#16 0x000056119ccd11a6 llvm::detail::PassModel<llvm::Function, llvm::SROA, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Function >::run(llvm::Function&, llvm::AnalysisManagerllvm::Function&) (/scratch/software/clang-trunk/bin/clang-13+0x4c811a6)
#17 0x000056119b0e9816 llvm::PassManager<llvm::Function, llvm::AnalysisManagerllvm::Function >::run(llvm::Function&, llvm::AnalysisManagerllvm::Function&) (/scratch/software/clang-trunk/bin/clang-13+0x3099816)
#18 0x000056119957c4a6 llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManagerllvm::Function >, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Function >::run(llvm::Function&, llvm::AnalysisManagerllvm::Function&) (/scratch/software/clang-trunk/bin/clang-13+0x152c4a6)
#19 0x000056119b0e8339 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) (/scratch/software/clang-trunk/bin/clang-13+0x3098339)
#20 0x000056119957cd16 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Module >::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) (/scratch/software/clang-trunk/bin/clang-13+0x152cd16)
#21 0x000056119b0e5c1f llvm::PassManager<llvm::Module, llvm::AnalysisManagerllvm::Module >::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) (/scratch/software/clang-trunk/bin/clang-13+0x3095c1f)
#22 0x000056119bcdec6d (anonymous namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) BackendUtil.cpp:0:0
#23 0x000056119bce1eed clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) (/scratch/software/clang-trunk/bin/clang-13+0x3c91eed)
#24 0x000056119cb0b6cf clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/scratch/software/clang-trunk/bin/clang-13+0x4abb6cf)
#25 0x000056119dbc2d89 clang::ParseAST(clang::Sema&, bool, bool) (/scratch/software/clang-trunk/bin/clang-13+0x5b72d89)
#26 0x000056119cb0a218 clang::CodeGenAction::ExecuteAction() (/scratch/software/clang-trunk/bin/clang-13+0x4aba218)
#27 0x000056119c3b9a79 clang::FrontendAction::Execute() (/scratch/software/clang-trunk/bin/clang-13+0x4369a79)
#28 0x000056119c34ccc6 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/scratch/software/clang-trunk/bin/clang-13+0x42fccc6)
#29 0x000056119c4979c0 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/scratch/software/clang-trunk/bin/clang-13+0x44479c0)
#30 0x00005611992b5696 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/scratch/software/clang-trunk/bin/clang-13+0x1265696)
#31 0x00005611992b19d8 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#32 0x00005611991df0e6 main (/scratch/software/clang-trunk/bin/clang-13+0x118f0e6)
#33 0x00007f0954cf70b3 __libc_start_main /build/glibc-ZN95T4/glibc-2.31/csu/../csu/libc-start.c:342:3
#34 0x00005611992b154e _start (/scratch/software/clang-trunk/bin/clang-13+0x126154e)
clang-13: error: unable to execute command: Aborted (core dumped)
clang-13: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 13.0.0 (https:/llvm/llvm-project.git 699d474)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/cnsun/usr/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/mutant-c879ed.c
clang-13: note: diagnostic msg: /tmp/mutant-c879ed.sh
clang-13: note: diagnostic msg:
The text was updated successfully, but these errors were encountered: