summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode/invalid.test
diff options
context:
space:
mode:
authorFilipe Cabecinhas <me@filcab.net>2015-04-30 00:52:42 +0000
committerFilipe Cabecinhas <me@filcab.net>2015-04-30 00:52:42 +0000
commitbad0779f6310af38570f4fcfc68ea876d5e4dca7 (patch)
tree39e5d606a7417e837fe513a953bbaa77c6a78e8c /llvm/test/Bitcode/invalid.test
parent34948e5e22079597714618a724feb70eeaba2609 (diff)
downloadbcm5719-llvm-bad0779f6310af38570f4fcfc68ea876d5e4dca7.tar.gz
bcm5719-llvm-bad0779f6310af38570f4fcfc68ea876d5e4dca7.zip
Make sure we don't resize(0) when we get a fwdref with Idx == UINT_MAX
Make it an error instead. Bug found with AFL fuzz. llvm-svn: 236190
Diffstat (limited to 'llvm/test/Bitcode/invalid.test')
-rw-r--r--llvm/test/Bitcode/invalid.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/invalid.test b/llvm/test/Bitcode/invalid.test
index c18ff3d3f61..077f3515128 100644
--- a/llvm/test/Bitcode/invalid.test
+++ b/llvm/test/Bitcode/invalid.test
@@ -112,3 +112,8 @@ RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-op-not-2nd-to-last.bc
RUN: FileCheck --check-prefix=ARRAY-NOT-2LAST %s
ARRAY-NOT-2LAST: Array op not second to last
+
+RUN: not llvm-dis -disable-output %p/Inputs/invalid-too-big-fwdref.bc 2>&1 | \
+RUN: FileCheck --check-prefix=HUGE-FWDREF %s
+
+HUGE-FWDREF: Invalid record
OpenPOWER on IntegriCloud