[Bug middle-end/23408] [4.1 Regression] ICE in cgraph_decide_inlining_incrementally (using freed GC memory)

2005-08-29 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-29 
17:49 ---
Fixed.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23408


[Bug middle-end/23408] [4.1 Regression] ICE in cgraph_decide_inlining_incrementally (using freed GC memory)

2005-08-29 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-08-29 
17:49 ---
Subject: Bug 23408

CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2005-08-29 17:48:59

Modified files:
gcc: ChangeLog ipa-inline.c 
gcc/testsuite  : ChangeLog 
Added files:
gcc/testsuite/gcc.dg: pr23408.c 

Log message:
2005-08-18  Andrew Pinski  <[EMAIL PROTECTED]>

PR middle-end/23408
* ipa-inline.c (cgraph_decide_inlining_incrementally): Remove the
call to ggc_collect.
2005-08-28  Andrew Pinski  <[EMAIL PROTECTED]>

PR middle-end/23408
* gcc.dg/pr23408.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9849&r2=2.9850
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ipa-inline.c.diff?cvsroot=gcc&r1=2.15&r2=2.16
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5977&r2=1.5978
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr23408.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23408


[Bug middle-end/23408] [4.1 Regression] ICE in cgraph_decide_inlining_incrementally (using freed GC memory)

2005-08-27 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-28 
04:45 ---
And that did not work.  Just going to get approval for your patch after a 
bootstrap/test.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23408


[Bug middle-end/23408] [4.1 Regression] ICE in cgraph_decide_inlining_incrementally (using freed GC memory)

2005-08-27 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-28 
03:05 ---
I am testing a patch for which I recommended in comment #3.

-- 
   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23408


[Bug middle-end/23408] [4.1 Regression] ICE in cgraph_decide_inlining_incrementally (using freed GC memory)

2005-08-27 Thread pinskia at gcc dot gnu dot org


-- 
   What|Removed |Added

   Severity|normal  |critical


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23408


[Bug middle-end/23408] [4.1 Regression] ICE in cgraph_decide_inlining_incrementally (using freed GC memory)

2005-08-16 Thread pinskia at physics dot uc dot edu

--- Additional Comments From pinskia at physics dot uc dot edu  2005-08-16 
21:23 ---
Subject: Re:  [4.1 Regression] ICE in cgraph_decide_inlining_incrementally 
(using freed GC memory)

> 
> 
> --- Additional Comments From e9925248 at stud4 dot tuwien dot ac dot at  
> 2005-08-16 21:20 ---
> I think, I found the cause of this:
> cgraph_early_inlining holds a list of cgraph nodes in the array order.
> 
> In this example, cgraph_decide_inlining_incrementally removes all references
> known by the garbage collector to a node contained in this array, which has 
> not
> been processed. Then it calls the ggc_collect. With checking enabled, the 
> freed
> memory is overwritten so that the following access cause a segementation 
> fault.

The other way to fix it, would be move the order array to GC memory so we call
still call ggc_collect.

-- Pinski


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23408


Re: [Bug middle-end/23408] [4.1 Regression] ICE in cgraph_decide_inlining_incrementally (using freed GC memory)

2005-08-16 Thread Andrew Pinski
> 
> 
> --- Additional Comments From e9925248 at stud4 dot tuwien dot ac dot at  
> 2005-08-16 21:20 ---
> I think, I found the cause of this:
> cgraph_early_inlining holds a list of cgraph nodes in the array order.
> 
> In this example, cgraph_decide_inlining_incrementally removes all references
> known by the garbage collector to a node contained in this array, which has 
> not
> been processed. Then it calls the ggc_collect. With checking enabled, the 
> freed
> memory is overwritten so that the following access cause a segementation 
> fault.

The other way to fix it, would be move the order array to GC memory so we call
still call ggc_collect.

-- Pinski


[Bug middle-end/23408] [4.1 Regression] ICE in cgraph_decide_inlining_incrementally (using freed GC memory)

2005-08-16 Thread e9925248 at stud4 dot tuwien dot ac dot at

--- Additional Comments From e9925248 at stud4 dot tuwien dot ac dot at  
2005-08-16 21:20 ---
I think, I found the cause of this:
cgraph_early_inlining holds a list of cgraph nodes in the array order.

In this example, cgraph_decide_inlining_incrementally removes all references
known by the garbage collector to a node contained in this array, which has not
been processed. Then it calls the ggc_collect. With checking enabled, the freed
memory is overwritten so that the following access cause a segementation fault.

If the call to the garbage collector in cgraph_decide_inlining_incrementally is
removed, the file compiles:
Index: ipa-inline.c
===
RCS file: /cvs/gcc/gcc/gcc/ipa-inline.c,v
retrieving revision 2.15
diff -u -p -r2.15 ipa-inline.c
--- ipa-inline.c28 Jul 2005 21:45:25 -  2.15
+++ ipa-inline.c16 Aug 2005 21:18:18 -
@@ -1073,7 +1073,6 @@ cgraph_decide_inlining_incrementally (st
   node->local.self_insns = node->global.insns;
   current_function_decl = NULL;
   pop_cfun ();
-  ggc_collect ();
 }
   return inlined;
 }

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23408


[Bug middle-end/23408] [4.1 Regression] ICE in cgraph_decide_inlining_incrementally (using freed GC memory)

2005-08-15 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-15 
21:37 ---
Also reproduced with --enable-checking=yes (default) and --param 
ggc-min-expand=0 --param 
ggc-min-heapsize=0 -O1.  This means we are using already freed GC memory.
Honza could you look into this since it seems like it was caused by one of your 
functions.  Smells like 
we are missing a GTY somwhere.

-- 
   What|Removed |Added

 CC||hubicka at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed||1
  GCC build triplet|i686-pc-linux-gnu   |
   GCC host triplet|i686-pc-linux-gnu   |
 GCC target triplet|i686-pc-linux-gnu (exists   |
   |also on avr)|
   Keywords||ice-on-valid-code
   Last reconfirmed|-00-00 00:00:00 |2005-08-15 21:37:39
   date||
Summary|ICE on valid, if checking   |[4.1 Regression] ICE in
   |enabled |cgraph_decide_inlining_incre
   ||mentally (using freed GC
   ||memory)
   Target Milestone|--- |4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23408