Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Mouse CPAN distribution.

Report information
The Basics
Id: 88295
Status: open
Priority: 0/
Queue: Mouse

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 1.11
  • 1.12
Fixed in: (no value)



Subject: [PATCH] Fix for perl 5.19.4-to-be
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: Web
Message-ID: <rt-4.0.16-28775-1377897740-219.0-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1377897740-28775-1"
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
Content-Length: 151
Download (untitled) / with headers
text/plain 151b
Perl 5.19.4 and up use NULL to represent nonexistent array elements. This causes Mouse to crash. The attached patch is one possible way to fix this.
Subject: open_56GGGm4h.txt
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"; name="open_56GGGm4h.txt"
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline; filename="open_56GGGm4h.txt"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: ascii
Content-Length: 1435
Download open_56GGGm4h.txt
text/plain 1.4k
diff -rup Mouse-1.11-2l40Hq/mouse.h Mouse-1.11-8jslEf/mouse.h --- Mouse-1.11-2l40Hq/mouse.h 2012-08-26 18:23:13.000000000 -0700 +++ Mouse-1.11-8jslEf/mouse.h 2013-08-30 12:59:26.000000000 -0700 @@ -90,10 +90,11 @@ MAGIC* mouse_mg_find(pTHX_ SV* const sv, /* MOUSE_av_at(av, ix) is the safer version of AvARRAY(av)[ix] if perl is compiled with -DDEBUGGING */ #ifdef DEBUGGING -#define MOUSE_av_at(av, ix) *mouse_av_at_safe(aTHX_ (av) , (ix)) -SV** mouse_av_at_safe(pTHX_ AV* const mi, I32 const ix); +#define MOUSE_av_at(av, ix) mouse_av_at_safe(aTHX_ (av) , (ix)) +SV* mouse_av_at_safe(pTHX_ AV* const mi, I32 const ix); #else -#define MOUSE_av_at(av, ix) AvARRAY(av)[ix] +#define MOUSE_av_at(av, ix) \ + (AvARRAY(av)[ix] ? AvARRAY(av)[ix] : &PL_sv_undef) #endif #define MOUSE_mg_obj(mg) ((mg)->mg_obj) diff -rup Mouse-1.11-2l40Hq/xs-src/MouseUtil.xs Mouse-1.11-8jslEf/xs-src/MouseUtil.xs --- Mouse-1.11-2l40Hq/xs-src/MouseUtil.xs 2013-04-24 21:49:45.000000000 -0700 +++ Mouse-1.11-8jslEf/xs-src/MouseUtil.xs 2013-08-30 12:59:37.000000000 -0700 @@ -76,12 +76,12 @@ mouse_mro_get_linear_isa(pTHX_ HV* const #endif /* !no_mor_get_linear_isa */ #ifdef DEBUGGING -SV** +SV* mouse_av_at_safe(pTHX_ AV* const av, I32 const ix){ assert(av); assert(SvTYPE(av) == SVt_PVAV); assert(AvMAX(av) >= ix); - return &AvARRAY(av)[ix]; + return AvARRAY(av)[ix] ? AvARRAY(av)[ix] : &PL_sv_undef; } #endif
MIME-Version: 1.0
In-Reply-To: <rt-4.0.16-28775-1377897740-219.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.16-28775-1377897740-219.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.16-8050-1380527705-375.88295-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 130
Download (untitled) / with headers
text/plain 130b
Just FYI, I have verified that 1.12 does not work with 5.19.4 and that the patch still applies for 1.12 and makes all tests pass.


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.