diff options
author | Filipe Cabecinhas <me@filcab.net> | 2015-04-30 01:13:31 +0000 |
---|---|---|
committer | Filipe Cabecinhas <me@filcab.net> | 2015-04-30 01:13:31 +0000 |
commit | 9a19e56306a4fd2a08e89d51fad3fb6abb8a3c64 (patch) | |
tree | 374fe16c74fff3f85b43bc5eca8d021836d6a52c /llvm/test/Bitcode | |
parent | 4b828d35fdf85c384170f930dcbf3013d22f1eb2 (diff) | |
download | bcm5719-llvm-9a19e56306a4fd2a08e89d51fad3fb6abb8a3c64.tar.gz bcm5719-llvm-9a19e56306a4fd2a08e89d51fad3fb6abb8a3c64.zip |
Make sure Op->getType() is a PointerType before we cast<> it.
Bug found with AFL fuzz.
llvm-svn: 236193
Diffstat (limited to 'llvm/test/Bitcode')
-rw-r--r-- | llvm/test/Bitcode/Inputs/invalid-load-pointer-type.bc | bin | 0 -> 452 bytes | |||
-rw-r--r-- | llvm/test/Bitcode/invalid.test | 5 |
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/Inputs/invalid-load-pointer-type.bc b/llvm/test/Bitcode/Inputs/invalid-load-pointer-type.bc Binary files differnew file mode 100644 index 00000000000..b6a56c55b3b --- /dev/null +++ b/llvm/test/Bitcode/Inputs/invalid-load-pointer-type.bc diff --git a/llvm/test/Bitcode/invalid.test b/llvm/test/Bitcode/invalid.test index 077f3515128..4aff5c00501 100644 --- a/llvm/test/Bitcode/invalid.test +++ b/llvm/test/Bitcode/invalid.test @@ -117,3 +117,8 @@ 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 + +RUN: not llvm-dis -disable-output %p/Inputs/invalid-load-pointer-type.bc 2>&1 | \ +RUN: FileCheck --check-prefix=LOAD-BAD-TYPE %s + +LOAD-BAD-TYPE: Load operand is not a pointer type |