Subject: | Data::UUID not thread safe |
Date: | Fri, 15 Aug 2008 10:10:57 -0400 |
To: | <bug-Data-UUID [...] rt.cpan.org> |
From: | "Desjardins, Kristian" <kdesjard [...] NRCan.gc.ca> |
I have found that the Data::UUID module is not thread-safe. By using a
simple example (from perlthrtut), loading the Data::UUID module, and
creating a Data::UUID object will cause the program to crash.
-----------------------
use threads;
use Data::UUID;
use strict;
use warnings;
my $ug = Data::UUID->new();
my ($thr) = threads->create(\&sub1);
my @ReturnData = $thr->join();
print('Thread returned ', join(', ', @ReturnData), "\n");
sub sub1 { return ('Fifty-six', 'foo', 2); }
----------------------
Thread returned Fifty-six, foo, 2
*** glibc detected *** perl: corrupted double-linked list: 0x0935a770
***
======= Backtrace: =========
/lib/libc.so.6[0x771106]
/lib/libc.so.6[0x7728af]
/lib/libc.so.6(cfree+0x90)[0x776070]
perl(Perl_mg_free+0x28)[0x8097548]
perl(Perl_sv_clear+0x2f2)[0x80c2642]
perl(Perl_sv_free2+0x4a)[0x80c2cba]
perl(Perl_gp_free+0x265)[0x813a885]
perl(Perl_sv_clear+0x6fa)[0x80c2a4a]
perl(Perl_sv_free2+0x4a)[0x80c2cba]
perl[0x80b8932]
perl(Perl_sv_clean_all+0x26)[0x80b89e6]
perl(perl_destruct+0xf44)[0x80ad774]
perl(main+0xc2)[0x805fb52]
/lib/libc.so.6(__libc_start_main+0xdc)[0x71fdec]
perl[0x805f9d1]