On Saturday 08 December 2007 18:17:17 chromatic wrote:

> Test #9 in t/oo/new.t consumes ever-increasing amounts of memory for me.  I
> ran it in the debugger, caused a segfault, and stopped the backtrace at:
>
> #17283 0xb7e39340 in Parrot_Key_get_string (interp=0x804f008,
> pmc=0x8262790) at ./src/pmc/key.pmc:146
> #17284 0xb7d0b741 in key_string (interp=0x804f008, key=0x8262790)
>     at src/key.c:442
> #17285 0xb7e39340 in Parrot_Key_get_string (interp=0x804f008,
> pmc=0x8262790) at ./src/pmc/key.pmc:146
> #17286 0xb7d0b741 in key_string (interp=0x804f008, key=0x8262790)
> ---Type <return> to continue, or q <return> to quit---q
>  at src/key.c:4Quit
>
> Let's call that an infinite loop.

My favorite option so far is to check if the Key PMC has any flags set and 
call key_string() if so.  Otherwise, it returns the empty string.

All coretests pass without infinite loops with this patch applied.

-- c

Reply via email to