summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2018-01-16 08:09:24 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2018-01-16 08:09:24 +0000
commit83e63d96a9a949d3f2fcee6f663c4e4923b9da6f (patch)
tree59be13b941e3e3636605b4a2e606483b6e193f3b /llvm/test
parent035dd256d52c0904cf7bc97bcbf156bd4bf008ca (diff)
downloadbcm5719-llvm-83e63d96a9a949d3f2fcee6f663c4e4923b9da6f.tar.gz
bcm5719-llvm-83e63d96a9a949d3f2fcee6f663c4e4923b9da6f.zip
[FileCheck] - Fix possible buffer out of bounds access when parsing --check-prefix.
FileCheck tool crashes when trying to parse --check-prefix argument if there is no any data after it. For example test like following would crash if there are no symbols and no EOL mark after `boom`: # REQUIRES: x86 # RUN: <skipped few lines> # RUN: llvm-readobj -t %t | FileCheck %s --check-prefix=boom Patch fixes the issue. Differential revision: https://reviews.llvm.org/D42057 llvm-svn: 322536
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/FileCheck/check-empty2.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/test/FileCheck/check-empty2.txt b/llvm/test/FileCheck/check-empty2.txt
new file mode 100644
index 00000000000..8b9737022e6
--- /dev/null
+++ b/llvm/test/FileCheck/check-empty2.txt
@@ -0,0 +1,4 @@
+; Check that tool does not crash when there is no any data
+; in file after -check-prefix=PREFIX option.
+
+; RUN: not FileCheck -input-file %s %s -check-prefix=A \ No newline at end of file
OpenPOWER on IntegriCloud