Subject: | Use of threads causes a doublefree |
Date: | Thu, 21 Sep 2017 13:51:24 +0100 |
To: | bug-Math-Random-MT [...] rt.cpan.org |
From: | Peter Roberts <me [...] peter-r.co.uk> |
Here's a minimal reproduction
use threads;
use Math::Random::MT;
my $gen = Math::Random::MT->new(0);
async {} -> join();
➜ framework git:(threads-for-io) ✗ perl -V
Summary of my perl5 (revision 5 version 26 subversion 0) configuration:
Platform:
osname=linux
osvers=4.10.0-33-generic
archname=x86_64-linux-thread-multi
uname='linux proberts-ubu 4.10.0-33-generic #37-ubuntu smp fri aug 11
10:55:28 utc 2017 x86_64 x86_64 x86_64 gnulinux '
config_args='-de -Dprefix=/home/peter/perl5/perlbrew/perls/alt
-Dusethreads -Aeval:scriptdir=/home/peter/perl5/perlbrew/perls/alt/bin'
hint=recommended
useposix=true
d_sigaction=define
useithreads=define
usemultiplicity=define
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
bincompat5005=undef
Compiler:
cc='cc'
ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64'
optimize='-O2'
cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include'
ccversion=''
gccversion='6.3.0 20170406'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype='long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='cc'
ldflags =' -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib
/usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.24.so
so=so
useshrplib=false
libperl=libperl.a
gnulibc_version='2.24'
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-E'
cccdlflags='-fPIC'
lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'
Characteristics of this binary (from libperl):
Compile-time options:
HAS_TIMES
MULTIPLICITY
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
USE_64_BIT_ALL
USE_64_BIT_INT
USE_ITHREADS
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_PERLIO
USE_PERL_ATOF
USE_REENTRANT_API
Locally applied patches:
Devel::PatchPerl 1.48
Built under linux
Compiled at Sep 11 2017 15:21:04
%ENV:
PERLBREW_FISH_VERSION="0.80"
PERLBREW_HOME="/home/peter/.perlbrew"
PERLBREW_MANPATH="/home/peter/perl5/perlbrew/perls/alt/man"
PERLBREW_PATH="/home/peter/perl5/perlbrew/bin
/home/peter/perl5/perlbrew/perls/alt/bin"
PERLBREW_PERL="alt"
PERLBREW_ROOT="/home/peter/perl5/perlbrew"
PERLBREW_VERSION="0.80"
@INC:
/home/peter/perl5/perlbrew/perls/alt/lib/site_perl/5.26.0/x86_64-linux-thread-multi
/home/peter/perl5/perlbrew/perls/alt/lib/site_perl/5.26.0
/home/peter/perl5/perlbrew/perls/alt/lib/5.26.0/x86_64-linux-thread-multi
/home/peter/perl5/perlbrew/perls/alt/lib/5.26.0
Peter