]> granicus.if.org Git - llvm/commit
[DataLayout] Check StackNatural and FunctionPtr alignments.
authorFlorian Hahn <flo@fhahn.com>
Wed, 7 Aug 2019 17:20:55 +0000 (17:20 +0000)
committerFlorian Hahn <flo@fhahn.com>
Wed, 7 Aug 2019 17:20:55 +0000 (17:20 +0000)
commit2e0aa49547051cf6d1fe6ef62538296704a8da9d
tree18c022a8780010af0c1e8a9f7967a8461164b5ab
parent948e657594ca18ef4432305f66e5dd1d2f73dddb
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368191 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/DataLayout.cpp
test/Assembler/datalayout-invalid-function-ptr-alignment.ll [new file with mode: 0644]
test/Assembler/datalayout-invalid-stack-natural-alignment.ll [new file with mode: 0644]
test/Bitcode/invalid-functionptr-align.ll [new file with mode: 0644]
test/Bitcode/invalid-functionptr-align.ll.bc [new file with mode: 0644]