system-pclub / GCatch

Statically Detecting Go Concurrency Bugs
GNU General Public License v2.0
435 stars 40 forks source link

Finished the part of pointer analysis and initialized dependency map #6

Closed lzhfromustc closed 4 years ago

lzhfromustc commented 4 years ago

This PR does two things:

  1. Finished the pointer analysis. This involves small updates to the definition of Locker
  2. Defined the type and entry function of the dependency map generation
lzhfromustc commented 4 years ago

Since this PR hasn't been merged, I can't create another PR. So I add what I want to commit to this PR.

The changed files can be reviewed like this:

  1. path/path.go is the biggest update. It is quite independent and can be reviewed separately. It defines how to compute LCA(lowest common ancester)

  2. The second update is in analysis/pointer/pointer.go, func WithdrawAllTraditionals. It is almost the same as func WithdrawAllChan in our last PR

  3. The third update is in syncgraph/dependency.go. It takes the result from the second update as parameter, and during its computation, it uses LCA from the first update. It is not completed yet