Issue |
101582
|
Summary |
[llvm-lit] FileCheck crashing when checking an empty file
|
Labels |
new issue
|
Assignees |
|
Reporter |
connieyzhu
|
When piping an empty file into FileCheck and using the CHECK-EMPTY directive, FileCheck crashes.
The crash occurred when running the following lines:
```
# RUN: touch %t
# RUN: cat %t | FileCheck %s --allow-empty
# CHECK-EMPTY:
```
The crash gives this error message:
```
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 62: # | FileCheck: /usr/local/google/home/connieyzhu/llvm-fork/llvm/lib/FileCheck/FileCheck.cpp:1848: bool llvm::FileCheck::readCheckFile(SourceMgr &, StringRef, std::pair<unsigned int, unsigned int> *): Assertion `AfterSuffix.data() >= Buffer.data() && AfterSuffix.data() < Buffer.data() + Buffer.size() && "Parsing after suffix doesn't start inside of buffer!"' failed.
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 63: # | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 64: # | Stack dump:
# | check:24'0 ~~~~~~~~~~~~~~~~
# | 65: # | 0. Program arguments: FileCheck /usr/local/google/home/connieyzhu/llvm-fork/build/utils/lit/tests/Inputs/shtest-cat/cat-empty.txt --allow-empty
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 66: # | #0 0x000055abcd1c5078 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /usr/local/google/home/connieyzhu/llvm-fork/llvm/lib/Support/Unix/Signals.inc:723:13
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 67: # `-----------------------------
# | check:24'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 68: # error: command failed with exit status: -6
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs