The Ceph project has a huge codebase, and it faces the risk of containing suboptimal code that could jeopardize storage reliability or induce performance bottlenecks or cause resource inefficiencies. Identifying and rectifying such code issues is important to maintain the integrity and efficiency of the Ceph storage system. clang-tidy, a powerful static analysis tool, offers a systematic approach to uncover critical issues within the codebase and generate comprehensive reports highlighting potential vulnerabilities.
This project was completed in two phases.
A total of 78 issues were identified throughout the entire Ceph codebase out of which 3 issues were from OSD and 6 issues were from RGW
Description:
Warns if an object is used after it has been moved, for example:
std::string str = "Hello, world!**\\n**"; std::vector<std::string> messages; messages.emplace_back(std::move(str)); std::cout << str;
The last line will trigger a warning that str
is used after it has been moved.
[click the image to view better]