Skip Menu |
 

This queue is for tickets about the Devel-Caller CPAN distribution.

Report information
The Basics
Id: 33005
Status: resolved
Priority: 0/
Queue: Devel-Caller

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

Bug Information
Severity: Normal
Broken in: 2.03
Fixed in: (no value)



Subject: [PATCH] 5.11 breaks sanity check
Download (untitled) / with headers
text/plain 967b
Bleadperl@33018 introduces CXp_HASARGS and so the sanity check in _context_cv breaks. I patched it as below and the tests pass again but I don't know if it is a good fix. Let me know if and how it can be done better. Thanks. Patch (without tweaked whitespace) also available from CPAN as ANDK/patches/Devel-Caller-2.03-ANDK-01.patch.gz. --- Devel-Caller-2.03-KD9mnt.orig/Caller.xs 2008-01-08 15:39:43.000000000 +0100 +++ Devel-Caller-2.03-KD9mnt/Caller.xs 2008-02-08 05:04:18.000000000 +0100 @@ -12,8 +12,13 @@ SV* context; PERL_CONTEXT *cx = INT2PTR(PERL_CONTEXT *, SvIV(context)); CV *cur_cv; - if (cx->cx_type != CXt_SUB) - croak("cx_type is %d not CXt_SUB\n", cx->cx_type); + if (cx->cx_type != CXt_SUB +#ifdef CXp_HASARGS + /* perforce #33018 */ + && cx->cx_type != (CXt_SUB|CXp_HASARGS) +#endif + ) + croak("cx_type is %d not %d\n", cx->cx_type, CXt_SUB); cur_cv = cx->blk_sub.cv; if (!cur_cv)
Download (untitled) / with headers
text/plain 1.4k
On Thu Feb 07 23:24:43 2008, ANDK wrote: Show quoted text
> Bleadperl@33018 introduces CXp_HASARGS and so the sanity check in > _context_cv breaks. I patched it as below and the tests pass again but I > don't know if it is a good fix. Let me know if and how it can be done > better. Thanks. > > Patch (without tweaked whitespace) also available from CPAN as > ANDK/patches/Devel-Caller-2.03-ANDK-01.patch.gz. > > --- Devel-Caller-2.03-KD9mnt.orig/Caller.xs 2008-01-08 > 15:39:43.000000000 +0100 > +++ Devel-Caller-2.03-KD9mnt/Caller.xs 2008-02-08 05:04:18.000000000 +0100 > @@ -12,8 +12,13 @@ SV* context; > PERL_CONTEXT *cx = INT2PTR(PERL_CONTEXT *, SvIV(context)); > CV *cur_cv; > > - if (cx->cx_type != CXt_SUB) > - croak("cx_type is %d not CXt_SUB\n", cx->cx_type); > + if (cx->cx_type != CXt_SUB > +#ifdef CXp_HASARGS > + /* perforce #33018 */ > + && cx->cx_type != (CXt_SUB|CXp_HASARGS) > +#endif > + ) > + croak("cx_type is %d not %d\n", cx->cx_type, CXt_SUB); > > cur_cv = cx->blk_sub.cv; > if (!cur_cv) >
Actually, a simpler patch is to use the CxTYPE() macro. --- Caller.xs.old 2008-01-12 11:49:51.000000000 -0600 +++ Caller.xs 2009-07-13 20:54:45.000000000 -0500 @@ -12,7 +12,7 @@ PERL_CONTEXT *cx = INT2PTR(PERL_CONTEXT *, SvIV(context)); CV *cur_cv; - if (cx->cx_type != CXt_SUB) + if (CxTYPE(cx) != CXt_SUB) croak("cx_type is %d not CXt_SUB\n", cx->cx_type); cur_cv = cx->blk_sub.cv;
Download (untitled) / with headers
text/plain 103b
Have rewritten in terms of CxTYPE and shipped 2.04. Thanks -- Richard Clamp <richardc@unixbeard.net>


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

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