public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/107197] New: valgrind error in function same_line_p during build
@ 2022-10-09 19:32 dcb314 at hotmail dot com
  2022-10-09 19:49 ` [Bug c/107197] " dcb314 at hotmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2022-10-09 19:32 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107197
           Summary: valgrind error in function same_line_p during build
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

I've just had a go at building gcc trunk with -O3 under valgrind and
I got the following error:

/home/dcb/gcc/working/./gcc/xgcc -B/home/dcb/gcc/working/./gcc/
-B/home/dcb/gcc/results.20221009.valgrind/x86_64-pc-linux-gnu/bin/
-B/home/dcb/gcc/results.20221009.valgrind/x86_64-pc-linux-gnu/lib/ -isystem
/home/dcb/gcc/results.20221009.valgrind/x86_64-pc-linux-gnu/include -isystem
/home/dcb/gcc/results.20221009.valgrind/x86_64-pc-linux-gnu/sys-include    -g
-O3 -O2 -g -O3 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem
./include  -I. -I. -I../.././gcc -I../../../trunk.git/libgcc
-I../../../trunk.git/libgcc/. -I../../../trunk.git/libgcc/../gcc
-I../../../trunk.git/libgcc/../include
-I../../../trunk.git/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT  -g0 
-finhibit-size-directive -fno-inline -fno-exceptions
-fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize
-fbuilding-libgcc -fno-stack-protector    -I. -I. -I../.././gcc
-I../../../trunk.git/libgcc -I../../../trunk.git/libgcc/.
-I../../../trunk.git/libgcc/../gcc -I../../../trunk.git/libgcc/../include
-I../../../trunk.git/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -o
crtendS.o -MT crtendS.o -MD -MP -MF crtendS.dep -fno-omit-frame-pointer
-fno-asynchronous-unwind-tables -fcf-protection -mshstk -fpic -c
../../../trunk.git/libgcc/crtstuff.c -DCRT_END -DCRTSTUFFS_O
==107792== Conditional jump or move depends on uninitialised value(s)
==107792==    at 0xD5004B: same_line_p (tree-cfg.cc:1160)
==107792==    by 0xD5004B: assign_discriminators (tree-cfg.cc:1224)
==107792==    by 0xD5004B: build_gimple_cfg (tree-cfg.cc:251)
==107792==    by 0xD5004B: execute_build_cfg (tree-cfg.cc:371)

$ egrep "^Config|^==" mk.out 
Configuring in x86_64-pc-linux-gnu/libgcc
==107792== Conditional jump or move depends on uninitialised value(s)

So the problem occurs when building libgcc. Configure command is

../trunk.git/configure --prefix=/home/dcb/gcc/$PREFIX \
        --disable-bootstrap \
        --disable-multilib \
        --disable-werror \
        --with-pkgversion=$HASH \
        --enable-checking=valgrind \
        --enable-languages=c,c++

and to get -O3 into it, I have

sed 's/-O2/-O3/' < Makefile > Makefile.tmp
diff Makefile Makefile.tmp
mv Makefile.tmp Makefile

for the top-level Makefile.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/107197] valgrind error in function same_line_p during build
  2022-10-09 19:32 [Bug c/107197] New: valgrind error in function same_line_p during build dcb314 at hotmail dot com
@ 2022-10-09 19:49 ` dcb314 at hotmail dot com
  2022-10-09 20:28 ` dcb314 at hotmail dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2022-10-09 19:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
I can tell you that last weekend's valgrind build with -O2 went fine.
That was from git hash ca01d2526917ec6e.

This weekend's valgrind build, with -O3 enabled, is from git hash
6ffbf87ca66f4ed9cd79cff675fabe2109e46e85.

So either someone has broken something this week in -O2, or -O3 has been
broken for longer.

I will take the -O3 off this weekend's build, drop back to -O2 and see
what happens.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/107197] valgrind error in function same_line_p during build
  2022-10-09 19:32 [Bug c/107197] New: valgrind error in function same_line_p during build dcb314 at hotmail dot com
  2022-10-09 19:49 ` [Bug c/107197] " dcb314 at hotmail dot com
@ 2022-10-09 20:28 ` dcb314 at hotmail dot com
  2022-10-09 20:33 ` dcb314 at hotmail dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2022-10-09 20:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
Build with -O2 demonstrates the same valgrind problem, so someone this week,
between the two git hashes mentioned, has broken the -O2 build.

I haven't got the compute power here to do the bisect. Advice sought.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/107197] valgrind error in function same_line_p during build
  2022-10-09 19:32 [Bug c/107197] New: valgrind error in function same_line_p during build dcb314 at hotmail dot com
  2022-10-09 19:49 ` [Bug c/107197] " dcb314 at hotmail dot com
  2022-10-09 20:28 ` dcb314 at hotmail dot com
