[LLVMbugs] [Bug 16344] New: Crash on parsing customized "vfprintf"
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jun 17 00:59:24 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16344
Bug ID: 16344
Summary: Crash on parsing customized "vfprintf"
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: wenhan.gu at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
$ cat test.c
void vfprintf() {} // Only one line in source
This only occurs for this function. If I write "void fprintf();", everything
works except for warning.
Clang 3.2 is good for this too.
$ clang -c test.c
test.c:1:6: warning: incompatible redeclaration of library function 'vfprintf'
[-Wincompatible-library-redeclaration]
void vfprintf() {}
^
test.c:1:6: note: 'vfprintf' is a builtin with type 'int ()'
0 clang 0x0000000002454ef2 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1 clang 0x0000000002456f42
2 libpthread.so.0 0x00007f723963e8f0
3 clang 0x0000000000b8b38e
clang::Sema::ActOnStartOfFunctionDef(clang::Scope*, clang::Decl*) + 2814
4 clang 0x0000000000a63342
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Pars
er::LateParsedAttrList*) + 4930
5 clang 0x0000000000a788a9
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRa
ngeInit*) + 2521
6 clang 0x0000000000a5e139
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang
::AccessSpecifier) + 249
7 clang 0x0000000000a5e83e
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*,
clang::AccessSpecifier) + 1022
8 clang 0x0000000000a5fb71
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 97
9 clang 0x0000000000a60612
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 194
10 clang 0x0000000000a56d60 clang::ParseAST(clang::Sema&, bool, bool)
+ 288
11 clang 0x00000000008acc05 clang::CodeGenAction::ExecuteAction() +
101
12 clang 0x000000000071d359 clang::FrontendAction::Execute() + 313
13 clang 0x00000000006f92e5
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 341
14 clang 0x00000000006dd997
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1543
15 clang 0x00000000006d3408 cc1_main(char const**, char const**, char
const*, void*) + 1272
16 clang 0x00000000006db493 main + 7651
17 libc.so.6 0x00007f723870dc4d __libc_start_main + 253
18 clang 0x00000000006d2d29
Stack dump:
0. Program arguments: /proj/mtk03872/usr/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
test.c -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.20.1 -coverage-file /proj/mtk03872/test.o -resource-dir
/proj/mtk03872/usr/bin/../lib/clang/3.4 -internal-isystem /usr/local/include
-internal-isystem /proj/mtk03872/usr/bin/../lib/clang/3.4/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir /proj/mtk03872 -ferror-limit 19 -fmessage-length 157
-mstackrealign -fobjc-runtime=gcc -fobjc-default-synthesize-properties
-fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops
-o test.o -x c test.c
1. test.c:1:17: current parser token '{'
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (http://llvm.org/git/clang.git
375a040d49049c90b29b80cde480025f4ba5a717) (http://llvm.org/git/llvm.git
7338de37a802970857079b5a532c5dd50d0a6d5d)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: 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: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/test-WpMbm8.c
clang: note: diagnostic msg: /tmp/test-WpMbm8.sh
clang: 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/20130617/7644d674/attachment.html>
More information about the llvm-bugs
mailing list