Skip Menu |
 

This queue is for tickets about the Math-Random-MT-Auto CPAN distribution.

Report information
The Basics
Id: 127809
Status: resolved
Priority: 0/
Queue: Math-Random-MT-Auto

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

Bug Information
Severity: Important
Broken in: 6.22
Fixed in: 6.23



Download (untitled) / with headers
text/plain 526b
Hi, We are hitting a strange issue within our stack and `$threads::shared::threads_shared ` (see the attachment) variable somehow gets defined and causing the next function call to be triggered, which in turn dies on non-threaded perl. We are not sure what is causing this to happen but perhaps it is better to check something like below in there: use Config; if ($Config{usethreads} && threads::shared::_id($seed)) { or even if ($Config{usethreads} && $threads::shared::threads_shared && threads::shared::_id($seed)) {
Subject: disable-threads.txt
diff -ru --new-file Math-Random-MT-Auto-6.22/lib/Math/Random/MT/Auto.pm Math-Random-MT-Auto-6.22-new/lib/Math/Random/MT/Auto.pm --- Math-Random-MT-Auto-6.22/lib/Math/Random/MT/Auto.pm 2012-09-04 16:06:22.000000000 +0200 +++ Math-Random-MT-Auto-6.22-new/lib/Math/Random/MT/Auto.pm 2018-11-22 14:20:35.891056664 +0100 @@ -644,7 +644,8 @@ my $seed = $seed_for{$$prng}; # Get the seed for the PRNG - if ($threads::shared::threads_shared && threads::shared::_id($seed)) { + if (0 && $threads::shared::threads_shared && threads::shared::_id($seed)) {
Download (untitled) / with headers
text/plain 514b
Thank you for this problem report. I have taken your suggestion to use Config{useithreads} in conjunction with $threads::shared::threads_shared to handle the case where threads::shared is loaded on a non-threaded Perl instance. The fix has been distributed to CPAN as version 6.23. As I don't have a non-threaded Perl instance, I have not actually tested this fix, but I have reasonable confidence in my implementation. However, as I'm only human, please let me know if you have any further issues with this.


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.