This queue is for tickets about the PadWalker CPAN distribution.

Report information
The Basics
Id:
41710
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
gfuji [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
(no value)
Fixed in:
1.9



Subject: closed_over(\&xsub) causes segfault (or assertion failed)
Hello. It seems that "closed_over(\&xsub)" (e.g. closed_over(\&UNIVERSAL::isa)) causes segfault, because XSUBs do not have PADLIST. Regards, -- Goro Fuji (GFUJI at CPAN.org)
The attached patch seems to stop the crashing... I don't really know enough about the internals to vouch for the accuracy, but it seems fine.
--- PadWalker.xs.old 2009-02-26 16:31:32.000000000 -0600 +++ PadWalker.xs 2009-02-26 16:25:39.000000000 -0600 @@ -357,6 +357,9 @@ void get_closed_over(CV *cv, HV *hash, HV *indices) { + if (!CvPADLIST(cv)) { + return; + } I32 i; U32 val_depth = CvDEPTH(cv) ? CvDEPTH(cv) : 1; AV *pad_namelist = (AV*) *av_fetch(CvPADLIST(cv), 0, FALSE);
Hi Robin, I've been using doy's patch since he wrote it - without trouble. It hasn't segfaulted once. Could you please push a release to CPAN with the fix? My users keep hitting this crash. Thanks for a wonderful module, Shawn
I'm sorry I overlooked this for so long. Email to my CPAN address was going into a black hole, and I didn't realise until last week. This patch looks fine; I'll roll it into a release ASAP. Robin
Hi: I'm one of the maintainers of the Debian package of this module. I am unable to reproduce this issue on version 1.9, and given what Robin said the day before the 1.9 release:
Show quoted text
> This patch looks fine; I'll roll it into a release ASAP.
I think it's fair assuming this issue has been fixed in that version.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.