Skip to content
Commit 3e014038 authored by Donát Nagy's avatar Donát Nagy
Browse files

[analyzer] Improve underflow handling in ArrayBoundV2

This minor change ensures that underflow errors are reported on memory
regions that are in unknown space but have a well-defined beginning.

As a concrete example, the following test case did not produce a warning
previously, but will produce a warning after this patch:

  typedef struct {
    int id;
    char name[256];
  } user_t;

  user_t *get_symbolic_user(void);
  char test_underflow_symbolic_2() {
    user_t *user = get_symbolic_user();
    return user->name[-1];
  }

Differential Revision: https://reviews.llvm.org/D157104
parent d0e1e764
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment