Applied with some modification, thanks. Mike Lambert Richard Cameron wrote: > Date: Wed, 31 Jul 2002 22:24:55 +0100 > From: Richard Cameron <Richard.Cameron@OrbisUK.com> > To: perl6-internals@perl.org > Cc: bugs-bitbucket@netlabs.develooper.com > Subject: Re: [perl #15845] [BUG] GC segfault > > > On Tuesday, July 30, 2002, at 07:20 PM, Simon Glover (via RT) wrote: > > > This code segfaults: > > > > sweepoff > > set I0, 0 > > > > LOOP: new P0, .PerlString > > set P0, "ABC" > > save P0 > > inc I0 > > lt I0, 127, LOOP > > > > end > > This is a fairly straightforward fix. > > Parrot_do_dod_run() ordinarily updates pool->num_free_objects as a side > effect of looking for unused headers. If dod is disabled with sweepoff, > then num_free_objects doesn't get updated. This confuses a piece of code > later on which decides that it doesn't need to allocate any new buffers > after all (although all other evidence point to the contrary). > > Parrot segfaults soon after. > > I've attached two patches, the first fixes the problem by telling the > allocator to ignore the value of num_free_objects if it's unknown; the > second adds the erstwhile crashing code to the test suite (although I'm > not convinced I've put it in the best place). > > Richard. > > >Thread Previous