Skip to content

Commit 7306502

Browse files
authored
fix rta analysis panic (#161) (#198)
1 parent 219da14 commit 7306502

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: analysis.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,11 @@ func (a *analysis) DoAnalysis(
9494
}
9595

9696
// Create and build SSA-form program representation.
97-
prog, pkgs := ssautil.AllPackages(initial, 0)
97+
mode := ssa.BuilderMode(0)
98+
if algo == CallGraphTypeRta {
99+
mode = ssa.InstantiateGenerics
100+
}
101+
prog, pkgs := ssautil.AllPackages(initial, mode)
98102
prog.Build()
99103

100104
var graph *callgraph.Graph

0 commit comments

Comments
 (0)