[LLVMbugs] [Bug 17984] New: clang-check: Assertion failed: "We got inaccurate FileSize value or fstat reported an invalid file size.", function getOpenFileImpl, MemoryBuffer.cpp, line 394
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Nov 18 12:30:15 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=17984
Bug ID: 17984
Summary: clang-check: Assertion failed: "We got inaccurate
FileSize value or fstat reported an invalid file
size.", function getOpenFileImpl, MemoryBuffer.cpp,
line 394
Product: new-bugs
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: sean at rogue-research.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
I'm just trying clang-check for the first time (in the hopes of automagically
fixing all -Wextra-semi warnings in a codebase). It crashes quite easily:
Assertion failed: (0 && "We got inaccurate FileSize value or fstat reported an
" "invalid file size."), function getOpenFileImpl, file
/Users/sean/llvm/llvm/lib/Support/MemoryBuffer.cpp, line 394.
0 clang-check 0x000000010d461da8 llvm::sys::PrintStackTrace(__sFILE*) +
40
1 clang-check 0x000000010d462304 SignalHandler(int) + 644
2 libsystem_c.dylib 0x00007fff9324b90a _sigtramp + 26
3 libsystem_c.dylib 0x00007fce442f75e0 _sigtramp + 2970270960
4 clang-check 0x000000010d462066 abort + 22
5 clang-check 0x000000010d462041 __assert_rtn + 81
6 clang-check 0x000000010d42c33c getOpenFileImpl(int, char const*,
llvm::OwningPtr<llvm::MemoryBuffer>&, unsigned long long, unsigned long long,
long long, bool) + 1116
7 clang-check 0x000000010d42be62
llvm::MemoryBuffer::getFile(llvm::Twine, llvm::OwningPtr<llvm::MemoryBuffer>&,
long long, bool) + 178
8 clang-check 0x000000010d478cdb
clang::FileManager::getBufferForFile(clang::FileEntry const*, std::string*,
bool) + 715
9 clang-check 0x000000010d488e60
clang::SrcMgr::ContentCache::getBuffer(clang::DiagnosticsEngine&,
clang::SourceManager const&, clang::SourceLocation, bool*) const + 128
10 clang-check 0x000000010de56d00
clang::SourceManager::getBuffer(clang::FileID, clang::SourceLocation, bool*)
const + 160
11 clang-check 0x000000010de5488d
clang::Preprocessor::EnterSourceFile(clang::FileID, clang::DirectoryLookup
const*, clang::SourceLocation) + 173
12 clang-check 0x000000010de4c8aa
clang::Preprocessor::HandleIncludeDirective(clang::SourceLocation,
clang::Token&, clang::DirectoryLookup const*, bool) + 7146
13 clang-check 0x000000010de49658
clang::Preprocessor::HandleDirective(clang::Token&) + 1272
14 clang-check 0x000000010de2c045
clang::Lexer::LexTokenInternal(clang::Token&, bool) + 9333
15 clang-check 0x000000010de28bf1 clang::Lexer::Lex(clang::Token&) + 113
16 clang-check 0x000000010de72e94 clang::Preprocessor::Lex(clang::Token&)
+ 68
17 clang-check 0x000000010d8d00a1
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 721
18 clang-check 0x000000010d8cfacb
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 363
19 clang-check 0x000000010d8ceff8
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2984
20 clang-check 0x000000010d8ce396
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 470
21 clang-check 0x000000010d850ac6 clang::ParseAST(clang::Sema&, bool,
bool) + 438
22 clang-check 0x000000010d6eadd7 clang::FrontendAction::Execute() + 119
23 clang-check 0x000000010d6c679d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 957
24 clang-check 0x000000010d46c5c9
clang::tooling::FrontendActionFactory::runInvocation(clang::CompilerInvocation*,
clang::FileManager*, clang::DiagnosticConsumer*) + 153
25 clang-check 0x000000010d46c522
clang::tooling::ToolInvocation::runInvocation(char const*,
clang::driver::Compilation*, clang::CompilerInvocation*) + 226
26 clang-check 0x000000010d46bdd0 clang::tooling::ToolInvocation::run() +
1904
27 clang-check 0x000000010d46d548
clang::tooling::ClangTool::run(clang::tooling::ToolAction*) + 984
28 clang-check 0x000000010d2e6b46 main + 822
29 libdyld.dylib 0x00007fff8f6d17e1 start + 0
30 libdyld.dylib 0x0000000000000097 start + 1888676022
$ clang-check --version
LLVM (http://llvm.org/):
LLVM version 3.4svn
Optimized build with assertions.
Built Nov 18 2013 (13:19:20).
Default target: x86_64-apple-darwin12.5.0
Host CPU: corei7
$ clang --version
clang version 3.4 (195020)
Target: x86_64-apple-darwin12.5.0
Thread model: posix
I'm invoking it like so: find . -name '*.cxx'|xargs clang-check -fixit
It runs for a while, successfully fixit-ing warnings, then crashes.
I figure it might be because some of the -Wextra-semi warnings that I'm trying
to make it fix are in header files, and thus a header gets changed in size
"unexpectedly" (to the next step).
--
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/20131118/d58a3aa9/attachment.html>
More information about the llvm-bugs
mailing list