Skip to content

fix(analyzer): Use dedicated storage for abstract static edges - #364

Merged
Saloed merged 1 commit into
mainfrom
saloed/static-storage-wip
Aug 19, 2026
Merged

Saloed merged 1 commit into
mainfrom
saloed/static-storage-wip

Conversation

@Saloed

@Saloed Saloed commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

@Saloed
Saloed merged commit cbe3b3f into main Aug 19, 2026
8 checks passed
@Saloed
Saloed deleted the saloed/static-storage-wip branch August 19, 2026 21:28
Saloed added a commit that referenced this pull request Aug 20, 2026
Adapted from upstream cbe3b3f ("fix(analyzer): Use dedicated storage for
abstract static edges (#364)").

An edge whose initial and final access paths are both the depth-0 ClassStatic
access carries no access-path information at all - only its exclusion set is
ever interesting. Kept in the general initial-to-final storage, one such edge is
recorded per distinct exclusion set per statement, and on a project with many
static pseudo-variables that storage dominates the per-method edge set.

AbstractStaticEdges replaces the whole family at a statement with a single
exclusion set: adding an edge unions into it and reports a delta only when the
union grows, and the read paths rebuild the (initial, final) pair from the
manager's most-abstract access paths. addTaintedFactEdge and the class-static
branch of addFactToFactSupports route to it via isAbstractStaticEdge, and the
three collectApAtStatement overloads consult it before the general storage.

Two adaptations were needed against upstream:

- on this branch MethodEdgesInitialToFinalApSet.add returns a List of changed
  (initial, final) pairs rather than a nullable Pair, because BaseOnly layered
  summaries need every changed final, so the override returns a singleton list
  or an empty list instead of a value or null.
- addFactToFactSupports does not exist upstream, so upstream could not route it.
  It is the second producer of abstract static edges here, and routing only
  addTaintedFactEdge would leave the two storages disagreeing about which edges
  exist; its ClassStatic depth-0 case now dispatches per initial fact.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant