[llvm-bugs] [Bug 47196] New: [10] error: unable to execute command: Segmentation fault (core dumped)

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Aug 16 18:08:02 PDT 2020


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

            Bug ID: 47196
           Summary: [10] error: unable to execute command: Segmentation
                    fault (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 test7289.c 

unsigned long foo ( char * arg )
{ 
    register unsigned long x1 asm ( "0" ) ; 

    const char * x2 = arg ; 

    asm ( " lhi %0, 0\n" "0:srst %0,%1\n" " jo 0b" : "=d" ( x1 ) , "+a" ( x2 )
: : "cc" ) ; 

    return x1 - ( unsigned long ) arg ; 
} 


char baz [ ] = "STRING" ; 


void bar ( ) 
{ 
    char x [ 1024 ] ; 

    x [ foo ( baz ) ] = 0 ; 
}

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

$ 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/bin

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

$ clang test7289.c 
Stack dump:
0.      Program arguments: /home/tom/Documents/llvm/10.0.1/install/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 test7289.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/lib/clang/10.0.1 -internal-isystem
/usr/local/include -internal-isystem
/home/tom/Documents/llvm/10.0.1/install/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/fuzz/esmith-bugs/0816/FoundBugs2020-11/round-2020.08.15_06-24-27
-ferror-limit 19 -fmessage-length 0 -fgnuc-version=4.2.1 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -faddrsig -o
/tmp/test7289-a95bb3.o -x c test7289.c 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'test7289.c'.
4.      Running pass 'Fast Register Allocator' on function '@foo'
 #0 0x000000000186618a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x186618a)
 #1 0x0000000001863e8c llvm::sys::RunSignalHandlers()
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x1863e8c)
 #2 0x0000000001863ff3 SignalHandler(int)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x1863ff3)
 #3 0x00007f18de023390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
 #4 0x000000000114f596 (anonymous
namespace)::RegAllocFast::allocateInstruction(llvm::MachineInstr&)
(.constprop.203)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x114f596)
 #5 0x000000000114fb8a (anonymous
namespace)::RegAllocFast::runOnMachineFunction(llvm::MachineFunction&)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x114fb8a)
 #6 0x0000000000f1c97a
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(.part.38.constprop.39)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0xf1c97a)
 #7 0x00000000012d72bf llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x12d72bf)
 #8 0x00000000012d79c3 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x12d79c3)
 #9 0x00000000012d7d2b llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x12d7d2b)
#10 0x0000000001a6629d (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/bin/clang-10+0x1a6629d)
#11 0x0000000001a67b24 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/bin/clang-10+0x1a67b24)
#12 0x00000000024a30bc
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x24a30bc)
#13 0x0000000002d54fb9 clang::ParseAST(clang::Sema&, bool, bool)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2d54fb9)
#14 0x0000000001f63681 clang::FrontendAction::Execute()
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x1f63681)
#15 0x0000000001f25770
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x1f25770)
#16 0x000000000200a8eb
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x200a8eb)
#17 0x00000000009cbf11 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x9cbf11)
#18 0x00000000009c9a27 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x9c9a27)
#19 0x000000000095edab main
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x95edab)
#20 0x00007f18dcd80840 __libc_start_main
/build/glibc-e6zv40/glibc-2.23/csu/../csu/libc-start.c:325:0
#21 0x00000000009c9479 _start
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x9c9479)
clang-10: error: unable to execute command: Segmentation fault (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/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/test7289-4c3aca.c
clang-10: note: diagnostic msg: /tmp/test7289-4c3aca.sh
clang-10: note: diagnostic msg: 

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

-- 
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/20200817/8af84332/attachment-0001.html>


More information about the llvm-bugs mailing list