HomePhabricator

[InterleavedAccessAnalysis] Fix integer overflow in insertMember.

Description

[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