[llvm-bugs] [Bug 47165] New: clang-10: error: unable to execute command: Aborted (core dumped)

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 14 03:22:59 PDT 2020


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

            Bug ID: 47165
           Summary: clang-10: error: unable to execute command: Aborted
                    (core dumped)
           Product: new-bugs
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: anbu1024.me at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

$ cat test.c 

typedef unsigned __int128 TYPE ; 

void foo ( TYPE x ) 
{ 
    __builtin_mul_overflow ( ( unsigned char ) x , 1 , & x ) ;  
} 

-------------------------------------------------------------------------------

$ clang --version
clang version 10.0.1 
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/tom/Documents/llvm/10.0.1/install-all/bin

-------------------------------------------------------------------------------

$ clang test.c 
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
Stack dump:
0.      Program arguments:
/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name test.c
-mrelocation-model static -mthread-model posix -mframe-pointer=all -fmath-errno
-fno-rounding-math -masm-verbose -mconstructor-aliases -munwind-tables
-target-cpu x86-64 -dwarf-column-info -fno-split-dwarf-inlining
-debugger-tuning=gdb -resource-dir
/home/tom/Documents/llvm/10.0.1/install-all/lib/clang/10.0.1 -internal-isystem
/usr/local/include -internal-isystem
/home/tom/Documents/llvm/10.0.1/install-all/lib/clang/10.0.1/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir
/home/tom/Documents/git/ESmith/FoundBugs/round-2020.08.13_21-40-39
-ferror-limit 19 -fmessage-length 0 -fgnuc-version=4.2.1 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -faddrsig -o /tmp/test-f1f90c.o
-x c test.c 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'test.c'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@foo'
 #0 0x0000000001883b1a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1883b1a)
 #1 0x000000000188181c llvm::sys::RunSignalHandlers()
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x188181c)
 #2 0x0000000001881983 SignalHandler(int)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1881983)
 #3 0x00007f8e37df2390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
 #4 0x00007f8e36b01438 raise
/build/glibc-e6zv40/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
 #5 0x00007f8e36b0303a abort /build/glibc-e6zv40/glibc-2.23/stdlib/abort.c:91:0
 #6 0x00007f8e374508ae (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x998ae)
 #7 0x00007f8e3745c4b6 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xa54b6)
 #8 0x00007f8e3745c521 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xa5521)
 #9 0x00007f8e3745c775 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xa5775)
#10 0x00007f8e37452efe std::__throw_logic_error(char const*)
(/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x9befe)
#11 0x00000000023dbec4 llvm::SelectionDAG::getTargetExternalSymbol(char const*,
llvm::EVT, unsigned int)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x23dbec4)
#12 0x0000000000abbf5a
llvm::X86TargetLowering::LowerGlobalOrExternal(llvm::SDValue,
llvm::SelectionDAG&, bool) const
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0xabbf5a)
#13 0x0000000000b56c54
llvm::X86TargetLowering::LowerCall(llvm::TargetLowering::CallLoweringInfo&,
llvm::SmallVectorImpl<llvm::SDValue>&) const
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0xb56c54)
#14 0x000000000237fa06
llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&)
const (/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x237fa06)
#15 0x00000000024cd428
llvm::DAGTypeLegalizer::ExpandIntRes_XMULO(llvm::SDNode*, llvm::SDValue&,
llvm::SDValue&)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x24cd428)
#16 0x00000000024db2cb
llvm::DAGTypeLegalizer::ExpandIntegerResult(llvm::SDNode*, unsigned int)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x24db2cb)
#17 0x000000000244f095 llvm::DAGTypeLegalizer::run()
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x244f095)
#18 0x000000000244f596 llvm::SelectionDAG::LegalizeTypes()
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x244f596)
#19 0x00000000023fcd00 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x23fcd00)
#20 0x0000000002400e9f
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x2400e9f)
#21 0x0000000002402759
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(.part.789.constprop.812)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x2402759)
#22 0x0000000000a6b242 (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0xa6b242)
#23 0x0000000000f2171a
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(.part.40.constprop.41)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0xf2171a)
#24 0x00000000012eea5f llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x12eea5f)
#25 0x00000000012ef163 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x12ef163)
#26 0x00000000012ef4cb llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x12ef4cb)
#27 0x0000000001a8ddad (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1a8ddad)
#28 0x0000000001a8f7df 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> >)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1a8f7df)
#29 0x00000000024f178f
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x24f178f)
#30 0x0000000002dafb29 clang::ParseAST(clang::Sema&, bool, bool)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x2dafb29)
#31 0x0000000001fa0bc1 clang::FrontendAction::Execute()
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1fa0bc1)
#32 0x0000000001f60960
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1f60960)
#33 0x000000000204a9fb
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x204a9fb)
#34 0x00000000009ccd83 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x9ccd83)
#35 0x00000000009ca697 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x9ca697)
#36 0x000000000095f85b main
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x95f85b)
#37 0x00007f8e36aec840 __libc_start_main
/build/glibc-e6zv40/glibc-2.23/csu/../csu/libc-start.c:325:0
#38 0x00000000009ca0f9 _start
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x9ca0f9)
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 10.0.1 
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/tom/Documents/llvm/10.0.1/install-all/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/test-ff59f2.c
clang-10: note: diagnostic msg: /tmp/test-ff59f2.sh
clang-10: note: diagnostic msg: 

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

