MCPcopy Index your code
hub / github.com/uber-go/nilaway / checkCFGFixedPointRuntime

Function checkCFGFixedPointRuntime

assertion/function/assertiontree/util.go:34–41  ·  view source on GitHub ↗

checkCFGFixedPointRuntime panics if a fixed point iteration loop runs beyond some upper bounded round number, determined by the number of blocks in the CFG of the analyzed function.

(passName string, currRound, numBlocks int)

Source from the content-addressed store, hash-verified

32// checkCFGFixedPointRuntime panics if a fixed point iteration loop runs beyond some upper
33// bounded round number, determined by the number of blocks in the CFG of the analyzed function.
34func checkCFGFixedPointRuntime(passName string, currRound, numBlocks int) {
35 if maxRound := numBlocks * numBlocks * 2; currRound > maxRound {
36 panic(fmt.Sprintf("propagation over %d-block CFG in %q ran for "+
37 "%d rounds, when maximum allowed was %d rounds.",
38 numBlocks, passName, currRound, maxRound),
39 )
40 }
41}
42
43// GetDeclaringPath finds the path of nested AST nodes beginning with the passed interval `[start, end]`
44func GetDeclaringPath(pass *analysishelper.EnhancedPass, start, end token.Pos) ([]ast.Node, bool) {

Callers 2

propagateRichChecksFunction · 0.85
BackpropAcrossFuncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected