develooper Front page | perl.perl5.porters | Postings from April 2008

[perl #53586] perl5.10 and blead crash on win32

From:
dk @ tetsuo . karasik . eu . org
Date:
April 30, 2008 18:04
Subject:
[perl #53586] perl5.10 and blead crash on win32
Message ID:
rt-3.6.HEAD-20841-1209591988-1268.53586-75-0@perl.org
# New Ticket Created by  dk@tetsuo.karasik.eu.org 
# Please include the string:  [perl #53586]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=53586 >



This is a bug report for perl from dmitry@karasik.eu.org,
generated with the help of perlbug 1.35 running under perl v5.8.8.


-----------------------------------------------------------------
[Please enter your report here]

The following script crashes perl on my win32 machines , both
5.10 and blead:

use strict;
use IO::Handle;

my $self = {};
my $h = IO::Handle-> new;
unless ( open $h, "> 11") {
	undef $h;
	die 0;
}
my $sigpipe;
defined($sigpipe) ? $SIG{PIPE} = $sigpipe : delete($SIG{PIPE});
$self-> {spoolHandle} = undef;
$sigpipe = undef;

The crash occurs, according to msvc debugger, in mg.c:2933, in S_restore_magic()
in line "if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv))" during SvMAGIC(sv), as 
sv-> sv_any is -1 there. See the screenshot of the debugger here:

http://karasik.eu.org/misc/510.png

I tried to poke around to see myself what might have caused the bug but quickly got
lost.

I checked the script on freebsd, causes no problem. Can anyone confirm the
problem? I can help by digging further, but need guidance.


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Summary of my perl5 (revision 5 version 11 subversion 0) configuration:
  Platform:
    osname=MSWin32, osvers=5.00, 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 -Od -MD -Zi -DDEBUGGING -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
    optimize='-Od -MD -Zi -DDEBUGGING',
    cppflags='-DWIN32'
    ccversion='11.00.7022', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
    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  -libpath:"c:\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 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 msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl511.lib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug  -libpath:"c:\perl\lib\CORE"  -machine:x86'


Characteristics of this binary (from libperl): 
  Compile-time options: DEBUGGING MULTIPLICITY PERL_DONT_CREATE_GVSV
                        PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
                        PERL_MALLOC_WRAP PERL_TRACK_MEMPOOL PL_OP_SLAB_ALLOC
                        USE_ITHREADS USE_LARGE_FILES USE_PERLIO
  Locally applied patches:
	DEVEL
  Built under MSWin32
  Compiled at Apr 30 2008 22:57:06
  %ENV:
    PERL5LIB_="c:\home\Prima\Prima"
  @INC:
    C:/home/src/blead/lib
    .




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About