-------------------------------------------------------------------------------

$ cat /tmp/test-ff59f2.c
# 1 "<built-in>"
# 1 "test.c"

typedef unsigned __int128 TYPE ; 

void foo ( TYPE x ) 
{ 
    __builtin_mul_overflow ( ( unsigned char ) x , 1 , & x ) ;  
} 

-------------------------------------------------------------------------------

$ cat /tmp/test-ff59f2.sh
# Crash reproducer for clang version 10.0.1 
# Driver args: "test.c"
# Original command:  "/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10"
"-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all"
"-disable-free" "-disable-llvm-verifier" "-discard-value-names"
"-main-file-name" "test.c" "-mrelocation-model" "static" "-mthread-model"
"posix" "-mframe-pointer=all" "-fmath-errno" "-fno-rounding-math"
"-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-target-cpu"
"x86-64" "-dwarf-column-info" "-fno-split-dwarf-inlining"
"-debugger-tuning=gdb" "-resource-dir"
"/home/tom/Documents/llvm/10.0.1/install-all/lib/clang/10.0.1"
"-internal-isystem" "/usr/local/include" "-internal-isystem"
"/home/tom/Documents/llvm/10.0.1/install-all/lib/clang/10.0.1/include"
"-internal-externc-isystem" "/usr/include/x86_64-linux-gnu"
"-internal-externc-isystem" "/include" "-internal-externc-isystem"
"/usr/include" "-fdebug-compilation-dir"
"/home/tom/Documents/git/ESmith/FoundBugs/round-2020.08.13_21-40-39"
"-ferror-limit" "19" "-fmessage-length" "0" "-fgnuc-version=4.2.1"
"-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics"
"-faddrsig" "-o" "/tmp/test-f1f90c.o" "-x" "c" "test.c"
 "/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10" "-cc1" "-triple"
"x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free"
"-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "test.c"
"-mrelocation-model" "static" "-mthread-model" "posix" "-mframe-pointer=all"
"-fmath-errno" "-fno-rounding-math" "-masm-verbose" "-mconstructor-aliases"
"-munwind-tables" "-target-cpu" "x86-64" "-dwarf-column-info"
"-fno-split-dwarf-inlining" "-debugger-tuning=gdb" "-ferror-limit" "19"
"-fmessage-length" "0" "-fgnuc-version=4.2.1" "-fobjc-runtime=gcc"
"-fdiagnostics-show-option" "-fcolor-diagnostics" "-faddrsig" "-x" "c"
"test-ff59f2.c"

-- 
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/20200814/88daab66/attachment.html>


More information about the llvm-bugs mailing list