amit-davidson / Chronos

Chronos - A static race detector for the go language
MIT License
424 stars 11 forks source link

Improve control flow graph to support recover #1

Closed amit-davidson closed 3 years ago

amit-davidson commented 3 years ago

Proposal

Currently, the control flow graph of a function traverses only between the blocks of the function using ssa.Function.Blocks. The special recover block isn't reachable in that way since it's a special case (abnormal edge).
Therefore, traversing this block should be added using ssa.Function.Recover

For more details: https://pkg.go.dev/golang.org/x/tools/go/ssa#Function