summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode
diff options
context:
space:
mode:
authorFilipe Cabecinhas <me@filcab.net>2015-11-03 13:48:26 +0000
committerFilipe Cabecinhas <me@filcab.net>2015-11-03 13:48:26 +0000
commit7aae2f23c85feab28bc2f47c11067bd6f11af7f6 (patch)
treeb584bbe970d6c21414e245edbd0bb23d7c5efb36 /llvm/test/Bitcode
parentf3e167af4b714487982208cb4b94218cdfbb75c1 (diff)
downloadbcm5719-llvm-7aae2f23c85feab28bc2f47c11067bd6f11af7f6.tar.gz
bcm5719-llvm-7aae2f23c85feab28bc2f47c11067bd6f11af7f6.zip
Don't assert if materializing before seeing any function bodies
This assert was reachable from user input. A minimized test case (no FUNCTION_BLOCK_ID record) is attached. Bug found with afl-fuzz llvm-svn: 251910
Diffstat (limited to 'llvm/test/Bitcode')
-rw-r--r--llvm/test/Bitcode/Inputs/invalid-no-function-block.bcbin0 -> 548 bytes
-rw-r--r--llvm/test/Bitcode/invalid.test5
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/Inputs/invalid-no-function-block.bc b/llvm/test/Bitcode/Inputs/invalid-no-function-block.bc
new file mode 100644
index 00000000000..52b65588e4a
--- /dev/null
+++ b/llvm/test/Bitcode/Inputs/invalid-no-function-block.bc
Binary files differ
diff --git a/llvm/test/Bitcode/invalid.test b/llvm/test/Bitcode/invalid.test
index 69104046df2..24ccd8bccd5 100644
--- a/llvm/test/Bitcode/invalid.test
+++ b/llvm/test/Bitcode/invalid.test
@@ -207,3 +207,8 @@ RUN: not llvm-dis -disable-output %p/Inputs/invalid-alias-type-mismatch.bc 2>&1
RUN: FileCheck --check-prefix=ALIAS-TYPE-MISMATCH %s
ALIAS-TYPE-MISMATCH: Alias and aliasee types don't match
+
+RUN: not llvm-dis -disable-output %p/Inputs/invalid-no-function-block.bc 2>&1 | \
+RUN: FileCheck --check-prefix=NO-FUNCTION-BLOCK %s
+
+NO-FUNCTION-BLOCK: Trying to materialize functions before seeing function blocks
OpenPOWER on IntegriCloud