Skip Menu |

This queue is for tickets about the Win32-API CPAN distribution.

Report information
The Basics
Id: 96279
Status: rejected
Priority: 0/
Queue: Win32-API

People
Owner: Nobody in particular
Requestors: arul.csecit [...] ymail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.74
  • 0.77
Fixed in: (no value)



Subject: "Perl -MO=Xref Win32/API.pm" (0.74, 0.77) gives runtime error on Perl 5.12.4
When I execute the command "Perl -MO=Xref Win32/API.pm" on Win32-API (version 0.74, 0.77), a run-time exception occurs and Perl execution breaks (refer the snapshot attached). But "Perl -MO=Xref Win32/API.pm" works perfectly (i.e., no run-time error) with Win32-API-0.62 release. Used Perl version: perl 5, version 12, subversion 4 (v5.12.4) built for MSWin32-x86-multi-thread OS: Windows 7 Professional Edition Can you please fix it? / Let me know if you need any additional information? Thanks!
Subject: Perl-bigV_output.txt
Summary of my perl5 (revision 5 version 12 subversion 4) configuration: Platform: osname=MSWin32, osvers=5.2, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -DPERL_MSVCRT_READFIX', optimize='-MD -Zi -DNDEBUG -O1', cppflags='-DWIN32' ccversion='12.00.8168', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl512\Perl\lib\CORE" -machine:x86' libpth=\lib libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl512.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl512\Perl\lib\CORE" -machine:x86' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF USE_SITECUSTOMIZE Locally applied patches: ActivePerl Build 1205 [294981] c6fbf28 [perl #71806] perldb does not setup %dbline with the shebang option -d 1fd8fa4 Add Wolfram Humann to AUTHORS f120055 make string-append on win32 100 times faster a2a8d15 Define _USE_32BIT_TIME_T for VC6 and VC7 007cfe1 Don't pretend to support really old VC++ compilers 6d8f7c9 Get rid of obsolete PerlCRT.dll support d956618 Make Term::ReadLine::findConsole fall back to STDIN if /dev/tty can't be opened 321e50c Escape patch strings before embedding them in patchlevel.h Built under MSWin32 Compiled at Jun 20 2011 18:35:25 %ENV: @INC: C:/Perl512/Perl/site/lib C:/Perl512/Perl/lib .
Subject: Perl-v_output.txt
This is perl 5, version 12, subversion 4 (v5.12.4) built for MSWin32-x86-multi-thread (with 9 registered patches, see perl -V for more detail) Copyright 1987-2010, Larry Wall Binary build 1205 [294981] provided by ActiveState http://www.ActiveState.com Built Jun 20 2011 18:35:25 Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.
Subject: Win32-API-0.62-Xref_report.txt

Message body is not shown because it is too large.

