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

            Bug ID: 120244
           Summary: cobol.dg/cgroup2: more Valgrind issues in tests
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: testsuite-fail
          Severity: normal
          Priority: P3
         Component: cobol
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
                CC: rdubner at gcc dot gnu.org
  Target Milestone: ---

I'd encourage running the testsuite with a GCC built using
--enable-checking=valgrind --enable-valgrind-annotations. You can use the
commits at https://forge.sourceware.org/sjames/gcc/commits/branch/sam-valgrind
to make it fatal rather than just emitting noise during the testsuite to make
sure things fail too, if you wish (not all tests will fail on unexpected
output).

Using a quick loop just to see what happens, outside of a proper testsuite run
(and --enable-checking=valgrind), I see:
```
~/git/gcc/gcc/testsuite $ for x in cobol.dg/*/*.cob ; do (set -x ; gcobol ${x}
-wrapper valgrind,-q ; set +x) ; done
[...]
+ gcobol cobol.dg/group2/ADD_SUBTRACT_CORR_mixed_fix___float.cob -wrapper
valgrind,-q
==1968024== Conditional jump or move depends on uninitialised value(s)
==1968024==    at 0x69BE093: UnknownInlinedFun (scan.l:1667)
==1968024==    by 0x69BE093: UnknownInlinedFun (stl_algo.h:4265)
==1968024==    by 0x69BE093: lexer() (scan.l:1665)
==1968024==    by 0x69DDB4D: UnknownInlinedFun (scan_post.h:240)
==1968024==    by 0x69DDB4D: prelex() (scan_post.h:251)
==1968024==    by 0x69DEC07: UnknownInlinedFun (scan_post.h:375)
==1968024==    by 0x69DEC07: yylex() (scan_post.h:350)
==1968024==    by 0x69472E7: yyparse() (parse.cc:16401)
==1968024==    by 0x69AA657: UnknownInlinedFun (util.cc:2142)
==1968024==    by 0x69AA657: cobol_parse_files(int, char const**)
(util.cc:2203)
==1968024==    by 0x65A2974: compile_file() [clone .lto_priv.0] (toplev.cc:451)
==1968024==    by 0x656FA91: UnknownInlinedFun (toplev.cc:2211)
==1968024==    by 0x656FA91: toplev::main(int, char**) (toplev.cc:2374)
==1968024==    by 0x656EAA9: main (main.cc:39)
==1968024==
==1968024== Use of uninitialised value of size 8
==1968024==    at 0x69BE098: UnknownInlinedFun (scan.l:1673)
==1968024==    by 0x69BE098: UnknownInlinedFun (stl_algo.h:4265)
==1968024==    by 0x69BE098: lexer() (scan.l:1665)
==1968024==    by 0x69DDB4D: UnknownInlinedFun (scan_post.h:240)
==1968024==    by 0x69DDB4D: prelex() (scan_post.h:251)
==1968024==    by 0x69DEC07: UnknownInlinedFun (scan_post.h:375)
==1968024==    by 0x69DEC07: yylex() (scan_post.h:350)
==1968024==    by 0x69472E7: yyparse() (parse.cc:16401)
==1968024==    by 0x69AA657: UnknownInlinedFun (util.cc:2142)
==1968024==    by 0x69AA657: cobol_parse_files(int, char const**)
(util.cc:2203)
==1968024==    by 0x65A2974: compile_file() [clone .lto_priv.0] (toplev.cc:451)
==1968024==    by 0x656FA91: UnknownInlinedFun (toplev.cc:2211)
==1968024==    by 0x656FA91: toplev::main(int, char**) (toplev.cc:2374)
==1968024==    by 0x656EAA9: main (main.cc:39)
==1968024==
```

and
```
+ gcobol cobol.dg/group2/ALLOCATE_Rule_8_OPTION_INITIALIZE_with_figconst.cob
-wrapper valgrind,-q
==2025703== Syscall param msync(start) points to uninitialised byte(s)
==2025703==    at 0x932FB15: msync (msync.c:25)
==2025703==    by 0x699F48B: symbol_table_extend() (symbols.cc:153)
==2025703==    by 0x69A6B45: symbol_field_add(unsigned long, cbl_field_t*)
(symbols.cc:2591)
==2025703==    by 0x68E5D9D: field_add(YYLTYPE const&, cbl_field_t*) [clone
.lto_priv.0] (parse_ante.h:2928)
==2025703==    by 0x694B0A9: yyparse() (parse.y:3316)
==2025703==    by 0x69AA657: UnknownInlinedFun (util.cc:2142)
==2025703==    by 0x69AA657: cobol_parse_files(int, char const**)
(util.cc:2203)
==2025703==    by 0x65A2974: compile_file() [clone .lto_priv.0] (toplev.cc:451)
==2025703==    by 0x656FA91: UnknownInlinedFun (toplev.cc:2211)
==2025703==    by 0x656FA91: toplev::main(int, char**) (toplev.cc:2374)
==2025703==    by 0x656EAA9: main (main.cc:39)
==2025703==  Address 0x8b9289c is in a rw- mapped file /tmp/#59860 (deleted)
segment
==2025703==
```

Reply via email to