[all-commits] [llvm/llvm-project] bd4258: [analyzer] Ignore calculated indices of <= 0 in VL...

vabridgers via All-commits all-commits at lists.llvm.org
Thu Jun 4 05:26:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bd425825411af1b340134b0e8c9c03733ee87d66
      https://github.com/llvm/llvm-project/commit/bd425825411af1b340134b0e8c9c03733ee87d66
  Author: Vince Bridgers <vince.a.bridgers at gmail.com>
  Date:   2020-06-04 (Thu, 04 Jun 2020)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp
    M clang/test/Analysis/vla.c

  Log Message:
  -----------
  [analyzer] Ignore calculated indices of <= 0 in VLASizeChecker

Summary:
See https://bugs.llvm.org/show_bug.cgi?id=46128. The checker does not
yet comprehend constraints involving multiple symbols, so it's possible
to calculate a VLA size that's negative or 0. A LIT is added to catch
regressions, and this change simply bails if a VLA size of 0 or less is
calculated.

Reviewers: balazske, NoQ, martong, baloghadamsoftware, Szelethus, gamesh411

Reviewed By: balazske, NoQ, Szelethus

Subscribers: xazax.hun, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, Charusso, ASDenysPetrov, cfe-commits, dkrupp

Tags: #clang

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




More information about the All-commits mailing list