C++ senior dev here. Of the few teams I've been on, one of the first things I make sure is setup right is cranking up warnings, warnings as errors. Which include things like un initialized variables. I then fix up the errors and make sure they are part of build gates.
These types of problems(undefined behavior and or uninitialized) are often hard(time consuming) to diagnose and fairly common.
Lots of places overlook simple static analysis or built in compile features.
When I wrote Perl regularly, the first two lines I wrote after shebang were use strict and use warnings - they saved me many many times. It is not a universal rule but using warnings as error also helps expose systematic issues.
These types of problems(undefined behavior and or uninitialized) are often hard(time consuming) to diagnose and fairly common.
Lots of places overlook simple static analysis or built in compile features.