https://bugs.kde.org/show_bug.cgi?id=413642
Bug ID: 413642 Summary: gcc 9 with -O2 results in false positive: Uninitialised value was created by a stack allocation Product: valgrind Version: 3.15 SVN Platform: Debian unstable OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: memcheck Assignee: jsew...@acm.org Reporter: tim.rueh...@gmx.de Target Milestone: --- SUMMARY Valgrind falsely detects "Uninitialised value was created by a stack allocation" when the code is compiled with gcc 9 and -O2 (with -O0 all is fine). It looks like it's about how gcc optimizes strcmp(). STEPS TO REPRODUCE All is pretty well described (incl. dgb assembler dumps) at https://gitlab.com/gnutls/libtasn1/issues/9 OBSERVED RESULT ==15173== Conditional jump or move depends on uninitialised value(s) ==15173== at 0x1092C0: main (Test_choice.c:122) ==15173== Uninitialised value was created by a stack allocation ==15173== at 0x1090F0: main (Test_choice.c:28) EXPECTED RESULT No report at all - the variable is being initialized in a called function. SOFTWARE/OS VERSIONS Debian unstable, but also reported on Fedora. Key seems to be gcc 9. ADDITIONAL INFORMATION https://gitlab.com/gnutls/libtasn1/issues/9 -- You are receiving this mail because: You are watching all bug changes.