diff options
| author | Filipe Cabecinhas <me@filcab.net> | 2015-05-30 00:17:20 +0000 |
|---|---|---|
| committer | Filipe Cabecinhas <me@filcab.net> | 2015-05-30 00:17:20 +0000 |
| commit | 14e686774d8807265d921ff0c2d1e8ac8e1ab072 (patch) | |
| tree | 588968e09e07d5037e0c3244cd81903616c8d896 /llvm/test | |
| parent | b82e33106bdfcace762c441f628f1125ae6a0957 (diff) | |
| download | bcm5719-llvm-14e686774d8807265d921ff0c2d1e8ac8e1ab072.tar.gz bcm5719-llvm-14e686774d8807265d921ff0c2d1e8ac8e1ab072.zip | |
[BitcodeReader] Change an assert to a call to a call to Error()
It's reachable from user input.
Bug found with AFL fuzz.
llvm-svn: 238633
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Bitcode/Inputs/invalid-metadata-not-followed-named-node.bc | bin | 0 -> 878 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-metadata-not-followed-named-node.bc b/llvm/test/Bitcode/Inputs/invalid-metadata-not-followed-named-node.bc Binary files differnew file mode 100644 index 00000000000..42a2c3e65fe --- /dev/null +++ b/llvm/test/Bitcode/Inputs/invalid-metadata-not-followed-named-node.bc diff --git a/llvm/test/Bitcode/invalid.test b/llvm/test/Bitcode/invalid.test index eb7f979d574..43f7c77d598 100644 --- a/llvm/test/Bitcode/invalid.test +++ b/llvm/test/Bitcode/invalid.test @@ -187,3 +187,8 @@ RUN: not llvm-dis -disable-output %p/Inputs/invalid-array-operand-encoding.bc 2> RUN: FileCheck --check-prefix=ARRAY-OP-ENC %s ARRAY-OP-ENC: Array element type has to be an encoding of a type + +RUN: not llvm-dis -disable-output %p/Inputs/invalid-metadata-not-followed-named-node.bc 2>&1 | \ +RUN: FileCheck --check-prefix=META-NOT-FOLLOWED-BY-NAMED-META %s + +META-NOT-FOLLOWED-BY-NAMED-META: METADATA_NAME not followed by METADATA_NAMED_NODE |

