<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [11/12] error: unable to execute command: Segmentation fault (core dumped)"
href="https://bugs.llvm.org/show_bug.cgi?id=51342">51342</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[11/12] error: unable to execute command: Segmentation fault (core dumped)
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>anbu1024.me@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>$ cat 13.c
struct S
{
int x;
int y[];
};
struct S s = {2, 5, .x = 0};
----------------------------------------------------------------
$ clang-1201 --version
clang version 12.0.1
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /path-to-llvm/12.0.1/install/bin
----------------------------------------------------------------
$ clang-1201 13.c
13.c:9:21: warning: excess elements in struct initializer
[-Wexcess-initializers]
struct S s = {2, 5, .x = 0};
^~~~~~
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /path-to-llvm/12.0.1/install/bin/clang-12 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocations
-disable-free -disable-llvm-verifier -discard-value-names -main-file-name 13.c
-mrelocation-model static -mframe-pointer=all -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
/path-to-llvm/12.0.1/install/lib/clang/12.0.1 -internal-isystem
/usr/local/include -internal-isystem
/path-to-llvm/12.0.1/install/lib/clang/12.0.1/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -fdebug-compilation-dir /path-to-code/
-ferror-limit 19 -fgnuc-version=4.2.1 -fcolor-diagnostics -faddrsig -o
/tmp/13-2f242f.o -x c 13.c
1. <eof> parser at end of file
2. 13.c:9:10: LLVM IR generation of declaration 's'
3. 13.c:9:10: Generating code for declaration 's'
#0 0x00005579bc009b01 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x1ccbb01)
#1 0x00005579bc0078c4 llvm::sys::RunSignalHandlers()
(/path-to-llvm/12.0.1/install/bin/clang-12+0x1cc98c4)
#2 0x00005579bc007a3b SignalHandler(int)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x1cc9a3b)
#3 0x00007f6d7ec153c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
#4 0x00005579badc58c4 clang::StmtVisitorBase<std::add_pointer, (anonymous
namespace)::ConstExprEmitter, llvm::Constant*,
clang::QualType>::Visit(clang::Stmt*, clang::QualType) (.cold)
(/path-to-llvm/12.0.1/install/bin/clang-12+0xa878c4)
#5 0x00005579bc309047
clang::CodeGen::ConstantEmitter::tryEmitPrivate(clang::Expr const*,
clang::QualType) (/path-to-llvm/12.0.1/install/bin/clang-12+0x1fcb047)
#6 0x00005579bc309316
clang::CodeGen::ConstantEmitter::tryEmitPrivateForMemory(clang::Expr const*,
clang::QualType) (/path-to-llvm/12.0.1/install/bin/clang-12+0x1fcb316)
#7 0x00005579bc30953f (anonymous
namespace)::ConstStructBuilder::Build(clang::InitListExpr*, bool)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x1fcb53f)
#8 0x00005579bc309b8e (anonymous
namespace)::ConstStructBuilder::BuildStruct(clang::CodeGen::ConstantEmitter&,
clang::InitListExpr*, clang::QualType)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x1fcbb8e)
#9 0x00005579bc30a72c clang::StmtVisitorBase<std::add_pointer, (anonymous
namespace)::ConstExprEmitter, llvm::Constant*,
clang::QualType>::Visit(clang::Stmt*, clang::QualType)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x1fcc72c)
#10 0x00005579bc30a9fa
clang::CodeGen::ConstantEmitter::tryEmitPrivateForVarInit(clang::VarDecl
const&) (/path-to-llvm/12.0.1/install/bin/clang-12+0x1fcc9fa)
#11 0x00005579bc30abb4
clang::CodeGen::ConstantEmitter::tryEmitForInitializer(clang::VarDecl const&)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x1fccbb4)
#12 0x00005579bc3b3ec1
clang::CodeGen::CodeGenModule::EmitGlobalVarDefinition(clang::VarDecl const*,
bool) (/path-to-llvm/12.0.1/install/bin/clang-12+0x2075ec1)
#13 0x00005579bc3d59ed
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (/path-to-llvm/12.0.1/install/bin/clang-12+0x20979ed)
#14 0x00005579bc3d5f63
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x2097f63)
#15 0x00005579bc3dbe2d
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (.part.0)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x209de2d)
#16 0x00005579bcfb5a01 (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x2c77a01)
#17 0x00005579bcfa961d
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x2c6b61d)
#18 0x00005579bdd90734 clang::ParseAST(clang::Sema&, bool, bool)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x3a52734)
#19 0x00005579bcfb3146 clang::CodeGenAction::ExecuteAction()
(/path-to-llvm/12.0.1/install/bin/clang-12+0x2c75146)
#20 0x00005579bc935c31 clang::FrontendAction::Execute()
(/path-to-llvm/12.0.1/install/bin/clang-12+0x25f7c31)
#21 0x00005579bc8d299b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x259499b)
#22 0x00005579bca07ae0
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x26c9ae0)
#23 0x00005579bae581bb cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/path-to-llvm/12.0.1/install/bin/clang-12+0xb1a1bb)
#24 0x00005579bae559cb ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/path-to-llvm/12.0.1/install/bin/clang-12+0xb179cb)
#25 0x00005579badd876e main
(/path-to-llvm/12.0.1/install/bin/clang-12+0xa9a76e)
#26 0x00007f6d7e6e30b3 __libc_start_main
/build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:342:3
#27 0x00005579bae5555e _start
(/path-to-llvm/12.0.1/install/bin/clang-12+0xb1755e)
clang-12: error: unable to execute command: Segmentation fault (core dumped)
clang-12: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 12.0.1
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /path-to-llvm/12.0.1/install/bin
clang-12: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/13-0ade19.c
clang-12: note: diagnostic msg: /tmp/13-0ade19.sh
clang-12: note: diagnostic msg:
********************
----------------------------------------------------------------
$ clang-1100 --version
clang version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
0160ad802e899c2922bc9b29564080c22eb0908c)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin
----------------------------------------------------------------
$ clang-1100 13.c
13.c:9:21: warning: excess elements in struct initializer
[-Wexcess-initializers]
struct S s = {2, 5, .x = 0};
^~~~~~
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments:
/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name 13.c
-mrelocation-model static -mframe-pointer=all -fmath-errno -fno-rounding-math
-mconstructor-aliases -munwind-tables -target-cpu x86-64
-fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir
/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/lib/clang/11.0.0
-internal-isystem /usr/local/include -internal-isystem
/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/lib/clang/11.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir /path-to-code/ -ferror-limit 19 -fgnuc-version=4.2.1
-fcolor-diagnostics -faddrsig -o /tmp/13-8c2b2e.o -x c 13.c
1. <eof> parser at end of file
2. 13.c:9:10: LLVM IR generation of declaration 's'
3. 13.c:9:10: Generating code for declaration 's'
#0 0x00000000022bcf44 PrintStackTraceSignalHandler(void*)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x22bcf44)
#1 0x00000000022bacce llvm::sys::RunSignalHandlers()
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x22bacce)
#2 0x00000000022bd245 SignalHandler(int)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x22bd245)
#3 0x00007fea828dc3c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
#4 0x00000000024ba45a (anonymous
namespace)::ConstExprEmitter::EmitArrayInitialization(clang::InitListExpr*,
clang::QualType)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x24ba45a)
#5 0x00000000024ae9d1
clang::CodeGen::ConstantEmitter::tryEmitPrivate(clang::Expr const*,
clang::QualType)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x24ae9d1)
#6 0x00000000024afd99
clang::CodeGen::ConstantEmitter::tryEmitPrivateForMemory(clang::Expr const*,
clang::QualType)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x24afd99)
#7 0x00000000024ba286 (anonymous
namespace)::ConstStructBuilder::Build(clang::InitListExpr*, bool)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x24ba286)
#8 0x00000000024ba6af (anonymous
namespace)::ConstStructBuilder::BuildStruct(clang::CodeGen::ConstantEmitter&,
clang::InitListExpr*, clang::QualType)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x24ba6af)
#9 0x00000000024ae8d9
clang::CodeGen::ConstantEmitter::tryEmitPrivateForVarInit(clang::VarDecl
const&)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x24ae8d9)
#10 0x00000000024afcb0
clang::CodeGen::ConstantEmitter::tryEmitForInitializer(clang::VarDecl const&)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x24afcb0)
#11 0x000000000253216b
clang::CodeGen::CodeGenModule::EmitGlobalVarDefinition(clang::VarDecl const*,
bool)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x253216b)
#12 0x000000000252be5b
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x252be5b)
#13 0x0000000002534594
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x2534594)
#14 0x0000000002f4010f (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x2f4010f)
#15 0x0000000002f3d6c2
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x2f3d6c2)
#16 0x00000000039300d4 clang::ParseAST(clang::Sema&, bool, bool)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x39300d4)
#17 0x00000000029c4727 clang::FrontendAction::Execute()
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x29c4727)
#18 0x00000000029607c1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x29607c1)
#19 0x0000000002a5d12a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x2a5d12a)
#20 0x00000000009babc7 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x9babc7)
#21 0x00000000009b8eb1 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x9b8eb1)
#22 0x00000000009b8cb7 main
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x9b8cb7)
#23 0x00007fea823510b3 __libc_start_main
/build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:342:3
#24 0x00000000009b5f4e _start
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x9b5f4e)
clang-11: error: unable to execute command: Segmentation fault (core dumped)
clang-11: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
0160ad802e899c2922bc9b29564080c22eb0908c)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin
clang-11: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-11: note: diagnostic msg: /tmp/13-787c82.c
clang-11: note: diagnostic msg: /tmp/13-787c82.sh
clang-11: note: diagnostic msg:
********************</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>