[Bug rtl-optimization/43332] valgrind warns about using uninitialized variable with -fsched-pressure -fschedule-insns
--- Comment #9 from ebotcazou at gcc dot gnu dot org 2010-06-27 08:27 --- Subject: Bug 43332 Author: ebotcazou Date: Sun Jun 27 08:27:39 2010 New Revision: 161459 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=161459 Log: Backport from mainline 2010-05-18 Vladimir Makarov vmaka...@redhat.com PR rtl-optimization/43332 * haifa-sched.c (setup_insn_max_reg_pressure): Check barrier. Modified: branches/gcc-4_5-branch/gcc/ChangeLog branches/gcc-4_5-branch/gcc/haifa-sched.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43332
[Bug rtl-optimization/43332] valgrind warns about using uninitialized variable with -fsched-pressure -fschedule-insns
--- Comment #10 from ebotcazou at gcc dot gnu dot org 2010-06-27 08:31 --- Trivial fixes like this should be installed at the same time on branches. -- ebotcazou at gcc dot gnu dot org changed: What|Removed |Added CC||ebotcazou at gcc dot gnu dot ||org Status|UNCONFIRMED |RESOLVED Resolution||FIXED Target Milestone|--- |4.5.1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43332
[Bug rtl-optimization/43332] valgrind warns about using uninitialized variable with -fsched-pressure -fschedule-insns
--- Comment #8 from zsojka at seznam dot cz 2010-06-10 15:45 --- Is there a chance this will be backported to 4.5? As Jakub pointed out at PR44178/comment #7, gcc 4.5 r160526 (with RTL checking) fails on this testcase with: $ gcc -fsched-pressure -fschedule-insns pr43332/testcase.c pr43332/testcase.c: In function #8216;main#8217;: pr43332/testcase.c:5:1: internal compiler error: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in setup_insn_max_reg_pressure, at haifa-sched.c:1589 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. It also fails on testsuite/g++.dg/debug/pr44178.C when built with RTL checking. When r159545 is backported to 4.5, everything works fine. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43332
[Bug rtl-optimization/43332] valgrind warns about using uninitialized variable with -fsched-pressure -fschedule-insns
--- Comment #7 from zsojka at seznam dot cz 2010-06-09 10:14 --- I have just finished bootstrap of r160198 with valgrind checking, the problem is no longer reproducible there. I am sorry for the delay, make check with valgrind checking takes about a month there (1.3GHz), bootstrap about a week... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43332
[Bug rtl-optimization/43332] valgrind warns about using uninitialized variable with -fsched-pressure -fschedule-insns
--- Comment #4 from vmakarov at redhat dot com 2010-05-18 21:40 --- Thanks for reporting the problem. The problem has no effect on generated code whatever initialization is used. The code in question tries to get basic block for BARRIER which is wrong. Whatever it gets basic block for BARRIER the code will still work right. In any case, it is really annoying to see such valgrind diagnostic. Therefore I'll send a patch to fix it soon. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43332
[Bug rtl-optimization/43332] valgrind warns about using uninitialized variable with -fsched-pressure -fschedule-insns
--- Comment #5 from vmakarov at gcc dot gnu dot org 2010-05-18 22:09 --- Subject: Bug 43332 Author: vmakarov Date: Tue May 18 22:09:19 2010 New Revision: 159545 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=159545 Log: 2010-05-18 Vladimir Makarov vmaka...@redhat.com PR rtl-optimization/43332 * haifa-sched.c (setup_insn_max_reg_pressure): Check barrier. Modified: trunk/gcc/ChangeLog trunk/gcc/haifa-sched.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43332
[Bug rtl-optimization/43332] valgrind warns about using uninitialized variable with -fsched-pressure -fschedule-insns
--- Comment #6 from zsojka at seznam dot cz 2010-05-18 22:22 --- Thank you for fixing this. I hope to rebuild gcc with valgrind checking in few days again. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43332
[Bug rtl-optimization/43332] valgrind warns about using uninitialized variable with -fsched-pressure -fschedule-insns
--- Comment #3 from zsojka at seznam dot cz 2010-05-17 18:45 --- Stil appears in r159500, x86_64-linux. Uninitialised read is at gcc/haifa-sched.c:1589, more exactly it is read of BLOCK_FOR_INSN (insn) When gcc/haifa-sched.c:1589 is changed to: insn != NULL_RTX (printf(%p %p\n, (void *)BLOCK_FOR_INSN (insn), (void *)BLOCK_FOR_INSN (after)), BLOCK_FOR_INSN (insn) == BLOCK_FOR_INSN (after)); it outputs (for original testcase): $ /mnt/sda1/build-159500-test/gcc/cc1 -fschedule-insns -fsched-pressure testcase.c -quiet 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0xafafafafafafafaf 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0xafafafafafafafaf 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0x7fcc29e98270 0xafafafafafafafaf 0x7fcc29e98270 However, I wasn't able to cause any difference in generated code even for more complex testcases, when the condition is true for BLOCK_FOR_INSN (insn) == 0xafafafafafafafaf - that is, the uninitialised value is the same as BLOCK_FOR_INSN (after) by luck. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43332
[Bug rtl-optimization/43332] valgrind warns about using uninitialized variable with -fsched-pressure -fschedule-insns
--- Comment #2 from zsojka at seznam dot cz 2010-03-13 09:19 --- Thank you for feedback. However, this happens in r157335, so it's not fixed by that patch. It's only reproducible with valgrind checking because ggc_alloc_stat() uses VALGRIND_DISCARD which is a no-op in other cases. When valgrind checking is enabled, it marks memory as uninitialised, even when malloc() isn't used to allocate it (some custom memory allocation is done). That's why Uninitialised value was created by a client request is printed in the where does uninitialised memory come from? part of the message. I don't know if this is a real issue, or the result doesn't depend on this uninitialised read (because further test it the condition will be false anyway). -- zsojka at seznam dot cz changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|DUPLICATE | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43332
[Bug rtl-optimization/43332] valgrind warns about using uninitialized variable with -fsched-pressure -fschedule-insns
--- Comment #1 from pinskia at gcc dot gnu dot org 2010-03-13 02:51 --- It is the same and was fixed by the same patch. *** This bug has been marked as a duplicate of 42941 *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43332