[PATCH] D26340: [analyzer] Add SpinLockChecker for the Magenta kernel

2016-11-09 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D26340#590882, @khazem wrote: > Devin, based on Artem's review of the other checker that I have posted [1] I > am wondering about merging both this SpinLockChecker and the MutexChecker > into PthreadLockChecker. Do you think it is still

[PATCH] D26340: [analyzer] Add SpinLockChecker for the Magenta kernel

2016-11-09 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Thanks for adding the path notes and adopting CallDescription. I've added some additional comments inline, which are mostly minor nits. Two additional important changes -- and I should have noted these in the initial review -- is that it would be good to remove a

[PATCH] D26340: [analyzer] Add SpinLockChecker for the Magenta kernel

2016-11-09 Thread Kareem Khazem via cfe-commits
khazem marked 4 inline comments as done. khazem added a comment. Devin, based on Artem's review of the other checker that I have posted [1] I am wondering about merging both this SpinLockChecker and the MutexChecker into PthreadLockChecker. Do you think it is still worth landing this

[PATCH] D26340: [analyzer] Add SpinLockChecker for the Magenta kernel

2016-11-08 Thread Kareem Khazem via cfe-commits
khazem updated this revision to Diff 77277. khazem added a comment. If a double-lock or double-release is detected, path notes are now emitted on the _first_ lock or release event. Also updated the tests to check for these notes. https://reviews.llvm.org/D26340 Files:

[PATCH] D26340: [analyzer] Add SpinLockChecker for the Magenta kernel

2016-11-08 Thread Kareem Khazem via cfe-commits
khazem updated this revision to Diff 77275. khazem added a comment. The strings for Spin{Unl,L}ockFuncName and LockErrorCategory are now initialized when constructing a SpinLockChecker object rather than being static globals, in order to avoid adverse effects on startup time. Also, the

[PATCH] D26340: [analyzer] Add SpinLockChecker for the Magenta kernel

2016-11-08 Thread Kareem Khazem via cfe-commits
khazem added a comment. Good to meet you too, thanks for the useful comments and pointers to helpful examples! I'm going to update the diff twice: the first one to address your first two comments, and the second one to address your last two. https://reviews.llvm.org/D26340

[PATCH] D26340: [analyzer] Add SpinLockChecker for the Magenta kernel

2016-11-07 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. Thanks for upstreaming this! (And it was great to meet you at the developer conference.) Comment at: lib/StaticAnalyzer/Checkers/SpinLockChecker.cpp:61 + +const ErrorCategoryStr LockInfo::LockErrCategory("Lock Error"); +const FunctionNameStr

[PATCH] D26340: [analyzer] Add SpinLockChecker for the Magenta kernel

2016-11-06 Thread Kareem Khazem via cfe-commits
khazem updated this revision to Diff 77005. khazem added a comment. Minor edit, the list of libraries in CMakeLists.txt is now in alphabetical order. https://reviews.llvm.org/D26340 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt