<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 --- - MemoryBuffer.cpp:59 assertion failed"
   href="http://llvm.org/bugs/show_bug.cgi?id=15993">15993</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MemoryBuffer.cpp:59 assertion failed
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>release blocker
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>igmar@palsenberg.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>OS : CentOS 6.4 final x86

Error: 

clang assertion : 

clang: MemoryBuffer.cpp:59: void llvm::MemoryBuffer::init(const char*, const
char*, bool): Assertion `(!RequiresNullTerminator || BufEnd[0] == 0) && "Buffer
is not null terminated!"' failed.

Reproducible : yes, reliable

Stacktrace :

r || BufEnd[0] == 0) && "Buffer is not null terminated!"' failed.
0  libLLVM-3.3svn.so 0x03042c8e llvm::sys::PrintStackTrace(_IO_FILE*) + 46
1  libLLVM-3.3svn.so 0x03042ef3
2  libLLVM-3.3svn.so 0x0304371c
3                    0x00110400 __kernel_sigreturn + 0
4                    0x00110424 __kernel_vsyscall + 16
5  libc.so.6         0x00b46b11 gsignal + 81
6  libc.so.6         0x00b483ea abort + 378
7  libc.so.6         0x00b3fdeb
8  libc.so.6         0x00b3fea6
9  libLLVM-3.3svn.so 0x0302e5be
10 libLLVM-3.3svn.so 0x0302efcb llvm::MemoryBuffer::getOpenFile(int, char
const*, llvm::OwningPtr<llvm::MemoryBuffer>&, unsigned long long, unsigned long
long, long long, bool) + 795
11 libLLVM-3.3svn.so 0x0302f348 llvm::MemoryBuffer::getFile(char const*,
llvm::OwningPtr<llvm::MemoryBuffer>&, long long, bool) + 136
12 clang             0x0908fa86
clang::FileManager::getBufferForFile(clang::FileEntry const*, std::string*,
bool) + 406
13 clang             0x090a0141
clang::SrcMgr::ContentCache::getBuffer(clang::DiagnosticsEngine&,
clang::SourceManager const&, clang::SourceLocation, bool*) const + 161
14 clang             0x09117fbb
clang::Preprocessor::EnterSourceFile(clang::FileID, clang::DirectoryLookup
const*, clang::SourceLocation) + 507
15 clang             0x091336c8 clang::Preprocessor::EnterMainSourceFile() + 88
16 clang             0x0855e785 clang::ParseAST(clang::Sema&, bool, bool) + 245
17 clang             0x081d5450 clang::ASTFrontendAction::ExecuteAction() + 112
18 clang             0x08389dc9 clang::CodeGenAction::ExecuteAction() + 73
19 clang             0x081d5828 clang::FrontendAction::Execute() + 312
20 clang             0x081aa0c2
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 306
21 clang             0x0818f604
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1076
22 clang             0x08183606 cc1_main(char const**, char const**, char
const*, void*) + 1318
23 clang             0x0818cc16 main + 6790
24 libc.so.6         0x00b32ce6 __libc_start_main + 230
25 clang             0x08182ea1
Stack dump:
0.    Program arguments: /usr/bin/clang -cc1 -triple i386-redhat-linux-gnu
-emit-obj -mrelax-all -disable-free -main-file-name lexer.c -mrelocation-model
static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-target-cpu corei7-avx -target-linker-version 2.22 -g -coverage-file
/home/igmar/fwtk.git/src/parsers/native/lexer.o -resource-dir
/usr/bin/../lib/clang/3.3 -dependency-file parsers/native/lexer.d -MT
parsers/native/lexer.o -sys-header-deps -D _POSIX_C_SOURCE=199309L -D
_BSD_SOURCE -D DEBUG -I . -I parsers/native -internal-isystem
/usr/local/include -internal-isystem /usr/bin/../lib/clang/3.3/include
-internal-externc-isystem /usr/include -internal-externc-isystem
/usr/lib/gcc/i686-redhat-linux/4.4.4/include -O0 -Wall -Werror -std=gnu99
-fdebug-compilation-dir /home/igmar/fwtk.git/src -ferror-limit 19
-fmessage-length 80 -mstackrealign -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fdiagnostics-show-option
-fcolor-diagnostics -backend-option -vectorize-loops -o parsers/native/lexer.o
-x c parsers/native/lexer.c
1.    <eof> parser at end of file
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
2972d049637349bb82f52a27ad3337cf4ab769b4) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
02066838b5cdf17277267e79ffbc9459a58cdd59)
Target: i386-redhat-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang: error: unable to execute command: Aborted
clang: note: diagnostic msg: Error generating preprocessed source(s).</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>