On Mon, Nov 10, 2003 at 11:10:06PM -0000, timbo@dansat.data-plan.com (via RT) wrote: > > DBI 1.38 (and probably other versions) fail tests on a perl 5.8.2 > configured with -Duseithreads -Dusemultiplicity -Duse64bitint > > t/05thrclone...........Usage: DBI::_clone_dbis() at t/05thrclone.t line 32. > # Looks like your test died before it could output anything. > > DBI::_clone_dbis() looks like > > void > _clone_dbis() > CODE: > dPERINTERP; > dbi_bootinit(DBIS); > > and is called with no arguments by DBI::CLONE > > sub CLONE { > my $olddbis = $DBI::_dbistate; > _clone_dbis() unless $DBI::PurePerl; # clone the DBIS structure > ... > } > > I've no time at the moment to find out which combinations of > -Duseithreads, -Dusemultiplicity, and -Duse64bitint do or don't > trigger this problem. I get the same failure with just -Duseithreads (without -Dusemultiplicity -Duse64bitint). Although _clone_dbis is being called with no parameters, the 'items' variable in the _clone_dbis XS code is 3. Here's an sv_dump of the three parameters: SV = PVAV(0x8377eec) at 0x8376e58 REFCNT = 1 FLAGS = (PADBUSY,PADMY) IV = 0 NV = 0 ARRAY = 0x0 FILL = -1 MAX = -1 ARYLEN = 0x0 FLAGS = (REAL) SV = PV(0x81dfd8c) at 0x83777a8 REFCNT = 1 FLAGS = (PADBUSY,PADTMP,POK,READONLY,pPOK) PV = 0x81a8470 "threads"\0 CUR = 7 LEN = 8 SV = RV(0x81ca118) at 0x81a6b0c REFCNT = 1 FLAGS = (TEMP,ROK) RV = 0x81be354 Here's the code for the test that's triggering the failure: $DBI::neat_maxlen = 12345; sub tests1 { is($DBI::neat_maxlen, 12345); } my @thr; foreach (1..10) { push @thr, threads->create( \&tests1 ); tests1(); } $_->join foreach @thr; I've determined that the three spurious args to _clone_dbis are the @thr (the AV, not a ref), the "threads" string used for the static class name in the crate() call, and the ref passed to create(). In other words, values that have no business getting passed to a sub called with no args from a CLONE sub. Very broken with 5.8.2. Works fine with 5.8.1 and 5.8.0 and earlier. I've no time to dig deeper. Sorry. Tim.Thread Previous | Thread Next