Skip Menu |

This queue is for tickets about the Math-Rand48 CPAN distribution.

Report information
The Basics
Id: 95350
Status: open
Priority: 0/
Queue: Math-Rand48

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

Bug Information
Severity: (no value)
Broken in: 1.00
Fixed in: (no value)



Subject: Test suite fails with perl 5.19.x
PERL_DL_NONLAZY=1 /bbbike/ctps/51911linux/install/perl-5.19.11/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t e = 3.90799e-14 x = 0.0913306 e = 0.000985395 x = 0.0922976 e = 0.041631 x = 0.487217 e = 0.176643 x = 0.52675 e = 0.364602 x = 0.454433 t/base.t .. Failed 5/37 subtests
Bisect on bleadperl leads to v5.19.0-246-g13b0f67
This commit was related to COW which had an adventurous fate in the 5.19 sycle. Most talk about COW has happened in https://rt.perl.org//Public/Bug/Display.html?id=115910
On Sun May 04 13:18:50 2014, SREZIC wrote: Show quoted text
> PERL_DL_NONLAZY=1 /bbbike/ctps/51911linux/install/perl- > 5.19.11/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" > "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', > 'blib/arch')" t/*.t > e = 3.90799e-14 x = 0.0913306 > e = 0.000985395 x = 0.0922976 > e = 0.041631 x = 0.487217 > e = 0.176643 x = 0.52675 > e = 0.364602 x = 0.454433 > t/base.t .. > Failed 5/37 subtests
The SVtoSeed() function returns the sv's PVX without ensuring the SV isn't shared. The attached patch fixes that. Tony
Subject: Math-Rand48.diff
diff -ru Math-Rand48-1.00-orig/Rand48.xs Math-Rand48-1.00/Rand48.xs --- Math-Rand48-1.00-orig/Rand48.xs 1998-12-31 19:30:35.000000000 +1100 +++ Math-Rand48-1.00/Rand48.xs 2014-05-15 14:01:30.000000000 +1000 @@ -23,6 +23,11 @@ seed_t SVtoSeed(SV *sv) { + /* the return value might be written to, so always clean up any strangeness + SvPV_force() isn't appropriate since the IV part might be read. + */ + if (SvTHINKFIRST(sv)) + sv_force_normal(sv); if (!SvPOK(sv) || SvCUR(sv) != 3*sizeof(unsigned short) ) { if (SvPOK(sv) && SvCUR(sv) > 3*sizeof(unsigned short))