public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/51852] [regression] [c++11] tree check: expected tree_list, have HßèMÕþÿøtxøtsø
Date: Fri, 27 Jan 2012 09:12:00 -0000	[thread overview]
Message-ID: <bug-51852-4-OB8kaBCfju@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51852-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-27 08:52:28 UTC ---
Created attachment 26476
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26476
pointer_map patch

local_specializations isn't GTY(()) marked at all and inserts GC TREE_LIST
nodes
into the hash table that aren't reachable otherwise.

The obvious fix I've tried first:
--- pt.c 2012-01-27 09:28:26.887327122 +0100
+++ pt.c 2012-01-27 09:45:01.787479945 +0100
@@ -79,7 +79,7 @@ static tree cur_stmt_expr;
 /* A map from local variable declarations in the body of the template
    presently being instantiated to the corresponding instantiated
    local variables.  */
-static htab_t local_specializations;
+static GTY ((param_is (union tree_node))) htab_t local_specializations;

 typedef struct GTY(()) spec_entry
 {

for some reason crashed elsewhere.  There is additionally the saving of the
local_specializations pointer, creating a new hash table and destroying +
restoring the pointer afterwards in two places.  Can we ggc_collect () only
when
there is at most one local_specializations array around (i.e. when
saved_local_specializations in whomever created the hash table is NULL)?

And the second question is, are the local specialization trees also reachable
from some other GC root except for local_specializations htab?  If they are
reachable from elsewhere, it would seem to me it would be much cheaper to use a
pointer_map as done in this patch (the testcase works then).


  parent reply	other threads:[~2012-01-27  8:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13 20:26 [Bug c++/51852] New: " zeratul976 at hotmail dot com
2012-01-13 20:29 ` [Bug c++/51852] " paolo.carlini at oracle dot com
2012-01-14  0:54 ` redi at gcc dot gnu.org
2012-01-14  7:49 ` zeratul976 at hotmail dot com
2012-01-14  7:56 ` pinskia at gcc dot gnu.org
2012-01-14  8:12 ` zeratul976 at hotmail dot com
2012-01-14  8:14 ` zeratul976 at hotmail dot com
2012-01-14  9:56 ` zeratul976 at hotmail dot com
2012-01-14 10:02 ` zeratul976 at hotmail dot com
2012-01-16 10:19 ` rguenth at gcc dot gnu.org
2012-01-16 16:16 ` zeratul976 at hotmail dot com
2012-01-26 22:36 ` zeratul976 at hotmail dot com
2012-01-27  5:37 ` redi at gcc dot gnu.org
2012-01-27  6:29 ` pinskia at gcc dot gnu.org
2012-01-27  7:05 ` zeratul976 at hotmail dot com
2012-01-27  7:30 ` zeratul976 at hotmail dot com
2012-01-27  8:52 ` jason at gcc dot gnu.org
2012-01-27  9:02 ` zeratul976 at hotmail dot com
2012-01-27  9:12 ` jakub at gcc dot gnu.org [this message]
2012-01-27  9:33 ` jakub at gcc dot gnu.org
2012-01-27 19:45 ` jakub at gcc dot gnu.org
2012-01-27 20:25 ` zeratul976 at hotmail dot com
2012-01-27 20:26 ` jakub at gcc dot gnu.org
2012-01-29  0:46 ` paolo.carlini at oracle dot com

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=bug-51852-4-OB8kaBCfju@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).