This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Boehm's GC crashed by adjustment of GC root set


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]