Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion `hiBit <= BitWidth && "hiBit out of range"' failed #48057

Closed
rjmansfield mannequin opened this issue Jan 11, 2021 · 8 comments
Closed

Assertion `hiBit <= BitWidth && "hiBit out of range"' failed #48057

rjmansfield mannequin opened this issue Jan 11, 2021 · 8 comments
Labels
bugzilla Issues migrated from bugzilla duplicate Resolved as duplicate llvm:optimizations

Comments

@rjmansfield
Copy link
Mannequin

rjmansfield mannequin commented Jan 11, 2021

Bugzilla Link 48713
Version trunk
OS All
CC @chengniansun,@jdoerfert,@rotateright

Extended Description

$ cat ~/t.i
void *a(long t) attribute((alloc_align(1)));
void *a(long t) { a(0) == 0; }

$ ./bin/clang -O1 ~/t.i
/home/ryan_mansfield/t.i:2:21: warning: requested alignment is not a power of 2 [-Wnon-power-of-two-alignment]
void *a(long t) { a(0) == 0; }
^
/home/ryan_mansfield/t.i:2:24: warning: equality comparison result unused [-Wunused-comparison]
void *a(long t) { a(0) == 0; }
~~~~~^~~~
/home/ryan_mansfield/t.i:2:30: warning: non-void function does not return a value [-Wreturn-type]
void *a(long t) { a(0) == 0; }
^
clang-12: /home/ryan_mansfield/llvm/llvm-project/llvm/include/llvm/ADT/APInt.h:1482: void llvm::APInt::setBits(unsigned int, unsigned int): Assertion `hiBit <= BitWidth && "hiBit out of range"' 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: /home/ryan_mansfield/llvm/llvm-project/build/bin/clang-12 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj --mrelax-relocations -disable-free -main-file-name t.i -mrelocation-model static -mframe-pointer=none -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir /home/ryan_mansfield/llvm/llvm-project/build/lib/clang/12.0.0 -O1 -fdebug-compilation-dir /home/ryan_mansfield/llvm/llvm-project/build -ferror-limit 19 -fgnuc-version=4.2.1 -fcolor-diagnostics -faddrsig -o /tmp/t-dad038.o -x cpp-output /home/ryan_mansfield/t.i

  1. parser at end of file
  2. Per-function optimization
  3. Running pass 'Early CSE' on function '@A'
    #​0 0x0000555559ed013e llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:565:0
    #​1 0x0000555559ed01f5 PrintStackTraceSignalHandler(void*) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:632:0
    #​2 0x0000555559ecdeb9 llvm::sys::RunSignalHandlers() /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Support/Signals.cpp:71:0
    #​3 0x0000555559ecfabf SignalHandler(int) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:407:0
    #​4 0x00007ffff7bc6980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
    #​5 0x00007ffff6877fb7 raise /build/glibc-S7xCS9/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
    #​6 0x00007ffff6879921 abort /build/glibc-S7xCS9/glibc-2.27/stdlib/abort.c:81:0
    #​7 0x00007ffff686948a __assert_fail_base /build/glibc-S7xCS9/glibc-2.27/assert/assert.c:89:0
    #​8 0x00007ffff6869502 (/lib/x86_64-linux-gnu/libc.so.6+0x30502)
    #​9 0x0000555557f82b8f llvm::APInt::setBits(unsigned int, unsigned int) /home/ryan_mansfield/llvm/llvm-project/llvm/include/llvm/ADT/APInt.h:1483:0
    #​10 0x0000555557ffa959 llvm::APInt::setLowBits(unsigned int) /home/ryan_mansfield/llvm/llvm-project/llvm/include/llvm/ADT/APInt.h:1506:0
    #​11 0x0000555558c3ad14 computeKnownBitsFromAssume(llvm::Value const*, llvm::KnownBits&, unsigned int, (anonymous namespace)::Query const&) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Analysis/ValueTracking.cpp:676:0
    #​12 0x0000555558c41e05 computeKnownBits(llvm::Value const*, llvm::APInt const&, llvm::KnownBits&, unsigned int, (anonymous namespace)::Query const&) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Analysis/ValueTracking.cpp:1904:0
    #​13 0x0000555558c450ff isKnownNonZero(llvm::Value const*, llvm::APInt const&, unsigned int, (anonymous namespace)::Query const&) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Analysis/ValueTracking.cpp:2470:0
    #​14 0x0000555558c45202 isKnownNonZero(llvm::Value const*, unsigned int, (anonymous namespace)::Query const&) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Analysis/ValueTracking.cpp:2482:0
    #​15 0x0000555558c393eb llvm::isKnownNonZero(llvm::Value const*, llvm::DataLayout const&, unsigned int, llvm::AssumptionCache*, llvm::Instruction const*, llvm::DominatorTree const*, bool) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Analysis/ValueTracking.cpp:322:0
    #​16 0x0000555558cfb1fc simplifyICmpWithZero(llvm::CmpInst::Predicate, llvm::Value*, llvm::Value*, llvm::SimplifyQuery const&) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp:2709:0
    #​17 0x0000555558cfe6b7 SimplifyICmpInst(unsigned int, llvm::Value*, llvm::Value*, llvm::SimplifyQuery const&, unsigned int) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp:3352:0
    #​18 0x0000555558cffc67 llvm::SimplifyICmpInst(unsigned int, llvm::Value*, llvm::Value*, llvm::SimplifyQuery const&) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp:3633:0
    #​19 0x0000555558d09193 llvm::SimplifyInstruction(llvm::Instruction*, llvm::SimplifyQuery const&, llvm::OptimizationRemarkEmitter*) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp:5809:0
    #​20 0x0000555559b73ea2 (anonymous namespace)::EarlyCSE::processNode(llvm::DomTreeNodeBasellvm::BasicBlock) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Transforms/Scalar/EarlyCSE.cpp:1301:0
    #​21 0x0000555559b75127 (anonymous namespace)::EarlyCSE::run() /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Transforms/Scalar/EarlyCSE.cpp:1576:0
    #​22 0x0000555559b7c9af (anonymous namespace)::EarlyCSELegacyCommonPass::runOnFunction(llvm::Function&) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/Transforms/Scalar/EarlyCSE.cpp:1653:0
    #​23 0x0000555559578eb8 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1440:0
    #​24 0x0000555559574062 llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:367:0
    #​25 0x0000555559578a36 llvm::legacy::FunctionPassManager::run(llvm::Function&) /home/ryan_mansfield/llvm/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1358:0
    #​26 0x000055555a294a16 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) /home/ryan_mansfield/llvm/llvm-project/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1004:0
    #​27 0x000055555a298d79 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_deletellvm::raw_pwrite_stream >) /home/ryan_mansfield/llvm/llvm-project/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1596:0
    #​28 0x000055555b502078 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/ryan_mansfield/llvm/llvm-project/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:344:0
    #​29 0x000055555d1037e6 clang::ParseAST(clang::Sema&, bool, bool) /home/ryan_mansfield/llvm/llvm-project/llvm/tools/clang/lib/Parse/ParseAST.cpp:178:0
    #​30 0x000055555ab7f571 clang::ASTFrontendAction::ExecuteAction() /home/ryan_mansfield/llvm/llvm-project/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:1056:0
    #​31 0x000055555b4feac0 clang::CodeGenAction::ExecuteAction() /home/ryan_mansfield/llvm/llvm-project/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:1083:0
    #​32 0x000055555ab7ee3a clang::FrontendAction::Execute() /home/ryan_mansfield/llvm/llvm-project/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:953:0
    #​33 0x000055555aad820a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/ryan_mansfield/llvm/llvm-project/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:957:0
    #​34 0x000055555ad0f412 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/ryan_mansfield/llvm/llvm-project/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:278:0
    #​35 0x0000555557e41f65 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/ryan_mansfield/llvm/llvm-project/llvm/tools/clang/tools/driver/cc1_main.cpp:240:0
    #​36 0x0000555557e36666 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) /home/ryan_mansfield/llvm/llvm-project/llvm/tools/clang/tools/driver/driver.cpp:330:0
    #​37 0x0000555557e36e38 main /home/ryan_mansfield/llvm/llvm-project/llvm/tools/clang/tools/driver/driver.cpp:407:0
    #​38 0x00007ffff685abf7 __libc_start_main /build/glibc-S7xCS9/glibc-2.27/csu/../csu/libc-start.c:344:0
    #​39 0x0000555557e34cea _start (/home/ryan_mansfield/llvm/llvm-project/build/bin/clang-12+0x28e0cea)
    clang-12: error: unable to execute command: Aborted (core dumped)
    clang-12: error: clang frontend command failed due to signal (use -v to see invocation)
    clang version 12.0.0 (https://github.com/llvm/llvm-project.git 4c372a3)
    Target: x86_64-unknown-linux-gnu
    Thread model: posix

This appears after the following commit.

commit 22e4346 (HEAD -> master)
Author: Shimin Cui scui@ca.ibm.com
Date: Tue Oct 27 09:49:41 2020 +0000

[ValueTracking] Add tracking of the alignment assume bundle

This patch is to add the support of the value tracking of the alignment assume bundle.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D88669

The following avoids the assertion.

diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 1c75c5fbd0db..1b7e95101b83 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -666,7 +666,8 @@ static void computeKnownBitsFromAssume(const Value *V, KnownBits &Known,
if (V->getType()->isPointerTy()) {
if (RetainedKnowledge RK = getKnowledgeValidInContext(
V, {Attribute::Alignment}, Q.CxtI, Q.DT, Q.AC)) {

  •  Known.Zero.setLowBits(Log2_32(RK.ArgValue));
    
  •  if (RK.ArgValue)
    
  •    Known.Zero.setLowBits(Log2_32(RK.ArgValue));
    
    }
    }
@rotateright
Copy link
Contributor

Your patch seems right to me - we have to guard against "align 0" because the LangRef says:
"if the alignment is set to zero, the alignment of the function is set by the target to whatever it feels convenient"

Do you want to post a patch on Phabricator?

Here's a reduced IR testcase that fails with "opt -instsimplify":

define i8* @​#48713 () {
%call = call i8* @​a()
call void @​llvm.assume(i1 true) [ "align"(i8* %call, i64 0) ]
%cmp = icmp eq i8* %call, null
%conv = zext i1 %cmp to i32
ret i8* null
}

declare void @​llvm.assume(i1 noundef)

@rotateright
Copy link
Contributor

define i8* @​#48713 () {
%call = call i8* @​a()
call void @​llvm.assume(i1 true) [ "align"(i8* %call, i64 0) ]
%cmp = icmp eq i8* %call, null
%conv = zext i1 %cmp to i32
ret i8* null
}

declare void @​llvm.assume(i1 noundef)

Forgot to update the function name in the call instruction:

define i8* @​#48713 () {
%call = call i8* @​#48713 ()
call void @​llvm.assume(i1 true) [ "align"(i8* %call, i64 0) ]
%cmp = icmp eq i8* %call, null
%conv = zext i1 %cmp to i32
ret i8* null
}

@rjmansfield
Copy link
Mannequin Author

rjmansfield mannequin commented Jan 11, 2021

Your patch seems right to me - we have to guard against "align 0" because
the LangRef says:
"if the alignment is set to zero, the alignment of the function is set by
the target to whatever it feels convenient"

Do you want to post a patch on Phabricator?

Thanks, I can. Should I included the reduced IR testcase in the patch?

@rotateright
Copy link
Contributor

Thanks, I can. Should I included the reduced IR testcase in the patch?

Yes - we always try to include a minimal regression test to ensure that a bug doesn't come back to life after being killed.

@rjmansfield
Copy link
Mannequin Author

rjmansfield mannequin commented Jan 11, 2021

Patch is posted here: https://reviews.llvm.org/D94433

@chengniansun
Copy link

A possible duplicate here.

$ clang-trunk -v
clang version 13.0.0 (https://github.com/llvm/llvm-project.git 2e9c75d)
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
*a(int, int) attribute((alloc_align(1)));
b() {
int c;
double d = a(c, b)[c] = d;
}

$ clang-trunk -O1 mutant.c
mutant.c:1:2: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
*a(int, int) attribute((alloc_align(1)));
^
mutant.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
b() {
^
mutant.c:4:19: warning: incompatible pointer to integer conversion passing 'int ()' to parameter of type 'int' [-Wint-conversion]
double d = a(c, b)[c] = d;
^
mutant.c:1:12: note: passing argument to parameter here
*a(int, int) attribute((alloc_align(1)));
^
mutant.c:5:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
clang-13: /tmp/tmp.xjN6dMkdrg-clang-builder/llvm-project/llvm/include/llvm/ADT/APInt.h:1482: void llvm::APInt::setBits(unsigned int, unsigned int): Assertion `hiBit <= BitWidth && "hiBit out of range"' 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_20210624_112258_040b/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 -fdebug-compilation-dir=/scratch/cnsun/workspace/perses-fuzzer/default_c_finding_folder/crash_20210624_112258_040b/delta/perses_result -ferror-limit 19 -fgnuc-version=4.2.1 -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/mutant-cdf9ec.o -x c mutant.c

  1. parser at end of file
  2. Optimizer
    #​0 0x000056537237a184 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
    #​1 0x000056537237793e SignalHandler(int) Signals.cpp:0:0
    #​2 0x00007f71f9d1c3c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
    #​3 0x00007f71f97bb18b raise /build/glibc-ZN95T4/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
    #​4 0x00007f71f979a859 abort /build/glibc-ZN95T4/glibc-2.31/stdlib/abort.c:81:7
    #​5 0x00007f71f979a729 get_sysdep_segment_value /build/glibc-ZN95T4/glibc-2.31/intl/loadmsgcat.c:509:8
    #​6 0x00007f71f979a729 _nl_load_domain /build/glibc-ZN95T4/glibc-2.31/intl/loadmsgcat.c:970:34
    #​7 0x00007f71f97abf36 (/lib/x86_64-linux-gnu/libc.so.6+0x36f36)
    #​8 0x0000565370054696 (/scratch/software/clang-trunk/bin/clang-13+0x1635696)
    #​9 0x00005653713bb6bc computeKnownBitsFromAssume(llvm::Value const*, llvm::KnownBits&, unsigned int, (anonymous namespace)::Query const&) ValueTracking.cpp:0:0
    #​10 0x00005653713bc8cb computeKnownBits(llvm::Value const*, llvm::APInt const&, llvm::KnownBits&, unsigned int, (anonymous namespace)::Query const&) ValueTracking.cpp:0:0
    #​11 0x00005653713bcf5e computeKnownBits(llvm::Value const*, llvm::KnownBits&, unsigned int, (anonymous namespace)::Query const&) ValueTracking.cpp:0:0
    #​12 0x00005653713bf157 computeKnownBits(llvm::Value const*, unsigned int, (anonymous namespace)::Query const&) ValueTracking.cpp:0:0
    #​13 0x00005653713bf202 llvm::computeKnownBits(llvm::Value const*, llvm::DataLayout const&, unsigned int, llvm::AssumptionCache*, llvm::Instruction const*, llvm::DominatorTree const*, llvm::OptimizationRemarkEmitter*, bool) (/scratch/software/clang-trunk/bin/clang-13+0x29a0202)
    #​14 0x000056537243c87e llvm::getOrEnforceKnownAlignment(llvm::Value*, llvm::MaybeAlign, llvm::DataLayout const&, llvm::Instruction const*, llvm::AssumptionCache*, llvm::DominatorTree const*) (/scratch/software/clang-trunk/bin/clang-13+0x3a1d87e)
    #​15 0x0000565371d72f7f llvm::InstCombinerImpl::visitStoreInst(llvm::StoreInst&) (/scratch/software/clang-trunk/bin/clang-13+0x3353f7f)
    #​16 0x0000565371cecfa8 llvm::InstCombinerImpl::run() (/scratch/software/clang-trunk/bin/clang-13+0x32cdfa8)
    #​17 0x0000565371cef6e3 combineInstructionsOverFunction(llvm::Function&, llvm::InstCombineWorklist&, llvm::AAResults*, llvm::AssumptionCache&, llvm::TargetLibraryInfo&, llvm::TargetTransformInfo&, llvm::DominatorTree&, llvm::OptimizationRemarkEmitter&, llvm::BlockFrequencyInfo*, llvm::ProfileSummaryInfo*, unsigned int, llvm::LoopInfo*) InstructionCombining.cpp:0:0
    #​18 0x0000565371cf1741 llvm::InstCombinePass::run(llvm::Function&, llvm::AnalysisManagerllvm::Function&) (/scratch/software/clang-trunk/bin/clang-13+0x32d2741)
    #​19 0x0000565373552456 llvm::detail::PassModel<llvm::Function, llvm::InstCombinePass, llvm::PreservedAnalyses, llvm::AnalysisManagerllvm::Function >::run(llvm::Function&, llvm::AnalysisManagerllvm::Function&) (/scratch/software/clang-trunk/bin/clang-13+0x4b33456)
    #​20 0x0000565371ab64d6 llvm::PassManager<llvm::Function, llvm::AnalysisManagerllvm::Function >::run(llvm::Function&, llvm::AnalysisManagerllvm::Function&) (/scratch/software/clang-trunk/bin/clang-13+0x30974d6)
    #​21 0x000056536ff4b836 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+0x152c836)
    #​22 0x0000565371ab4ff9 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) (/scratch/software/clang-trunk/bin/clang-13+0x3095ff9)
    #​23 0x000056536ff4c0a6 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+0x152d0a6)
    #​24 0x0000565371ab28df llvm::PassManager<llvm::Module, llvm::AnalysisManagerllvm::Module >::run(llvm::Module&, llvm::AnalysisManagerllvm::Module&) (/scratch/software/clang-trunk/bin/clang-13+0x30938df)
    #​25 0x00005653726ab6ad (anonymous namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_deletellvm::raw_pwrite_stream >) BackendUtil.cpp:0:0
    #​26 0x00005653726ae92d 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+0x3c8f92d)
    #​27 0x00005653734d7e1f clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/scratch/software/clang-trunk/bin/clang-13+0x4ab8e1f)
    #​28 0x000056537458f4d9 clang::ParseAST(clang::Sema&, bool, bool) (/scratch/software/clang-trunk/bin/clang-13+0x5b704d9)
    #​29 0x00005653734d6968 clang::CodeGenAction::ExecuteAction() (/scratch/software/clang-trunk/bin/clang-13+0x4ab7968)
    #​30 0x0000565372d86599 clang::FrontendAction::Execute() (/scratch/software/clang-trunk/bin/clang-13+0x4367599)
    #​31 0x0000565372d197e6 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/scratch/software/clang-trunk/bin/clang-13+0x42fa7e6)
    #​32 0x0000565372e64480 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/scratch/software/clang-trunk/bin/clang-13+0x4445480)
    #​33 0x000056536fc84696 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/scratch/software/clang-trunk/bin/clang-13+0x1265696)
    #​34 0x000056536fc809d8 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
    #​35 0x000056536fbae0e6 main (/scratch/software/clang-trunk/bin/clang-13+0x118f0e6)
    #​36 0x00007f71f979c0b3 __libc_start_main /build/glibc-ZN95T4/glibc-2.31/csu/../csu/libc-start.c:342:3
    #​37 0x000056536fc8054e _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://github.com/llvm/llvm-project.git 2e9c75d)
    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-8b3c17.c
clang-13: note: diagnostic msg: /tmp/mutant-8b3c17.sh
clang-13: note: diagnostic msg:


@rotateright
Copy link
Contributor

I posted a comment on https://reviews.llvm.org/D94433 to see if we can make progress.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
@rjmansfield
Copy link
Contributor

Fixed by 516333d

Duplicate of #53693

@nikic nikic closed this as completed Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla duplicate Resolved as duplicate llvm:optimizations
Projects
None yet
Development

No branches or pull requests

5 participants