Front page | perl.perl5.porters |
Postings from November 2006
Re: Trouble with PERLIO_INIT/PERLIO_TERM changes
Thread Previous
|
Thread Next
From:
demerphq
Date:
November 29, 2006 08:10
Subject:
Re: Trouble with PERLIO_INIT/PERLIO_TERM changes
Message ID:
9b18b3110611290810r6e0f4c7ei35aaba141eced056@mail.gmail.com
On 11/29/06, Steve Hay <steve.hay@uk.radan.com> wrote:
> I've found that my Win32-SharedFileOpen module currently fails a bunch
> of tests using bleadperl: the test scripts croak with the error:
>
> refcnt_dec: fd 3: 0 <= 0
>
> It works OK at patchlevel 29059. Change 29060 is probably the culprit,
> but actually broke the build on Win32 so it is difficult to be sure.
> Change 29065 fixed the linker error, but the "nmake install" step still
> falls over. That was finally fixed by 29074, and from that patchlevel
> onwards my module no longer works.
>
> Change 29060 defined PERLIO_INIT and PERLIO_TERM and added PERLIO_TERM
> to PERL_SYS_TERM.
>
> Change 29074 added PERLIO_INIT to PERL_SYS_INIT, which was apparently
> forgotten in 29060.
>
> Change 29077 extended the above to other *ish.h headers (only unixish.h
> and dosish.h had been addressed until then).
>
> In the course of trawling through all this I noticed that:
>
> 1. #29060 seems to have cocked up something else too: it added
> PERLIO_TERM into PERL_SYS_TERM() in the general case, but failed to
> notice that the WIN32 case defined PERL_SYS_TERM() as Perl_win32_term(),
> which hasn't been updated to suit. I think therefore that the attached
> patch is required?
>
> 2. #29077 has perhaps forgotten symbian/symbian.ish?
>
> 3. HINTS_REFCNT_INIT/HINTS_REFCNT_TERM and OP_REFCNT_INIT/OP_REFCNT_TERM
> are not covered in every *ish.h file either. Should they be?
>
> Unfortunately, even with the attached patch applied, I still haven't
> resolved the failure of my module's tests.
>
> I've whittled the problem down to this:
>
> perl -Mblib -MWin32::SharedFileOpen -e "fsopen(FH, 'README', 'r',
> SH_DENYNO); close FH"
>
> which croaks with the error "refcnt_dec: fd 3: 0 <= 0" emitted from here:
>
> > perl59.dll!PerlIOUnix_refcnt_dec(int fd=3) Line 2357 C
> perl59.dll!PerlIOStdio_close(interpreter * my_perl=0x00254224,
> _PerlIO * * f=0x01823134) Line 3115 + 0x9 bytes C
> perl59.dll!PerlIOBase_close(interpreter * my_perl=0x00254224, _PerlIO
> * * f=0x018249c4) Line 2157 + 0x10 bytes C
> perl59.dll!PerlIOBuf_close(interpreter * my_perl=0x00254224, _PerlIO
> * * f=0x018249c4) Line 3994 + 0xd bytes C
> perl59.dll!PerlIO__close(interpreter * my_perl=0x00254224, _PerlIO *
> * f=0x018249c4) Line 1399 + 0x10 bytes C
> perl59.dll!Perl_PerlIO_close(interpreter * my_perl=0x00254224,
> _PerlIO * * f=0x018249c4) Line 1412 + 0xd bytes C
> perl59.dll!Perl_io_close(interpreter * my_perl=0x00254224, io *
> io=0x0199c0f4, char not_implicit='') Line 977 + 0x12 bytes C
> perl59.dll!Perl_do_close(interpreter * my_perl=0x00254224, gv *
> gv=0x0025520c, char not_implicit='') Line 940 + 0x11 bytes C
> perl59.dll!Perl_pp_close(interpreter * my_perl=0x00254224) Line 600
> + 0xf bytes C
>
> Any ideas?
Uh, useless datapoint maybe, but why wouldnt Win32API::File fail
similarly? It supports shared file opens as well...
Yves
--
perl -Mre=debug -e "/just|another|perl|hacker/"
Thread Previous
|
Thread Next