clone 476579 -1 retitle 476579 libmoose-perl: uses an experimental perl regexp feature, breaks with threads retitle -1 perl: crash with ??{ code } regexps and threads reassign -1 perl 5.8.8-12 severity -1 normal thanks
On Thu, Apr 17, 2008 at 08:02:43PM +0200, Piotr Roszatycki wrote: > Package: libmoose-perl > Version: 0.40-1 > Severity: important > > Moose can't be used with threads: > (sid)[EMAIL PROTECTED]:/home/dexter# perl -ale 'use threads; package P; > use Moose; has "a" => isa=>"Str | Num"; package main; my $thr = > threads->create(sub { }); $thr->join(); ' > *** glibc detected *** perl: double free or corruption (!prev): 0x086c5480 *** Moose::Util::TypeConstraints uses the (??{ code }) regexp feature, which has this disclaimer in the 'perlre' document: WARNING: This extended regular expression feature is considered highly experimental, and may be changed or deleted without notice. A simplified version of the syntax may be introduced for commonly used idioms. I can reproduce the crash with just #!/usr/bin/perl use threads; use re 'eval'; my $a = qr{(??{a})}; print "match\n" if "bc" =~ /(??{b})/; my $thr = threads->create(sub { }); $thr->join(); __END__ I'm cloning a separate perl bug about this (with a lower severity because of the disclaimer). It looks like this is fixed in perl 5.10.0, which will hopefully enter sid soon, but I'll look into that better later. Cheers, -- Niko Tyni [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]