https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119052

            Bug ID: 119052
           Summary: [15 regression] Uninitialized memory use in
                    selftest::check_line
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

With my Valgrind patches [0] and `./configure --enable-multilib
--with-multilib-list=m32,m64 --enable-languages=c,c++,d
--enable-valgrind-annotations --enable-checking=yes,valgrind`, I get the
following:

```
$ make
[...]
LC_ALL=C GCC_COLORS= /home/sam/build/gcc/./gcc/xgcc
-B/home/sam/build/gcc/./gcc/ -fno-checking -xc++ -nostdinc /dev/null -S -o
/dev/null -fself-test=/home/sam/git/gcc/gcc/testsuite/selftests
==3040169== Conditional jump or move depends on uninitialised value(s)
==3040169==    at 0x56D9D57: strlen (vg_replace_strmem.c:505)
==3040169==    by 0x5DF966F: _IO_str_init_static_internal (strops.c:41)
==3040169==    by 0x5DC0034: UnknownInlinedFun (strfile.h:90)
==3040169==    by 0x5DC0034: __isoc23_sscanf (isoc23_sscanf.c:28)
==3040169==    by 0x3DBFDB5: selftest::check_line(selftest::temp_source_file&,
file_cache&, int) (input.cc:2369)
==3040169==    by 0x3DBFF84: selftest::test_replacement() (input.cc:2391)
==3040169==    by 0x3DCA472: selftest::input_cc_tests() (input.cc:4354)
==3040169==    by 0x3B50D61: selftest::run_tests() (selftest-run-tests.cc:85)
==3040169==    by 0x1CD429D: toplev::run_self_tests() (toplev.cc:2267)
==3040169==    by 0x1CD4619: toplev::main(int, char**) (toplev.cc:2378)
==3040169==    by 0x3CE4B32: main (main.cc:39)
==3040169==
-fself-test: 7661107 pass(es) in 62.020470 seconds
make[3]: *** [/home/sam/git/gcc/gcc/cp/Make-lang.in:256: s-selftest-c++] Error
1
make[3]: Leaving directory '/home/sam/build/gcc/gcc'
```

[0] https://forge.sourceware.org/sjames/gcc/commits/branch/sam-valgrind

Reply via email to