You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turns out the recent (#90974) CallDescription matching improvements can cause regressions when using standard library implementations where method we want to match comes from an implementation specific base class, such as in this example: https://compiler-explorer.com/z/ErMbhxfPv
unsignedintsleep(unsignedint seconds);
namespacestd {
class__mutex_base {
public:voidlock();
};
classmutex : public__mutex_base{
public:voidunlock();
booltry_lock();
};
}
voidtop() {
std::mutex m;
m.lock();
sleep(3); // caught by clang-18, FN for clang-19
m.unlock();
}
In this case, the BlockInCriticalSectionChecker wants to match the std::mutex::lock and std::mutex::unlock member functions using the CDM::CXXMethod matching mode. However, one could only match the lock by std::__mutex_base::lock, causing a mismatch.
This issue is more generic and not entirely specific to this checker. I expect similar bugs to happen for any other checker using CDM::CXXMethod.
If we don't do about this, we are going to have a serious regression in the clang-19 release.