[llvm-bugs] [Bug 28870] New: Clang crashes after r277787 when compiling OpenTCP-1.0.4

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 5 06:26:05 PDT 2016


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

            Bug ID: 28870
           Summary: Clang crashes after r277787 when compiling
                    OpenTCP-1.0.4
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gaborb at inf.u-szeged.hu
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16889
  --> https://llvm.org/bugs/attachment.cgi?id=16889&action=edit
Preprocessed source file

We run daily CSiBE code size benchmarks testing trunk Clang.
After r277787 we get a crash when trying to compile one of the test files in
OpenTCP-1.0.4

I copy the message we get (including the stacktrace).
I also attach the preprocessed source and the run script.

#0 0x0000000001941045 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x1941045)
#1 0x000000000193f1fe llvm::sys::RunSignalHandlers()
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x193f1fe)
#2 0x000000000193f33a SignalHandler(int)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x193f33a)
#3 0x00002af7c08fd330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x0000000002c4b6d8 clang::Expr::IgnoreParens()
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x2c4b6d8)
#5 0x0000000002c4c1bd clang::Expr::IgnoreParenImpCasts()
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x2c4c1bd)
#6 0x00000000024da488 clang::Sema::CheckMemaccessArguments(clang::CallExpr
const*, unsigned int, clang::IdentifierInfo*)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x24da488)
#7 0x00000000024db229 clang::Sema::CheckFunctionCall(clang::FunctionDecl*,
clang::CallExpr*, clang::FunctionProtoType const*)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x24db229)
#8 0x00000000026411c0 clang::Sema::BuildResolvedCallExpr(clang::Expr*,
clang::NamedDecl*, clang::SourceLocation, llvm::ArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x26411c0)
#9 0x00000000026416c9 clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*,
clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x26416c9)
#10 0x0000000002300e36
clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*,
true>)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x2300e36)
#11 0x00000000022fb7eb clang::Parser::ParseCastExpression(bool, bool, bool&,
clang::Parser::TypeCastState)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x22fb7eb)
#12 0x00000000022fdfbd clang::Parser::ParseCastExpression(bool, bool,
clang::Parser::TypeCastState)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x22fdfbd)
#13 0x00000000022fe721
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x22fe721)
#14 0x00000000022fe059
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x22fe059)
#15 0x00000000022fe0c9
clang::Parser::ParseExpression(clang::Parser::TypeCastState)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x22fe0c9)
#16 0x000000000233df06 clang::Parser::ParseExprStatement()
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x233df06)
#17 0x000000000233b7f7
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x233b7f7)
#18 0x000000000233b97d
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x233b97d)
#19 0x00000000023384b9 clang::Parser::ParseCompoundStatementBody(bool)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x23384b9)
#20 0x00000000023405d9 clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x23405d9)
#21 0x00000000022c5e84
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x22c5e84)
#22 0x00000000022e1083 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
unsigned int, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x22e1083)
#23 0x00000000022c1462
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x22c1462)
#24 0x00000000022c1b2e
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x22c1b2e)
#25 0x00000000022c65a3
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x22c65a3)
#26 0x00000000022c70fb
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x22c70fb)
#27 0x00000000022bebb3 clang::ParseAST(clang::Sema&, bool, bool)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x22bebb3)
#28 0x0000000001d56b9e clang::FrontendAction::Execute()
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x1d56b9e)
#29 0x0000000001d34095
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x1d34095)
#30 0x0000000001dd30bc
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x1dd30bc)
#31 0x0000000000963030 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*)
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x963030)
#32 0x00000000008fcf00 main
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x8fcf00)
#33 0x00002af7c1992f45 __libc_start_main
/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0
#34 0x000000000095f489 _start
(/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0+0x95f489)
Stack dump:
0.      Program arguments:
/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/clang-4.0
-cc1 -triple thumbv7em-none--eabi -emit-obj -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name pop3_client.c
-mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno
-masm-verbose -mconstructor-aliases -target-cpu cortex-m4 -target-feature
+soft-float-abi -target-feature +strict-align -target-abi aapcs -mfloat-abi
soft -dwarf-column-info -debugger-tuning=gdb -coverage-file
/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk-cortex-m4/gen/CSiBE-v2.1.1/OpenTCP-1.0.4/CMakeFiles/OpenTCP-1.0.4.dir/__/__/__/src/CSiBE-v2.1.1/CSiBE/src/OpenTCP-1.0.4/pop3/pop3_client.c.obj
-resource-dir
/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin/../lib/clang/4.0.0
-I
/home/bgabor/work/csibe/sandbox/clang-trunk/csibe/src/CSiBE-v2.1.1/CSiBE/src/OpenTCP-1.0.4/include
-D _CSiBE_CLANG_ -D __IO_NEAR -D __io= -Os -fdebug-compilation-dir
/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk-cortex-m4/gen/CSiBE-v2.1.1/OpenTCP-1.0.4
-ferror-limit 19 -fmessage-length 117 -fallow-half-arguments-and-returns
-fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -vectorize-slp -o
CMakeFiles/OpenTCP-1.0.4.dir/__/__/__/src/CSiBE-v2.1.1/CSiBE/src/OpenTCP-1.0.4/pop3/pop3_client.c.obj
-x c
/home/bgabor/work/csibe/sandbox/clang-trunk/csibe/src/CSiBE-v2.1.1/CSiBE/src/OpenTCP-1.0.4/pop3/pop3_client.c 
1.     
/home/bgabor/work/csibe/sandbox/clang-trunk/csibe/src/CSiBE-v2.1.1/CSiBE/src/OpenTCP-1.0.4/pop3/pop3_client.c:1135:19:
current parser token ')'
2.     
/home/bgabor/work/csibe/sandbox/clang-trunk/csibe/src/CSiBE-v2.1.1/CSiBE/src/OpenTCP-1.0.4/pop3/pop3_client.c:1119:1:
parsing function body 'pop3c_sendlist'
3.     
/home/bgabor/work/csibe/sandbox/clang-trunk/csibe/src/CSiBE-v2.1.1/CSiBE/src/OpenTCP-1.0.4/pop3/pop3_client.c:1119:1:
in compound statement ('{}')
clang-4.0: error: unable to execute command: Segmentation fault (core dumped)
clang-4.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 4.0.0 (trunk 277787) (llvm/trunk 277793)
Target: arm-none--eabi
Thread model: posix
InstalledDir:
/home/bgabor/work/csibe/sandbox/clang-trunk/build/build/clang-trunk/bin
clang-4.0: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-4.0: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-4.0: note: diagnostic msg: /tmp/pop3_client-682c6f.c
clang-4.0: note: diagnostic msg: /tmp/pop3_client-682c6f.sh
clang-4.0: 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/20160805/b546abcc/attachment.html>


More information about the llvm-bugs mailing list