On Tue, Nov 11, 2003 a.d., Tim Bunce wrote: > 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. Change 21589 broke it. It adds a PERL_SET_CONTEXT(proto_perl) in the perl_clone_using function (sv.c:109999). So when the CLONE method from the DBI stash is called (at sv.c:11658), it will get (via the dSP, etc macros) the PL_stack_base, PL_stack_sp pointers _not_ from the new interpreter (my_perl), but from the old one (the proto_perl in sv.c). Fortunately this should happen only with -DDEBUGGING builds. I have no idea why that PERL_SET_CONTEXT has been put there. The change description says something about eggs and chickens. That kind of problems go far beyond my understanding. Regards, Adi PS. I get tons of warnings about casts between integers and pointers of different sizes when building DBI 1.38. The following trivial patch silents them. --- DBI.xs~ Thu Nov 13 05:31:30 2003 +++ DBI.xs Thu Nov 13 05:31:35 2003 @@ -159,13 +159,13 @@ typedef struct { # define dPERINTERP_PTR(T,name) \ T name = (T)(perinterp_sv && SvIOK(perinterp_sv) \ - ? (T)SvIVX(perinterp_sv) : NULL) + ? INT2PTR(T, SvIVX(perinterp_sv)) : NULL) # define dPERINTERP \ dPERINTERP_SV; dPERINTERP_PTR(PERINTERP_t *, PERINTERP) # define INIT_PERINTERP \ dPERINTERP; \ Newz(0,PERINTERP,1,PERINTERP_t); \ - sv_setiv(perinterp_sv, (IV)PERINTERP) + sv_setiv(perinterp_sv, PTR2IV(PERINTERP)) # undef DBIS # define DBIS (PERINTERP->dbi_state) @@ -223,7 +223,7 @@ INIT_PERINTERP; #endif /* publish address of dbistate so dynaloaded DBD's can find it */ - sv_setiv(perl_get_sv(DBISTATE_PERLNAME,1), (IV)DBIS); + sv_setiv(perl_get_sv(DBISTATE_PERLNAME,1), PTR2IV(DBIS)); DBISTATE_INIT; /* check DBD code to set DBIS from DBISTATE_PERLNAME */Thread Previous | Thread Next