system-pclub / GCatch

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

Write a template for GenKill, and Defer analysis based on this template #2

Closed lzhfromustc closed 4 years ago

lzhfromustc commented 4 years ago

I wrote a template for GenKill algorithm. I tried to write a template that has concrete definition of functions like Shuofei said, but failed because Go doesn't support generic programming. So I think every time we write GenKill, we need to define the four maps, and write functions like InitGenKillMap() again.

Tested on etcd. The Defer analysis works well.

songlh commented 4 years ago

I don't like the idea of genkill template. My feeling is it is unnecessary. There are many different implementations of GenKill in LLVM and GCC. Every time we wrote a genkill algorithm we need to change here and there, and thus, I don't think the template is easy to use. I think it is completely fine to have many different genkill implementations in our repo.

lzhfromustc commented 4 years ago

OK. The template is deleted. I also think it is very hard and unnecessary to write a template for all genkill algorithms for different functionalities.

system-pclub commented 4 years ago

I add two comments. Could you address them in your next pull request?