public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/17450] New: Use of uninitialized data in reorder_insns
@ 2004-09-13 1:36 drow at gcc dot gnu dot org
2004-09-13 1:37 ` [Bug rtl-optimization/17450] " drow at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: drow at gcc dot gnu dot org @ 2004-09-13 1:36 UTC (permalink / raw)
To: gcc-bugs
thread_prologue_and_epilogue_insns does this:
if (NOTE_P (insn)
&& (NOTE_LINE_NUMBER (insn) > 0
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG
|| NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_END))
reorder_insns (insn, insn, PREV_INSN (epilogue_end));
which takes us here:
if (!BARRIER_P (from)
&& (bb2 = BLOCK_FOR_INSN (from)))
{
if (BB_END (bb2) == to)
BB_END (bb2) = prev;
bb2->flags |= BB_DIRTY;
}
But if the previous note was outside a basic block, its block field may point
off into garbage. In fact, it may be garbage collected (or maybe ggc_free'd).
This could cause a crash if the page has been released back to the system.
It also messes up debugging output:
(note:HI 116 175 154 -1515870811
("/home/drow/zone-work/gcc-updated/libmudflap/mf-hooks2.c") 414)
(gdb) p/x -1515870811
$7 = 0xa5a5a5a5
I'll attach a testcase.
--
Summary: Use of uninitialized data in reorder_insns
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: drow at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-pc-linux-gnu
GCC host triplet: i386-pc-linux-gnu
GCC target triplet: i386-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17450
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/17450] Use of uninitialized data in reorder_insns
2004-09-13 1:36 [Bug rtl-optimization/17450] New: Use of uninitialized data in reorder_insns drow at gcc dot gnu dot org
@ 2004-09-13 1:37 ` drow at gcc dot gnu dot org
2004-09-13 1:43 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: drow at gcc dot gnu dot org @ 2004-09-13 1:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From drow at gcc dot gnu dot org 2004-09-13 01:37 -------
Created an attachment (id=7115)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7115&action=view)
Test case (reduced)
valgrind /home/drow/zone-work/obj-valgrind/gcc/cc1 -fpreprocessed mf-hooks2.c
-quiet -g -O2 -o mf-hooks2.s
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17450
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/17450] Use of uninitialized data in reorder_insns
2004-09-13 1:36 [Bug rtl-optimization/17450] New: Use of uninitialized data in reorder_insns drow at gcc dot gnu dot org
2004-09-13 1:37 ` [Bug rtl-optimization/17450] " drow at gcc dot gnu dot org
@ 2004-09-13 1:43 ` pinskia at gcc dot gnu dot org
2004-09-13 1:45 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-13 1:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-13 01:43 -------
1.506 (uweigand 27-Mar-04): && (NOTE_LINE_NUMBER (insn) > 0
1.506 (uweigand 27-Mar-04): || NOTE_LINE_NUMBER (insn) ==
NOTE_INSN_FUNCTION_BEG
1.506 (uweigand 27-Mar-04): || NOTE_LINE_NUMBER (insn) ==
NOTE_INSN_FUNCTION_END))
1.201 (rth 29-May-00): reorder_insns (insn, insn, PREV_INSN (epilogue_end));
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17450
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/17450] Use of uninitialized data in reorder_insns
2004-09-13 1:36 [Bug rtl-optimization/17450] New: Use of uninitialized data in reorder_insns drow at gcc dot gnu dot org
2004-09-13 1:37 ` [Bug rtl-optimization/17450] " drow at gcc dot gnu dot org
2004-09-13 1:43 ` pinskia at gcc dot gnu dot org
@ 2004-09-13 1:45 ` pinskia at gcc dot gnu dot org
2004-09-13 2:19 ` giovannibajo at libero dot it
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-13 1:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-13 01:45 -------
That was changed by <http://gcc.gnu.org/ml/gcc-patches/2004-03/msg02099.html> which I think
might have caused this problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17450
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/17450] Use of uninitialized data in reorder_insns
2004-09-13 1:36 [Bug rtl-optimization/17450] New: Use of uninitialized data in reorder_insns drow at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-09-13 1:45 ` pinskia at gcc dot gnu dot org
@ 2004-09-13 2:19 ` giovannibajo at libero dot it
2004-09-13 2:20 ` giovannibajo at libero dot it
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: giovannibajo at libero dot it @ 2004-09-13 2:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-09-13 02:19 -------
Ulrich, can you have a look?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |uweigand at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17450
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/17450] Use of uninitialized data in reorder_insns
2004-09-13 1:36 [Bug rtl-optimization/17450] New: Use of uninitialized data in reorder_insns drow at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-09-13 2:19 ` giovannibajo at libero dot it
@ 2004-09-13 2:20 ` giovannibajo at libero dot it
2004-09-13 3:43 ` drow at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: giovannibajo at libero dot it @ 2004-09-13 2:20 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |giovannibajo at libero dot
| |it
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17450
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/17450] Use of uninitialized data in reorder_insns
2004-09-13 1:36 [Bug rtl-optimization/17450] New: Use of uninitialized data in reorder_insns drow at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-09-13 2:20 ` giovannibajo at libero dot it
@ 2004-09-13 3:43 ` drow at gcc dot gnu dot org
2004-09-20 18:55 ` uweigand at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: drow at gcc dot gnu dot org @ 2004-09-13 3:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From drow at gcc dot gnu dot org 2004-09-13 03:43 -------
I doubt this has anything to do with Ulrich's change... the problem is the bad
basic block pointer in the notes.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17450
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/17450] Use of uninitialized data in reorder_insns
2004-09-13 1:36 [Bug rtl-optimization/17450] New: Use of uninitialized data in reorder_insns drow at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-09-13 3:43 ` drow at gcc dot gnu dot org
@ 2004-09-20 18:55 ` uweigand at gcc dot gnu dot org
2004-09-24 13:08 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: uweigand at gcc dot gnu dot org @ 2004-09-20 18:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From uweigand at gcc dot gnu dot org 2004-09-20 18:55 -------
I don't have a i386 setup with valgrind, but I built a i386-cross from
current sources, and do not see any 'weird' notes.
Is the problem still reproducible with current sources? Maybe Jeff Law's
recent GC fix helped here as well ...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17450
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/17450] Use of uninitialized data in reorder_insns
2004-09-13 1:36 [Bug rtl-optimization/17450] New: Use of uninitialized data in reorder_insns drow at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-09-20 18:55 ` uweigand at gcc dot gnu dot org
@ 2004-09-24 13:08 ` pinskia at gcc dot gnu dot org
2004-10-08 1:38 ` pinskia at gcc dot gnu dot org
2004-10-20 19:42 ` drow at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-24 13:08 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17450
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/17450] Use of uninitialized data in reorder_insns
2004-09-13 1:36 [Bug rtl-optimization/17450] New: Use of uninitialized data in reorder_insns drow at gcc dot gnu dot org
` (7 preceding siblings ...)
2004-09-24 13:08 ` pinskia at gcc dot gnu dot org
@ 2004-10-08 1:38 ` pinskia at gcc dot gnu dot org
2004-10-20 19:42 ` drow at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-08 1:38 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17450
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug rtl-optimization/17450] Use of uninitialized data in reorder_insns
2004-09-13 1:36 [Bug rtl-optimization/17450] New: Use of uninitialized data in reorder_insns drow at gcc dot gnu dot org
` (8 preceding siblings ...)
2004-10-08 1:38 ` pinskia at gcc dot gnu dot org
@ 2004-10-20 19:42 ` drow at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: drow at gcc dot gnu dot org @ 2004-10-20 19:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From drow at gcc dot gnu dot org 2004-10-20 19:42 -------
Appears to be gone with current HEAD. A number of new problems appeared, which
I will report separately.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |WORKSFORME
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17450
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2004-10-20 19:42 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-13 1:36 [Bug rtl-optimization/17450] New: Use of uninitialized data in reorder_insns drow at gcc dot gnu dot org
2004-09-13 1:37 ` [Bug rtl-optimization/17450] " drow at gcc dot gnu dot org
2004-09-13 1:43 ` pinskia at gcc dot gnu dot org
2004-09-13 1:45 ` pinskia at gcc dot gnu dot org
2004-09-13 2:19 ` giovannibajo at libero dot it
2004-09-13 2:20 ` giovannibajo at libero dot it
2004-09-13 3:43 ` drow at gcc dot gnu dot org
2004-09-20 18:55 ` uweigand at gcc dot gnu dot org
2004-09-24 13:08 ` pinskia at gcc dot gnu dot org
2004-10-08 1:38 ` pinskia at gcc dot gnu dot org
2004-10-20 19:42 ` drow at gcc dot gnu dot org
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).