Infer (https://fbinfer.com/) can perform static analysis to detect bugs in C++ code, we should consider using it on btllib.