@ 2022-10-09 20:33 ` dcb314 at hotmail dot com
  2022-10-10  7:03 ` dcb314 at hotmail dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2022-10-09 20:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
81 revisions to bisect. Trying e2a228438919d846.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/107197] valgrind error in function same_line_p during build
  2022-10-09 19:32 [Bug c/107197] New: valgrind error in function same_line_p during build dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2022-10-09 20:33 ` dcb314 at hotmail dot com
@ 2022-10-10  7:03 ` dcb314 at hotmail dot com
  2022-10-10  7:26 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2022-10-10  7:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from David Binderman <dcb314 at hotmail dot com> ---
Git hash e2a228438919d846 seems good. Trying 09df0d8b14dda66c.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/107197] valgrind error in function same_line_p during build
  2022-10-09 19:32 [Bug c/107197] New: valgrind error in function same_line_p during build dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2022-10-10  7:03 ` dcb314 at hotmail dot com
@ 2022-10-10  7:26 ` rguenth at gcc dot gnu.org
  2022-10-10  8:13 ` dcb314 at hotmail dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-10  7:26 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |erozen at microsoft dot com

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Probably the same as PR107193

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/107197] valgrind error in function same_line_p during build
  2022-10-09 19:32 [Bug c/107197] New: valgrind error in function same_line_p during build dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2022-10-10  7:26 ` rguenth at gcc dot gnu.org
@ 2022-10-10  8:13 ` dcb314 at hotmail dot com
  2022-10-10  8:31 ` crazylht at gmail dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2022-10-10  8:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from David Binderman <dcb314 at hotmail dot com> ---
Git hash  09df0d8b14dda66c seems good. Trying fce601fd07fd04f5.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/107197] valgrind error in function same_line_p during build
  2022-10-09 19:32 [Bug c/107197] New: valgrind error in function same_line_p during build dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2022-10-10  8:13 ` dcb314 at hotmail dot com
@ 2022-10-10  8:31 ` crazylht at gmail dot com
  2022-10-10  8:32 ` crazylht at gmail dot com
  2022-10-11 19:58 ` erozen at microsoft dot com
  8 siblings, 0 replies; 10+ messages in thread
From: crazylht at gmail dot com @ 2022-10-10  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

Hongtao.liu <crazylht at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |crazylht at gmail dot com

--- Comment #7 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Richard Biener from comment #5)
> Probably the same as PR107193

I guess so, see comment3 in PR107193.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/107197] valgrind error in function same_line_p during build
  2022-10-09 19:32 [Bug c/107197] New: valgrind error in function same_line_p during build dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2022-10-10  8:31 ` crazylht at gmail dot com
@ 2022-10-10  8:32 ` crazylht at gmail dot com
  2022-10-11 19:58 ` erozen at microsoft dot com
  8 siblings, 0 replies; 10+ messages in thread
From: crazylht at gmail dot com @ 2022-10-10  8:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Hongtao.liu from comment #7)
> (In reply to Richard Biener from comment #5)
> > Probably the same as PR107193
> 
> I guess so, see comment3 in PR107193.

It looks like exact below warns for.
==107792== Conditional jump or move depends on uninitialised value(s)
==107792==    at 0xD5004B: same_line_p (tree-cfg.cc:1160)
==107792==    by 0xD5004B: assign_discriminators (tree-cfg.cc:1224)
==107792==    by 0xD5004B: build_gimple_cfg (tree-cfg.cc:251)
==107792==    by 0xD5004B: execute_build_cfg (tree-cfg.cc:371)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/107197] valgrind error in function same_line_p during build
  2022-10-09 19:32 [Bug c/107197] New: valgrind error in function same_line_p during build dcb314 at hotmail dot com
                   ` (7 preceding siblings ...)
  2022-10-10  8:32 ` crazylht at gmail dot com
@ 2022-10-11 19:58 ` erozen at microsoft dot com
  8 siblings, 0 replies; 10+ messages in thread
From: erozen at microsoft dot com @ 2022-10-11 19:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Eugene Rozenfeld <erozen at microsoft dot com> ---
107193 was fixed by
https://gcc.gnu.org/g:80f414e6d73f9f1683f93d83ce63a6a482e54bee

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-10-11 19:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-09 19:32 [Bug c/107197] New: valgrind error in function same_line_p during build dcb314 at hotmail dot com
2022-10-09 19:49 ` [Bug c/107197] " dcb314 at hotmail dot com
2022-10-09 20:28 ` dcb314 at hotmail dot com
2022-10-09 20:33 ` dcb314 at hotmail dot com
2022-10-10  7:03 ` dcb314 at hotmail dot com
2022-10-10  7:26 ` rguenth at gcc dot gnu.org
2022-10-10  8:13 ` dcb314 at hotmail dot com
2022-10-10  8:31 ` crazylht at gmail dot com
2022-10-10  8:32 ` crazylht at gmail dot com
2022-10-11 19:58 ` erozen at microsoft dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).