Skip Menu |

This queue is for tickets about the Future-AsyncAwait CPAN distribution.

Report information
The Basics
Id: 124353
Status: resolved
Priority: 0/
Queue: Future-AsyncAwait

People
Owner: Nobody in particular
Requestors: leonerd-cpan [...] leonerd.org.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.16
Fixed in: 0.17



Subject: Unreliable failures from t/22context-foreach.t on 5.26
Sometimes passes, sometimes fails. Here's three debugperl runs: t/22context-foreach.t .. 1/? debugperl: gv.c:1504: S_gv_stashsvpvn_cached: Assertion `SvIOK(sv)' failed. t/22context-foreach.t .. All 7 subtests passed t/22context-foreach.t .. 1/? debugperl: scope.c:1209: Perl_leave_scope: Assertion `!((((sv)->sv_flags & (0x00004000|0x00008000)) == 0x00008000) && (((svtype)((sv)->sv_flags & 0xff)) == SVt_PVGV || ((svtype)((sv)->sv_flags & 0xff)) == SVt_PVLV))' failed. t/22context-foreach.t .. All 1 subtests passed t/22context-foreach.t .. ok -- Paul Evans
Still failing on 5.28 with 0.16; investigations continue. -- Paul Evans
Turned out to be a simple refcounting issue. Fixed in attached patch. -- Paul Evans
Subject: rt124353.patch
=== modified file 'lib/Future/AsyncAwait.xs' --- lib/Future/AsyncAwait.xs 2019-01-03 22:48:04 +0000 +++ lib/Future/AsyncAwait.xs 2019-01-04 15:22:42 +0000 @@ -707,12 +707,16 @@ SvREFCNT_inc(frame->el.loop.state_u.lazysv.cur); SvREFCNT_inc(frame->el.loop.state_u.lazysv.end); } -#if !HAVE_PERL_VERSION(5, 24, 0) - else if(type == CXt_LOOP_FOR) { + else if(type == +#if HAVE_PERL_VERSION(5, 24, 0) + CXt_LOOP_ARY +#else + CXt_LOOP_FOR +#endif + ) { if(frame->el.loop.state_u.ary.ary) SvREFCNT_inc(frame->el.loop.state_u.ary.ary); } -#endif continue;
Released in 0.17 -- Paul Evans