develooper Front page | perl.perl5.porters | Postings from March 2003

Re: [perl #21614] 5.8.0 Unbalanced string table refcount

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
March 25, 2003 01:06
Subject:
Re: [perl #21614] 5.8.0 Unbalanced string table refcount
Message ID:
20030325090607.G62323@plum.flirble.org
On Tue, Mar 25, 2003 at 09:56:03AM +0100, Rafael Garcia-Suarez wrote:
> Nicholas Clark <nick@unfortu.net> wrote:
> > 
> > It's fixed in blead for the normal case (not copy on write), but not for
> > copy on write. The code paths in Perl_sv_force_normal_flags are completely
> > different depending on whether perl is built with copy on write
> 
> It produces a segfault here, not a warning.
> 
> #0  0x80df23b in S_sv_release_COW (sv=0x8189604, 
>     pvx=0x8197bf0 "k\r\024@ð\r\024@", cur=1, len=80, hash=2150891594, 
>     after=0x8034004a) at sv.c:4353
> 4353            SV *current = SV_COW_NEXT_SV(after);

That's for copy on write? That's what I see for copy on write.
IIRC it's a warning on 5.8.0, an assertion failure on maint, a SEGV on blead
with COW, and seemingly clean on blead without COW. However, I'm not
convinced that it's actually doing the right thing on blead without COW.
I think it's more chance, and down to how sv_grow and related functions
were re-written.

I'll need to think about it some more when I get home.

> > How does one write a regression test to check for lack of warnings?
> > Make a new perl and check that STDERR is empty?
> 
> Adding it to t/lib/warnings/perl should be sufficient ?
> the "Unbalanced string table refcount" is marked TODO here.

Except that I'm trying to test that there's no warning issued for a known
problem case. So I don't think that putting it in the warnings test is the
right place.

It's somewhat difficult to write a correct warnings test for
"Unbalanced string table refcount" given that any that show up are bugs that
need fixing. Unless we deliberately write some XS.

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About