<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - clang-check: Assertion failed: "We got inaccurate FileSize value or fstat reported an invalid file size.", function getOpenFileImpl, MemoryBuffer.cpp, line 394"
   href="http://llvm.org/bugs/show_bug.cgi?id=17984">17984</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-check: Assertion failed: "We got inaccurate FileSize value or fstat reported an invalid file size.", function getOpenFileImpl, MemoryBuffer.cpp, line 394
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sean@rogue-research.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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 (<a href="http://llvm.org/">http://llvm.org/</a>):
  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).</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>