[PATCH] D139534: [analyzer] Don't escape local static memregions on bind

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 8 15:11:42 PST 2023


xazax.hun added a comment.

> Here is the gist of one *new* TP:

Where would `sprops` get escaped? Did I miss that or was that reduced out of the example?

Overall, this looks like a hard nut to crack. Escaping too much or too little are both problematic, and we don't have the information we need to make the decision. The question is whether we want to make an absolute decision or come up with a heuristic like:

  static int* p;
  MyStruct reachable(&p);
  
  indirect(&reachable);
  direct(&p);

escaping when `direct` is called, but not escaping when `indirect` is called.

Do you see any patterns in the real-world results that would show a pattern? I am not opposed to making a change, but I wonder if we should start documenting these decisions somewhere that are likely need revision in the future when we have more data.  What do you think?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139534/new/

https://reviews.llvm.org/D139534



More information about the cfe-commits mailing list