[clang] [analyzer] Limit Store by region-store-binding-limit (PR #127602)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 19 01:51:48 PST 2025


NagyDonat wrote:

As I thought a bit more about the reorganization that I suggested, I realized that it can be summarized as **we should synchronize adding the default `Unknown` binding and calling `escapeValue`** -- because they correspond to the two end-points of the same "_this_ value is stored at _this_ memory region" connection which wasn't properly recorded.

Of course there is some asymmetry in that `escapeValue` must escape each value individually (or perhaps in a loop with `escapeValues`), but the default binding to `Unknown` region is (if I understand correctly) a proper stand-in for _all_ the connections from that side. This could be simply handled as "`if (`there is no default `Unknown` binding`) {` create one `}`"  -- but if this happens to cause performance issues, then a boolean `didCreateDefaultUnknownBinding` can be used to cache the result.

https://github.com/llvm/llvm-project/pull/127602


More information about the cfe-commits mailing list