This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Boehm's GC crashed by adjustment of GC root set
- From: Tom Tromey <tromey at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Date: 18 Jun 2006 11:41:32 -0600
- Subject: Re: Boehm's GC crashed by adjustment of GC root set
- References: <d1e3ff2b0606170419s37a2543fy@mail.gmail.com>
- Reply-to: tromey at redhat dot com
>>>>> "Laurynas" == Laurynas Biveinis <laurynas.biveinis@gmail.com> writes:
Laurynas> So far I've been debugging GCC bootstrap failures with
Laurynas> Boehm's GC, and now I'm stuck.
Laurynas> I used to register all GC roots at the startup of GCC,
Laurynas> including stringpool roots. That worked fine until first
Laurynas> ht_expand() call, which moves identifier hash table around
Laurynas> in the memory and Boehm's GC still uses its old location as
Laurynas> a root segment. Oops. But if I try to remove the old root
Laurynas> segment and register the current one with GC_remove_roots()
Laurynas> and GC_add_roots(), first GC_collect() crashes
I don't know why this is crashing -- in libjava we don't mess around
with registering roots like this.
But... instead of registering the hash table contents as a root, I
would suggest instead registering 'ident_hash' as a root and then
allocating the hash table contents as scanned memory via the GC. This
way I think the right thing will happen in all situations.
Tom