Bug#479580: Can't reproduce bug

David Caldwell david at porkrind.org
Tue May 20 17:15:35 UTC 2008


Martín Ferrari wrote:
> Hi David,
> 
> On Mon, May 19, 2008 at 2:09 PM, David Caldwell <david at porkrind.org> wrote:
> 
> Agreed, but I've tried both with 2.0 and 2.1 releases without getting
> any segmentation fault:
>
[...]
> I'm also using the same libflac version as you, so I don't understand
> what could be happening here. Could you try this again, before and
> after updating to the latest versions from unstable? I now have perl
> 5.10 so if this was fixed with that transition, I cannot test it now.

It now works for me too--I just updated to perl 5.10 yesterday. To 
verify that that was indeed the source of the fix, I poked around in the 
perl sources. The bug was passing a NULL pointer to newSVpv() (with 
len=0). Here's the relevant source for 5.8.8 and 5.10:

sv.c in 5.8.8:
> Perl_newSVpv(pTHX_ const char *s, STRLEN len)
> {
>     register SV *sv;
> 
>     new_SV(sv);
>     sv_setpvn(sv,s,len ? len : strlen(s));
>     return sv;
> }

sv.c in 5.10:
> Perl_newSVpv(pTHX_ const char *s, STRLEN len)
> {
>     dVAR;
>     register SV *sv;
> 
>     new_SV(sv);
>     sv_setpvn(sv, s, len || s == NULL ? len : strlen(s));
>     return sv;
> }

So they check for a NULL pointer in the new perl, thus fixing the crash. 
Yay!

-David

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 304 bytes
Desc: OpenPGP digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20080520/f74e7bf4/attachment.pgp 


More information about the pkg-perl-maintainers mailing list