On Mon, 16 Dec 2002, Leopold Toetsch wrote: > Simon Glover wrote: > > > I've been looking into the cause of these failures, and it seems to be > > yet another GC bug (or more likely another symptom of the same > > underlying bug). > > > > The problem in this case is in scratchpad_new (in sub.c). This creates a > > new Scratchpad PMC, and subsequently also creates two new lists (one for > > the lexical names, the other for the values). When running under > > --gc-debug, allocating memory for these lists triggers GC/DOD, which > > garbage collects the Scratchpad. Finally, the function tries to assign to > > the Scratchpad's data section, which triggers a segfault, since this now > > points to random memory. > > I did check in a fix for the creation sequence of a scratchpad. This > does not solve you observed destruction of the Scratchpad itself.
This fixes the segfault, but, as you note, doesn't stop the destruction of the Scratchpad, so parrot just throws an exception somewhere else > Could you set a breakpoint at lexicals_mark and check, if this gets > called during scratchpad_new, and could you check if the scratchpad PMC lexicals_mark dooesn't get called during the function > is on the stack or in a processor register in scratchpad_new? It seems to be in a register (unless I'm misunderstanding what gdb is telling me). Simon
