OSDN Git Service

[InterleavedAccessAnalysis] Fix integer overflow in insertMember.
authorFlorian Hahn <flo@fhahn.com>
Thu, 7 Mar 2019 17:50:16 +0000 (17:50 +0000)
committerFlorian Hahn <flo@fhahn.com>
Thu, 7 Mar 2019 17:50:16 +0000 (17:50 +0000)
commitb11b60da2d94b7efc03d5803d8d29748e58ec57e
tree6d3103bdc4591609ba93c3b18af1e13e4ae066fa
parent527cd0756754cc41e6b1108d3a954ed31f5e20dc
[InterleavedAccessAnalysis] Fix integer overflow in insertMember.

Without checking for integer overflow, invalid members can be added
 e.g. if the calculated key overflows, becomes positive and the largest key.

This fixes
      https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7560
      https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13128
      https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13229

Reviewers: Ayal, anna, hsaito, efriedma

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D55538

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355613 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/VectorUtils.h
include/llvm/Support/CheckedArithmetic.h
test/Transforms/LoopVectorize/X86/interleaved-accesses-large-gap.ll [new file with mode: 0644]