I'm catching an uninitialized access on a non-static variable that has file scope in a C++ translation unit. I'm having trouble interpreting the finding.
The variable that is triggering the uninitialized access is a simple flag and I believe it is initialized: bool g_flag = false; The C++ object that uses it is in another translation unit, and it has a init_pritority attribute. I think I'm missing a finer detail on the confluence of the C++ standard intersecting default initialization tricks in the BSS segment taken modulo what Valgrind sees (or believes it sees). I *think* it also has something to do with the double value initialization discussed in https://stackoverflow.com/questions/25742863/why-file-scope-static-variables-have-to-be-zero-initialized. Can someone help me understand what's going on? Thanks in advance. ------------------------------------------------------------------------------ _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users