summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode/invalid-functionptr-align.ll
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2019-08-07 17:20:55 +0000
committerFlorian Hahn <flo@fhahn.com>2019-08-07 17:20:55 +0000
commitd8c3c173945e7653b76e0326868464bad2130482 (patch)
tree4cec7ffe14e7e3d89577973a50e3b5e69e942456 /llvm/test/Bitcode/invalid-functionptr-align.ll
parentfa2f4395e901df27b77daa0b708c788d4b8d4316 (diff)
downloadbcm5719-llvm-d8c3c173945e7653b76e0326868464bad2130482.tar.gz
bcm5719-llvm-d8c3c173945e7653b76e0326868464bad2130482.zip
[DataLayout] Check StackNatural and FunctionPtr alignments.
MaybeAlignment asserts that the passed in value is == 0 or a power of 2. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16272 Reviewers: michaelplatings, gchatelet, jakehehrlich, jfb Reviewed By: gchatelet Tags: #llvm Differential Revision: https://reviews.llvm.org/D65858 llvm-svn: 368191
Diffstat (limited to 'llvm/test/Bitcode/invalid-functionptr-align.ll')
-rw-r--r--llvm/test/Bitcode/invalid-functionptr-align.ll5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/invalid-functionptr-align.ll b/llvm/test/Bitcode/invalid-functionptr-align.ll
new file mode 100644
index 00000000000..4ff797a4b01
--- /dev/null
+++ b/llvm/test/Bitcode/invalid-functionptr-align.ll
@@ -0,0 +1,5 @@
+; Bitcode with invalid function pointer alignment.
+
+; RUN: not llvm-dis %s.bc -o - 2>&1 | FileCheck %s
+
+CHECK: LLVM ERROR: Alignment is neither 0 nor a power of 2
OpenPOWER on IntegriCloud