Subject: Win32-API-0.74_Error.png
Win32-API-0.74_Error.png
Subject: Windows_EventViewer_log.txt
Faulting application name: perl.exe, version: 5.12.4.1205, time stamp: 0x4dfff9e8 Faulting module name: B.dll, version: 0.0.0.0, time stamp: 0x4dfff9e9 Exception code: 0xc0000005 Fault offset: 0x000010d8 Faulting process id: 0x2cc Faulting application start time: 0x01cf8175673f4adc Faulting application path: C:\Perl512\Perl\bin\perl.exe Faulting module path: C:\Perl512\Perl\lib\auto\B\B.dll Report Id: a5d8956b-ed68-11e3-bba4-0023241100fb
I am using a slightly different command line, "perl -MO=Xref -MWin32::API -E"0"". Its generating a segv as you have. I get First-chance exception at 0x100018e2 (B.dll) in : 0xC0000005: Access violation reading location 0x0000000a. callstack B.dll!make_sv_object(interpreter * my_perl=0x003923b4, sv * arg=0x00a7592c, sv * sv=0x00000002) Line 252 + 0x3 C B.dll!XS_B__GV_STASH(interpreter * my_perl=0x003923b4, cv * cv=0x0088a78c) Line 4903 + 0x22 C perl512.dll!Perl_pp_entersub(interpreter * my_perl=0x003923b4) Line 2882 + 0x10 C perl512.dll!Perl_runops_debug(interpreter * my_perl=0x003923b4) Line 2049 + 0xd C perl512.dll!Perl_call_sv(interpreter * my_perl=0x003923b4, sv * sv=0x008e49ec, volatile long flags=14) Line 2605 + 0x36 C perl512.dll!Perl_call_list(interpreter * my_perl=0x003923b4, long oldscope=1, av * paramList=0x008e4b6c) Line 4600 + 0x52 C perl512.dll!perl_parse(interpreter * my_perl=0x003923b4, void (interpreter *)* xsinit=0x281d2190, int argc=4, char * * argv=0x00284d68, char * * env=0x00285ed8) Line 1609 + 0x17 C perl512.dll!RunPerl(int argc=4, char * * argv=0x00284d68, char * * env=0x00285ed8) Line 263 + 0x1a C++ perl.exe!main(int argc=4, char * * argv=0x00284d68, char * * env=0x00283390) Line 23 + 0x12 C perl.exe!mainCRTStartup() Line 398 + 0xe C kernel32.dll!_BaseProcessStart@4() + 0x23 the gv in XSUB XS_B__GV_STASH, is type 9, which means GV, yet sv_u, is a string pointer to the string/PV "num". Also in the SV body, it has magic of type "B" (#define PERL_MAGIC_bm 'B' /* Boyer-Moore (fast string search) */) and vtable of PL_vtbl_bm. Which is very wrong for a GV. I have to figure out where I am in PP and where it got this broken GV from.
Not reproducable on 5.16 and 5.19. Strawberry 5.14 might have crashed. Another callstack from AP 5.14 ----------------------------- B.dll!make_sv_object(interpreter * my_perl=0x0000000000339028, sv * sv=0x0000000000000000) Line 268 C B.dll!XS_B__IV_IVX(interpreter * my_perl=0x0000000001c07e48, cv * cv=0x0000000001c01b70) Line 1520 C perl514.dll!Perl_pp_entersub(interpreter * my_perl=0x0000000000339028) Line 3049 C perl514.dll!Perl_runops_standard(interpreter * my_perl=0x0000000000339028) Line 41 + 0x6 bytes C perl514.dll!Perl_call_sv(interpreter * my_perl=0x0000000000339028, sv * sv=0x0000000001cfef70, volatile long flags=14) Line 2649 C perl514.dll!Perl_call_list(interpreter * my_perl=0x0000000000339028, long oldscope=1, av * paramList=0x0000000001cfef70) Line 4720 C perl514.dll!perl_parse(interpreter * my_perl=0x0000000000339028, void (interpreter *)* xsinit=0x0000000028023cc0, int argc=1, char * * argv=0x0000000000334140, char * * env=0x0000000000337aa0) Line 1621 C perl514.dll!RunPerl(int argc=0, char * * argv=0x0000000000000000, char * * env=0x0000000000000000) Line 264 C perl.exe!mainCRTStartup() Line 501 + 0x13 bytes C kernel32.dll!BaseProcessStart() + 0x2c bytes ----------------
Subject: 5.16 passes with api 0.75.txt

Message body is not shown because it is too large.

Subject: 5.19 passes with api 0.77.txt

Message body is not shown because it is too large.

Subject: strawberry 5.14 with api 0.77 maybe crashed.txt
C:\Documents and Settings\Administrator\Desktop\w32api>perl -MO=Xref -MWin32::AP I -E"0" C:\Documents and Settings\Administrator\Desktop\w32api>perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for MSWin32-x64-multi-t hread Copyright 1987-2011, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. C:\Documents and Settings\Administrator\Desktop\w32api>perl -V Summary of my perl5 (revision 5 version 14 subversion 2) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x64-multi-thread uname='Win32 strawberryperl 5.14.2.1 #1 Tue Nov 22 22:40:59 2011 x64' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags =' -ggdb -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMO DE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno- strict-aliasing -mms-bitfields', optimize=' -O2 ', cppflags='-DWIN32' ccversion='', gccversion='4.4.7', gccosandvers='' intsize=4, longsize=4, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='long long', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++', ldflags =' -L"C:\sperl\perl\lib\CORE" -L"C:\sperl\c\lib"' libpth=C:\sperl\c\lib C:\sperl\c\x86_64-w64-mingw32\lib libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladva pi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lver sion -lodbc32 -lodbccp32 -lcomctl32 libc=, so=dll, useshrplib=true, libperl=libperl514.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -L"C:\sperl\perl\lib\CORE" -L"C:\sperl\c\l ib"' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PL_OP_SLAB_ALLOC USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF USE_SITECUSTOMIZE Built under MSWin32 Compiled at Nov 22 2011 22:53:05 @INC: C:/sperl/perl/site/lib C:/sperl/perl/vendor/lib C:/sperl/perl/lib . C:\Documents and Settings\Administrator\Desktop\w32api>
From: rurban [...] x-ray.at
On Fri Jun 06 07:55:39 2014, arul.csecit@ymail.com wrote: Show quoted text
> When I execute the command "Perl -MO=Xref Win32/API.pm" on Win32-API > (version 0.74, 0.77), a run-time exception occurs and Perl execution > breaks (refer the snapshot attached).
This is a B::Xref bug, nothing that Win32::API can fix. I'll try to find a reproducer on a better platform and fix it in core. It sounds very familiar to me.
From: rurban [...] x-ray.at
On Sat Jun 07 00:57:06 2014, rurban@x-ray.at wrote: Show quoted text
> This is a B::Xref bug, nothing that Win32::API can fix. > I'll try to find a reproducer on a better platform and fix it in core. > It sounds very familiar to me.
A better reproducable bug (e.g. on linux) is with 5.12 and 5.14 threaded with -e'use ExtUtils::ParseXS'. at B/Xref.pm:160 next if class($valsv->STASH) eq 'SPECIAL'; for a B::BM object which is falsely reported as GV in these versions. I had to fix that in B::C also. The fix is as follows: --- /usr/local/lib/perl5/5.14.4/x86_64-linux-thread-multi-debug/B/Xref.pm.orig 2013-12-02 17:01:18.000000000 -0600 +++ /usr/local/lib/perl5/5.14.4/x86_64-linux-thread-multi-debug/B/Xref.pm 2014-06-07 00:10:31.418466112 -0500 @@ -157,6 +157,7 @@ for ($ix = 1; $ix < @vallist; $ix++) { my $valsv = $vallist[$ix]; next unless class($valsv) eq "GV"; + next if $] > 5.010 and $valsv->FLAGS & 0x40000000; # no B::BM next if class($valsv->STASH) eq 'SPECIAL'; # these pad GVs don't have corresponding names, so same @pad # array can be used without collisions
From: arul.csecit [...] ymail.com
On Sat Jun 07 01:13:46 2014, rurban@x-ray.at wrote: Show quoted text
> On Sat Jun 07 00:57:06 2014, rurban@x-ray.at wrote:
> > This is a B::Xref bug, nothing that Win32::API can fix. > > I'll try to find a reproducer on a better platform and fix it in > > core. > > It sounds very familiar to me.
> > A better reproducable bug (e.g. on linux) is with 5.12 and 5.14 > threaded with -e'use ExtUtils::ParseXS'. > at B/Xref.pm:160 > next if class($valsv->STASH) eq 'SPECIAL'; > for a B::BM object which is falsely reported as GV in these versions. > I had to fix that in B::C also. > > The fix is as follows: > > --- /usr/local/lib/perl5/5.14.4/x86_64-linux-thread-multi- > debug/B/Xref.pm.orig 2013-12-02 17:01:18.000000000 -0600 > +++ /usr/local/lib/perl5/5.14.4/x86_64-linux-thread-multi- > debug/B/Xref.pm 2014-06-07 00:10:31.418466112 -0500 > @@ -157,6 +157,7 @@ > for ($ix = 1; $ix < @vallist; $ix++) { > my $valsv = $vallist[$ix]; > next unless class($valsv) eq "GV"; > + next if $] > 5.010 and $valsv->FLAGS & 0x40000000; # no > B::BM > next if class($valsv->STASH) eq 'SPECIAL'; > # these pad GVs don't have corresponding names, so same > @pad > # array can be used without collisions
The fix works for me. Thanks for your time!
From: arul.csecit [...] ymail.com
On Tue Jun 10 02:20:39 2014, arul.csecit@ymail.com wrote: Show quoted text
> On Sat Jun 07 01:13:46 2014, rurban@x-ray.at wrote:
> > On Sat Jun 07 00:57:06 2014, rurban@x-ray.at wrote:
> > > This is a B::Xref bug, nothing that Win32::API can fix. > > > I'll try to find a reproducer on a better platform and fix it in > > > core. > > > It sounds very familiar to me.
> >
>
One question: If it is a B::Xref bug, Will it be fixed in future versions? or Is it already fixed? Well, I am not so familiar with Perl internals. :) But as you say, it is not reproducable on 5.16 and 5.19, should I consider that B::Xref bug is fixed in those versions?
Subject: Re: [rt.cpan.org #96279] "Perl -MO=Xref Win32/API.pm" (0.74, 0.77) gives runtime error on Perl 5.12.4
Date: Tue, 10 Jun 2014 23:15:03 -0500
To: bug-Win32-API [...] rt.cpan.org
From: Reini Urban <rurban [...] x-ray.at>
On Tue, Jun 10, 2014 at 1:28 AM, arul.csecit@ymail.com via RT <bug-Win32-API@rt.cpan.org> wrote: Show quoted text
> One question: > > If it is a B::Xref bug, Will it be fixed in future versions? or Is it already fixed?
It was actually a B bug, fixed with 5.16. For 5.12 and 5.14 I'd need to fix all the B modules against BM being reported as GV with this special line. Since those 2 versions are not supported anymore I patched it privately. Show quoted text
> Well, I am not so familiar with Perl internals. :) > But as you say, it is not reproducable on 5.16 and 5.19, should I consider that B::Xref bug is fixed in those versions?
Yes, it is fixed since 5.16. I consider adding a patch to perlall for 5.1[24], or maybe adding a 5.14.5 for our purposes, as I had to add a few more fixes to maint-5.14 already. https://github.com/rurban/perl/commits/maint-5.14 more patches coming. B::*, hash security and performance, and some more. -- Reini Urban http://cpanel.net/ http://www.perl-compiler.org/
RT-Send-CC: rurban [...] x-ray.at
Rejecting since this a p5p problem. B::Xref isn't distributed on CPAN, so there is no official upgrade other than to upgrade to 5.16 >= or patching it yourself as rurban did. My thread with p5p that never got any responses for archive reasons. http://www.nntp.perl.org/group/perl.perl5.porters/2014/07/msg218244.html