public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "aph at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug tree-optimization/36218] [4.2/4.3/4.4 regression] VRP causes stack overflow while building libgcj
Date: Wed, 30 Jul 2008 09:23:00 -0000	[thread overview]
Message-ID: <20080730092305.12699.qmail@sourceware.org> (raw)
In-Reply-To: <bug-36218-8837@http.gcc.gnu.org/bugzilla/>



------- Comment #14 from aph at gcc dot gnu dot org  2008-07-30 09:23 -------
This patch limits recursion in tree-vrp.

Index: tree-vrp.c
===================================================================
--- tree-vrp.c  (revision 136670)
+++ tree-vrp.c  (working copy)
@@ -4049,6 +4049,8 @@
    the predicate operands, an assert location node is added to the
    list of assertions for the corresponding operands.  */

+static size_t depth;
+
 static bool
 find_conditional_asserts (basic_block bb, tree last)
 {
@@ -4062,6 +4064,10 @@
   need_assert = false;
   bsi = bsi_for_stmt (last);

+  depth++;
+  if (depth > 500)
+    goto ret;
+
   /* Look for uses of the operands in each of the sub-graphs
      rooted at BB.  We need to check each of the outgoing edges
      separately, so that we know what kind of ASSERT_EXPR to
@@ -4121,6 +4127,8 @@
   FOR_EACH_SSA_TREE_OPERAND (op, last, iter, SSA_OP_USE)
     SET_BIT (found_in_subgraph, SSA_NAME_VERSION (op));

+ ret:
+  depth--;
   return need_assert;
 }



-- 


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


  parent reply	other threads:[~2008-07-30  9:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-12 11:01 [Bug libgcj/36218] New: [4.4 regression] libgcj causes stack overflow in jc1.exe aaronavay62 at aaronwl dot com
2008-05-12 11:03 ` [Bug libgcj/36218] " aaronavay62 at aaronwl dot com
2008-05-13  3:52 ` dannysmith at users dot sourceforge dot net
2008-05-22 20:09 ` [Bug tree-optimization/36218] [4.4 regression] VRP causes stack overflow while building libgcj pinskia at gcc dot gnu dot org
2008-05-22 20:10 ` [Bug tree-optimization/36218] [4.2/4.3/4.4 " pinskia at gcc dot gnu dot org
2008-06-06 15:02 ` rguenth at gcc dot gnu dot org
2008-06-08 16:15 ` jsm28 at gcc dot gnu dot org
2008-06-08 16:37 ` jsm28 at gcc dot gnu dot org
2008-06-11 10:49 ` aph at gcc dot gnu dot org
2008-06-13 21:41 ` mmitchel at gcc dot gnu dot org
2008-06-14  5:59 ` ian at airs dot com
2008-06-14  6:27 ` aph at gcc dot gnu dot org
2008-06-14 10:01 ` dannysmith at users dot sourceforge dot net
2008-06-14 15:43 ` aaronavay62 at aaronwl dot com
2008-07-14  8:03 ` aaronavay62 at aaronwl dot com
2008-07-30  9:23 ` aph at gcc dot gnu dot org [this message]
2008-08-22 19:28 ` rguenth at gcc dot gnu dot org
2008-08-23 18:06 ` aaronavay62 at aaronwl dot com
2008-08-27 22:07 ` jsm28 at gcc dot gnu dot org
2008-09-20 15:09 ` [Bug tree-optimization/36218] [4.2/4.3 Regression] " rguenth at gcc dot gnu dot org
2008-09-20 17:32 ` brian at dessent dot net
2008-09-20 17:51 ` rguenth at gcc dot gnu dot org
2009-03-31 20:50 ` [Bug tree-optimization/36218] [4.3 " jsm28 at gcc dot gnu dot org
2009-08-04 12:39 ` rguenth at gcc dot gnu dot org
2010-05-22 18:23 ` rguenth at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080730092305.12699.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=java-prs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).