diff options
author | Filipe Cabecinhas <me@filcab.net> | 2015-04-29 01:27:01 +0000 |
---|---|---|
committer | Filipe Cabecinhas <me@filcab.net> | 2015-04-29 01:27:01 +0000 |
commit | f15fb032efeb9da81f3ca341879b3eccea98b1b6 (patch) | |
tree | 83c5377aa61d7c3a6860ecc3674710d2bd9f3552 /llvm/test | |
parent | 180b92168dd61c0d6c61eaa241c3c21bd892a19b (diff) | |
download | bcm5719-llvm-f15fb032efeb9da81f3ca341879b3eccea98b1b6.tar.gz bcm5719-llvm-f15fb032efeb9da81f3ca341879b3eccea98b1b6.zip |
Make sure that isValidElementType(Type) before calling {Array,Struct}Type::get(Type)
Bug found with AFL fuzz.
llvm-svn: 236073
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/Bitcode/Inputs/invalid-array-element-type.bc | bin | 0 -> 452 bytes | |||
-rw-r--r-- | llvm/test/Bitcode/Inputs/invalid-vector-element-type.bc | bin | 0 -> 452 bytes | |||
-rw-r--r-- | llvm/test/Bitcode/invalid.test | 7 |
3 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/Inputs/invalid-array-element-type.bc b/llvm/test/Bitcode/Inputs/invalid-array-element-type.bc Binary files differnew file mode 100644 index 00000000000..3ce4ba2f77d --- /dev/null +++ b/llvm/test/Bitcode/Inputs/invalid-array-element-type.bc diff --git a/llvm/test/Bitcode/Inputs/invalid-vector-element-type.bc b/llvm/test/Bitcode/Inputs/invalid-vector-element-type.bc Binary files differnew file mode 100644 index 00000000000..9c6c625c918 --- /dev/null +++ b/llvm/test/Bitcode/Inputs/invalid-vector-element-type.bc diff --git a/llvm/test/Bitcode/invalid.test b/llvm/test/Bitcode/invalid.test index 89cd0e908f0..6dfab58375e 100644 --- a/llvm/test/Bitcode/invalid.test +++ b/llvm/test/Bitcode/invalid.test @@ -98,3 +98,10 @@ RUN: not llvm-dis -disable-output %p/Inputs/invalid-fwdref-type-mismatch.bc 2>&1 RUN: FileCheck --check-prefix=FWDREF-TYPE %s FWDREF-TYPE: Invalid record + +RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-element-type.bc 2>&1 | \ +RUN: FileCheck --check-prefix=ELEMENT-TYPE %s +RUN: not llvm-dis -disable-output %p/Inputs/invalid-vector-element-type.bc 2>&1 | \ +RUN: FileCheck --check-prefix=ELEMENT-TYPE %s + +ELEMENT-TYPE: Invalid type |