amit-davidson / Chronos

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

Fix bug in defer #21

Closed amit-davidson closed 3 years ago

amit-davidson commented 3 years ago

When calculating defer, the last block was assumed to always contain a defer statement. In case it didn't contain a defer statement, all the defer statements that were supposed to be calculated in that path were ignored. Now, the defer from the closest block is used instead. Also, formatted all the test files.