[PATCH] D85424: [Analyzer] Crash fix for alpha.cplusplus.IteratorRange
    Balázs Benics via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Mon Sep  7 03:20:15 PDT 2020
    
    
  
steakhal added a comment.
OK, after a few hours of debugging, the test code simplifies to this:
  // RUN: %clang_analyze_cc1 -std=c++11 -analyzer-checker=core,cplusplus,alpha.cplusplus.IteratorRange -analyzer-config aggressive-binary-operation-simplification=true %s -verify
  
  void foo(int x) {
    int uninit;
    x - uninit; // will-crash
  }
The investigation showed that the `IteratorRangeChecker::verifyRandomIncrOrDecr` will get an `Undefined` sval for this example, resulting in a crash.
How should I continue this?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85424/new/
https://reviews.llvm.org/D85424
    
    
More information about the cfe-commits
mailing list