Skip to content

Commit

Permalink
fix rta analysis panic (#161) (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnzhujie authored Dec 30, 2024
1 parent 219da14 commit 7306502
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ func (a *analysis) DoAnalysis(
}

// Create and build SSA-form program representation.
prog, pkgs := ssautil.AllPackages(initial, 0)
mode := ssa.BuilderMode(0)
if algo == CallGraphTypeRta {
mode = ssa.InstantiateGenerics
}
prog, pkgs := ssautil.AllPackages(initial, mode)
prog.Build()

var graph *callgraph.Graph
Expand Down

0 comments on commit 7306502

Please sign in to comment.