[llvm-bugs] [Bug 51356] New: [11/12] error: unable to execute command: Segmentation fault (core dumped)

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 5 06:27:26 PDT 2021


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

            Bug ID: 51356
           Summary: [11/12] error: unable to execute command: Segmentation
                    fault (core dumped)
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: anbu1024.me at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

$ cat 14.c 

void foo(
    enum E, 
    struct S
        {
        enum E { Monday } x;
    }
)
{
  return;
}

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

$ 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 14.c 
14.c:3:10: warning: declaration of 'enum E' will not be visible outside of this
function [-Wvisibility]
    enum E, 
         ^
14.c:4:12: warning: declaration of 'struct S' will not be visible outside of
this function [-Wvisibility]
    struct S
           ^
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: /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 14.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/14-4f98f9.o -x c 14.c
1.      14.c:9:1: current parser token '{'
 #0 0x000055dbcc4e3b01 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x1ccbb01)
 #1 0x000055dbcc4e18c4 llvm::sys::RunSignalHandlers()
(/path-to-llvm/12.0.1/install/bin/clang-12+0x1cc98c4)
 #2 0x000055dbcc4e1a3b SignalHandler(int)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x1cc9a3b)
 #3 0x00007fc551b143c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
 #4 0x000055dbcef9aa68 clang::DeclContext::removeDecl(clang::Decl*)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x4782a68)
 #5 0x000055dbce558ece clang::Sema::ActOnFunctionDeclarator(clang::Scope*,
clang::Declarator&, clang::DeclContext*, clang::TypeSourceInfo*,
clang::LookupResult&, llvm::MutableArrayRef<clang::TemplateParameterList*>,
bool&) (/path-to-llvm/12.0.1/install/bin/clang-12+0x3d40ece)
 #6 0x000055dbce55ddc3 clang::Sema::HandleDeclarator(clang::Scope*,
clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x3d45dc3)
 #7 0x000055dbce560c0c clang::Sema::ActOnStartOfFunctionDef(clang::Scope*,
clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>,
clang::Sema::SkipBodyInfo*)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x3d48c0c)
 #8 0x000055dbce276ab5
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x3a5eab5)
 #9 0x000055dbce2a4cbf clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x3a8ccbf)
#10 0x000055dbce271382
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x3a59382)
#11 0x000055dbce2719b5
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) (.part.0)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x3a599b5)
#12 0x000055dbce27b1d0
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) (.localalias)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x3a631d0)
#13 0x000055dbce27b515
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x3a63515)
#14 0x000055dbce27bb0a
clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x3a63b0a)
#15 0x000055dbce26a71a clang::ParseAST(clang::Sema&, bool, bool)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x3a5271a)
#16 0x000055dbcd48d146 clang::CodeGenAction::ExecuteAction()
(/path-to-llvm/12.0.1/install/bin/clang-12+0x2c75146)
#17 0x000055dbcce0fc31 clang::FrontendAction::Execute()
(/path-to-llvm/12.0.1/install/bin/clang-12+0x25f7c31)
#18 0x000055dbccdac99b
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x259499b)
#19 0x000055dbccee1ae0
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x26c9ae0)
#20 0x000055dbcb3321bb cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/path-to-llvm/12.0.1/install/bin/clang-12+0xb1a1bb)
#21 0x000055dbcb32f9cb ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/path-to-llvm/12.0.1/install/bin/clang-12+0xb179cb)
#22 0x000055dbcb2b276e main
(/path-to-llvm/12.0.1/install/bin/clang-12+0xa9a76e)
#23 0x00007fc5515e20b3 __libc_start_main
/build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:342:3
#24 0x000055dbcb32f55e _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/14-a8adc0.c
clang-12: note: diagnostic msg: /tmp/14-a8adc0.sh
clang-12: note: diagnostic msg: 

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

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

$ clang-1100 --version
clang version 11.0.0 (https://github.com/llvm/llvm-project.git
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 14.c 
14.c:3:10: warning: declaration of 'enum E' will not be visible outside of this
function [-Wvisibility]
    enum E, 
         ^
14.c:4:12: warning: declaration of 'struct S' will not be visible outside of
this function [-Wvisibility]
    struct S
           ^
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:
/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 14.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/14-4f7cf1.o -x c 14.c 
1.      14.c:9:1: current parser token '{'
 #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 0x00007fb6aab9a3c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
 #4 0x0000000004343593 clang::DeclContext::removeDecl(clang::Decl*)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x4343593)
 #5 0x0000000003b2e7e0 clang::Sema::ActOnFunctionDeclarator(clang::Scope*,
clang::Declarator&, clang::DeclContext*, clang::TypeSourceInfo*,
clang::LookupResult&, llvm::MutableArrayRef<clang::TemplateParameterList*>,
bool&)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x3b2e7e0)
 #6 0x0000000003b2981b clang::Sema::HandleDeclarator(clang::Scope*,
clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x3b2981b)
 #7 0x0000000003b4f69b clang::Sema::ActOnStartOfFunctionDef(clang::Scope*,
clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>,
clang::Sema::SkipBodyInfo*)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x3b4f69b)
 #8 0x00000000039376d4
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x39376d4)
 #9 0x000000000395077a clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x395077a)
#10 0x0000000003936f7d
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x3936f7d)
#11 0x0000000003936a65
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x3936a65)
#12 0x0000000003935ab6
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x3935ab6)
#13 0x0000000003933dff
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x3933dff)
#14 0x00000000039337d7
clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x39337d7)
#15 0x000000000393009e 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+0x393009e)
#16 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)
#17 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)
#18 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)
#19 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)
#20 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)
#21 0x00000000009b8cb7 main
(/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang-11+0x9b8cb7)
#22 0x00007fb6aa60f0b3 __libc_start_main
/build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:342:3
#23 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 (https://github.com/llvm/llvm-project.git
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/14-a2eff6.c
clang-11: note: diagnostic msg: /tmp/14-a2eff6.sh
clang-11: 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/20210805/c0d0a487/attachment-0001.html>


More information about the llvm-bugs mailing list