On Monday 23 April 2007 09:07, Jonathan Worthington wrote: > chromatic wrote: > > Jonathan, can you help us figure out why deleting these lines out of > > init() fixes the problem? Are they vestigial? > > > > /* turn on marking of the class_data array */ > > PObj_data_is_PMC_array_SET(self); > > I saw those before and thought they were very suspect; I only gave SMOP > a cursory glance for inspiration before digging into PDD15 > implementation though. When you set this flag, I believe the GC assumes > the data pointer of the PMC points to a chunk of memory containing an > array of pointers. It then looks at the int in the pmc_ext structure to > say how many pointers there are. That way you don't have to write your > own mark routine for some aggregate types. I may have the specific > details wrong, but it's something like that. > > I think in the case of SMOP, the usage of it is bogus/wrong. I don't > remember the int in pmc_ext being set, and assuming that everything in a > struct is and always will be contiguous non-NULL PMCs or STRING pointers > is probably a fast way to segfaults when you change something about the > struct in the future, or if it's uninitialized.
Thanks, that matches my reading of the code, too. I removed this dubious code in r18305 and applied Alek's original patch as r18306. Thanks, everyone! -- c