As already argued, only doing overflow checking in the mutex is wrong because it creates a dynamic failure that happens randomly (depending on how many tasks manage to contend a single mutex), and thus results in programs that may succeed during testing and fail in production.