On Fri, 4 Apr 2008 12:50:27 -0500 "Patrick R. Michaud" <[EMAIL PROTECTED]> wrote:
> On Fri, Apr 04, 2008 at 10:06:39AM -0700, chromatic wrote: > > On Thursday 03 April 2008 15:47:12 Mark Glines wrote: > > > > > When doing a test for --gc=libc, I noticed test 10 of > > > t/op/calling.t was hanging. The test creates a FixedIntegerArray > > > from the string "0, 0x20, 0x20, 0". The new_from_string() > > > constructor relies on STRING* buffers containing a trailing NULL > > > (which isn't counted in the "strlen" tally). The existence of > > > that NULL is not a valid assumption in the gc=libc case. > > > [...] > > > I've attached a fix. It isn't very pretty, and it probably > > > really hurts performance. But it fixes the hang, and allows the > > > test script to complete successfully. I am submitting it to RT > > > in the hopes that someone with better knowledge of parrot > > > internals can come up with a Better Way (tm). > > > > Using CONST_STRING to build the null STRING will hurt performance > > less, but the right solution is to excise all traces of > > new_from_string() throughout the system, and then completely forget > > it ever existed. > > Correct. Perhaps this ticket should be merged with RT#47011 , > which talks about new_from_string() being deprecated? (Or at least > link to that ticket.) If it's going to stay around, it should be fixed. But removing it entirely works for me too. Mark