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

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 19 19:09:47 PDT 2020


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

            Bug ID: 47245
           Summary: [10/11] error: unable to execute command: Segmentation
                    fault (core dumped)
           Product: new-bugs
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          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 test8793.c 

typedef unsigned char type_x ; 
typedef unsigned char type_y ; 

void foo ( ) { 

    typedef struct 
    { 
        struct bar {} type_x ; 
        typedef struct bar {} type_y ; 
    } baz ; 

    struct bar {} ; 

}

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

$ 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 test8793.c 
test8793.c:10:9: error: type name does not allow storage class to be specified
        typedef struct bar {} type_y ; 
        ^
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 test8793.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-25-25
-ferror-limit 19 -fmessage-length 0 -fgnuc-version=4.2.1 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -faddrsig -o
/tmp/test8793-c45ed3.o -x c test8793.c 
1.      test8793.c:13:19: current parser token ';'
2.      test8793.c:5:14: parsing function body 'foo'
3.      test8793.c:5:14: in compound statement ('{}')
4.      test8793.c:13:5: parsing struct/union body
 #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 0x00007fe49374f390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
 #4 0x0000000002f2f1a0 clang::Sema::ActOnFields(clang::Scope*,
clang::SourceLocation, clang::Decl*, llvm::ArrayRef<clang::Decl*>,
clang::SourceLocation, clang::SourceLocation, clang::ParsedAttributesView
const&) (/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2f2f1a0)
 #5 0x0000000002d8268c
clang::Parser::ParseStructUnionBody(clang::SourceLocation,
clang::TypeSpecifierType, clang::Decl*)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2d8268c)
 #6 0x0000000002d99add
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2d99add)
 #7 0x0000000002d7d3d1
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2d7d3d1)
 #8 0x0000000002d8154e
clang::Parser::ParseSimpleDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, bool,
clang::Parser::ForRangeInit*, clang::SourceLocation*)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2d8154e)
 #9 0x0000000002d818a5
clang::Parser::ParseDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&,
clang::SourceLocation*)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2d818a5)
#10 0x0000000002df2347
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2df2347)
#11 0x0000000002df24c6
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2df24c6)
#12 0x0000000002df7b52 clang::Parser::ParseCompoundStatementBody(bool)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2df7b52)
#13 0x0000000002df9033 clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2df9033)
#14 0x0000000002d5f016
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2d5f016)
#15 0x0000000002d80e0b clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2d80e0b)
#16 0x0000000002d58fed
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2d58fed)
#17 0x0000000002d59881
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) (.part.212.constprop.216)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2d59881)
#18 0x0000000002d598bf
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2d598bf)
#19 0x0000000002d5fda0
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2d5fda0)
#20 0x0000000002d60800
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2d60800)
#21 0x0000000002d54dcd clang::ParseAST(clang::Sema&, bool, bool)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x2d54dcd)
#22 0x0000000001f63681 clang::FrontendAction::Execute()
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x1f63681)
#23 0x0000000001f25770
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x1f25770)
#24 0x000000000200a8eb
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x200a8eb)
#25 0x00000000009cbf11 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x9cbf11)
#26 0x00000000009c9a27 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x9c9a27)
#27 0x000000000095edab main
(/home/tom/Documents/llvm/10.0.1/install/bin/clang-10+0x95edab)
#28 0x00007fe4924ac840 __libc_start_main
/build/glibc-e6zv40/glibc-2.23/csu/../csu/libc-start.c:325:0
#29 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/test8793-637052.c
clang-10: note: diagnostic msg: /tmp/test8793-637052.sh
clang-10: note: diagnostic msg: 

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

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

$ clang-11 --version
clang version 11.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin

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

$ clang-11 test8793.c 
test8793.c:10:9: error: type name does not allow storage class to be specified
        typedef struct bar {} type_y ; 
        ^
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/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.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 test8793.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
/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/lib/clang/11.0.0
-internal-isystem /usr/local/include -internal-isystem
/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.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
/home/tom/Documents/git/ESmith-FoundBugs/esmith-bugs/0816/FoundBugs2020-11/round-2020.08.15_06-25-25
-ferror-limit 19 -fgnuc-version=4.2.1 -fcolor-diagnostics -faddrsig -o
/tmp/test8793-b7749c.o -x c test8793.c 
1.      test8793.c:13:19: current parser token ';'
2.      test8793.c:5:14: parsing function body 'foo'
3.      test8793.c:5:14: in compound statement ('{}')
4.      test8793.c:13:5: parsing struct/union body
 #0 0x00000000022c4414 PrintStackTraceSignalHandler(void*)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x22c4414)
 #1 0x00000000022c219e llvm::sys::RunSignalHandlers()
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x22c219e)
 #2 0x00000000022c4715 SignalHandler(int)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x22c4715)
 #3 0x00007f8dfbdac390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
 #4 0x000000000435dbf4 clang::RecordDecl::field_begin() const
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x435dbf4)
 #5 0x00000000039699c5
clang::Parser::ParseStructUnionBody(clang::SourceLocation,
clang::TypeSpecifierType, clang::RecordDecl*)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x39699c5)
 #6 0x000000000397bb05
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x397bb05)
 #7 0x000000000395d973
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x395d973)
 #8 0x000000000395d344
clang::Parser::ParseSimpleDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, bool,
clang::Parser::ForRangeInit*, clang::SourceLocation*)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x395d344)
 #9 0x000000000395ce7a
clang::Parser::ParseDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&,
clang::SourceLocation*)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x395ce7a)
#10 0x00000000039e06da
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x39e06da)
#11 0x00000000039e01de
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x39e01de)
#12 0x00000000039e7e81 clang::Parser::ParseCompoundStatementBody(bool)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x39e7e81)
#13 0x00000000039e9015 clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x39e9015)
#14 0x000000000394a0d8
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x394a0d8)
#15 0x0000000003962c72 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x3962c72)
#16 0x000000000394930d
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x394930d)
#17 0x0000000003948df5
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x3948df5)
#18 0x0000000003947e46
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x3947e46)
#19 0x000000000394618f
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x394618f)
#20 0x000000000394205d clang::ParseAST(clang::Sema&, bool, bool)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x394205d)
#21 0x00000000029d5ea7 clang::FrontendAction::Execute()
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x29d5ea7)
#22 0x000000000296fb01
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x296fb01)
#23 0x0000000002a6da2c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x2a6da2c)
#24 0x00000000009b40b2 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x9b40b2)
#25 0x00000000009b2881 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x9b2881)
#26 0x00000000009b2680 main
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x9b2680)
#27 0x00007f8dfa89e840 __libc_start_main
/build/glibc-e6zv40/glibc-2.23/csu/../csu/libc-start.c:325:0
#28 0x00000000009af879 _start
(/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.04/bin/clang-11+0x9af879)
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
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/home/tom/Documents/llvm/clang+llvm-11.0.0-rc1-x86_64-linux-gnu-ubuntu-16.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/test8793-ca3cf3.c
clang-11: note: diagnostic msg: /tmp/test8793-ca3cf3.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/20200820/4d40c480/attachment-0001.html>


More information about the llvm-bugs mailing list