On Tuesday 20 May 2008 09:59:10 chromatic wrote: > Actually, it's the pmc_new_noinit() call which is the problem. This method > in this case needs to return an Object, which has PMC data. Unfortunately, > calling pmc_new_noinit() does *not* call any PMC initializer, which in this > case allocates and assigns the PMC data to the object. > > Without that data pointer, any other vtable entry or method which tries to > access PMC data will dereference a null pointer. > > > However, since our calling conventions now handle autoboxing, > > perhaps an even better solution would be to skip creating a > > return value PMC at all, but let the autoboxer handle it: > > > > METHOD lower() { > > STRING * const s = string_downcase(INTERP, > > VTABLE_get_string(INTERP, SELF)); > > RETURN(STRING *s); > > } > > This fixes the segfault. I'm running coretest now to see what happens.
Applied in r27684. -- c