Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call stack bug in perl5 #9679

Closed
p5pRT opened this issue Mar 11, 2009 · 8 comments
Closed

call stack bug in perl5 #9679

p5pRT opened this issue Mar 11, 2009 · 8 comments

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Mar 11, 2009

Migrated from rt.perl.org#63790 (status was 'resolved')

Searchable as RT63790$

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 11, 2009

From tswr@tswr.ru

Created by tswr@tswr.ru

print 'qq', $y=&{print $x};
print "y​:$y";

Perl Info

Flags:
    category=core
    severity=medium

Site configuration information for perl v5.8.8:

Configured by SYSTEM at Tue Jul 31 19:34:29 2007.

Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Platform:
    osname=MSWin32, osvers=5.00, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    usethreads=define use5005threads=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 -DNO_HASH_SEED
-DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT
-DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
    optimize='-MD -Zi -DNDEBUG -O1',
    cppflags='-DWIN32'
    ccversion='12.00.8804', 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:\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=perl58.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:\Perl\lib\CORE"  -machine:x86'

Locally applied patches:
    ACTIVEPERL_LOCAL_PATCHES_ENTRY
    Iin_load_module moved for compatibility with build 806
    Avoid signal flag SA_RESTART for older versions of HP-UX
    PerlEx support in CGI::Carp
    Less verbose ExtUtils::Install and Pod::Find
    Patch for CAN-2005-0448 from Debian with modifications
    Rearrange @INC so that 'site' is searched before 'perl'
    Partly reverted 24733 to preserve binary compatibility
    MAINT31223 plus additional changes
    31490 Problem bootstraping Win32CORE
    31324 Fix DynaLoader::dl_findfile() to locate .so files again
    31214 Win32::GetLastError fails when first called
    31211 Restore Windows NT support
    31188 Problem killing a pseudo-forked child on Win32
    29732 ANSIfy the PATH environment variable on Windows
    27527,29868 win32_async_check() can loop indefinitely
    26970 Make Passive mode the default for Net::FTP
    26379 Fix alarm() for Windows 2003
    24699 ICMP_UNREACHABLE handling in Net::Ping


@INC for perl v5.8.8:
    C:/Perl/site/lib
    C:/Perl/lib
    .


Environment for perl v5.8.8:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\Perl\bin;C:\Perl64\site\bin;C:\Perl64\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Intel\DMIX;C:\Program Files (x86)\Microsoft SQL
Server\90\Tools\binn\;C:\Program Files (x86)\UnxUtils\usr\local\wbin
    PERL_BADLANG (unset)
    SHELL (unset)

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 11, 2009

From @nwc10

On Wed, Mar 11, 2009 at 08​:20​:34AM -0700, wrote​:

# New Ticket Created by ?????????????? ????????????
# Please include the string​: [perl #63790]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=63790 >

This is a bug report for perl from tswr@​tswr.ru,
generated with the help of perlbug 1.35 running under perl v5.8.8.

-----------------------------------------------------------------
[Please enter your report here]
print 'qq', $y=&{print $x};
print "y​:$y";

I don't know if this is the same bug. This is blead, with -DDEBUGGING and -g​:

$ cat 63790e
print STDERR 'qq', $y=&{print STDERR $x};
print STDERR "y​:$y";
$ ./perl -Dts 63790e

EXECUTING...

  =>
(63790e​:0) enter
  =>
(63790e​:0) nextstate
  =>
(63790e​:1) pushmark
  => *
(63790e​:1) gv(main​::STDERR)
  => * GV()
(63790e​:1) rv2gv
  => * GV()
(63790e​:1) const(PV("qq"\0))
  => * GV() PV("qq"\0)
(63790e​:1) pushmark
  => * GV() PV("qq"\0) *
(63790e​:1) pushmark
  => * GV() PV("qq"\0) **
(63790e​:1) gv(main​::STDERR)
  => * GV() PV("qq"\0) ** GV()
(63790e​:1) rv2gv
  => * GV() PV("qq"\0) ** GV()
(63790e​:1) gvsv(main​::x)
  => * GV() PV("qq"\0) ** GV() UNDEF
(63790e​:1) print
  => * GV() PV("qq"\0) * SV_YES
(63790e​:1) entersub
  => * GV() PV("qq"\0) *
(63790e​:1) gvsv(main​::y)
  => * GV() PV("qq"\0) * UNDEF
(63790e​:1) sassign
  => * GV() PV("qq"\0) *
(63790e​:1) print
perl​: pp_hot.c​:737​: Perl_pp_print​: Assertion `((svtype)((_gvgp)->sv_flags & 0xff)) == SVt_PVGV || ((svtype)((_gvgp)->sv_flags & 0xff)) == SVt_PVLV' failed.
Aborted

I don't know what's going on. Why is that stack wrong, just before the failing
print OP? The thing the assertion is choking on is this​:

(gdb) call Perl_sv_dump(my_perl, gv)
SV = PV(0x8f0c30) at 0x9109f0
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x9099f8 "qq"\0
  CUR = 2
  LEN = 8

And here's an even terser example​:

$ cat 63790a
print STDERR &{print STDERR}
$ ./perl -Dts 63790a

EXECUTING...

  =>
(63790a​:0) enter
  =>
(63790a​:0) nextstate
  =>
(63790a​:1) pushmark
  => *
(63790a​:1) gv(main​::STDERR)
  => * GV()
(63790a​:1) rv2gv
  => * GV()
(63790a​:1) pushmark
  => * GV() *
(63790a​:1) pushmark
  => * GV() **
(63790a​:1) gv(main​::STDERR)
  => * GV() ** GV()
(63790a​:1) rv2gv
  => * GV() ** GV()
(63790a​:1) gvsv(main​::_)
  => * GV() ** GV() UNDEF
(63790a​:1) print
  => * GV() * SV_YES
(63790a​:1) entersub
  => * GV() *
(63790a​:1) print
perl​: pp_hot.c​:737​: Perl_pp_print​: Assertion `((svtype)((_gvgp)->sv_flags & 0xff)) == SVt_PVGV || ((svtype)((_gvgp)->sv_flags & 0xff)) == SVt_PVLV' failed.
Aborted

Nicholas Clark

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 11, 2009

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 12, 2009

From @rgs

2009/3/11 Nicholas Clark <nick@​ccl4.org>​:

[Please enter your report here]
print 'qq', $y=&{print $x};
print "y​:$y";

I don't know if this is the same bug. This is blead, with -DDEBUGGING and -g​:

I think that's due the way that perl sets up calls to an import by
passing PL_sv_yes to pp_entersub.

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 13, 2009

From support@ActiveState.com

Hi,

Thanks for your email. You are using an out of support version.

Your problem may be fixed in the most recent version of ActivePerl in the 5.8
series, available here​:
http​://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.9.825-MSWin32-x86-288577.msi

Best regards,

Graham Stuart
Technical Support Engineer
ActiveState - The Dynamic Languages Company
http​://www.ActiveState.com

03/11/2009 08​:20 - Ð&#65533;миÑ&#65533;Ñ&#65533;ий Ð&#65533;оÑ&#65533;нев wrote​:

This is a bug report for perl from tswr@​tswr.ru,
generated with the help of perlbug 1.35 running under perl v5.8.8.

-----------------------------------------------------------------
[Please enter your report here]
print 'qq', $y=&{print $x};
print "y​:$y";

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags​:
category=core
severity=medium
---
Site configuration information for perl v5.8.8​:

Configured by SYSTEM at Tue Jul 31 19​:34​:29 2007.

Summary of my perl5 (revision 5 version 8 subversion 8) configuration​:
Platform​:
osname=MSWin32, osvers=5.00, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
usethreads=define use5005threads=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 -DNO_HASH_SEED
-DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT
-DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
optimize='-MD -Zi -DNDEBUG -O1',
cppflags='-DWIN32'
ccversion='12.00.8804', 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​:\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=perl58.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​:\Perl\lib\CORE" -machine​:x86'

Locally applied patches​:
ACTIVEPERL_LOCAL_PATCHES_ENTRY
Iin_load_module moved for compatibility with build 806
Avoid signal flag SA_RESTART for older versions of HP-UX
PerlEx support in CGI​::Carp
Less verbose ExtUtils​::Install and Pod​::Find
Patch for CAN-2005-0448 from Debian with modifications
Rearrange @​INC so that 'site' is searched before 'perl'
Partly reverted 24733 to preserve binary compatibility
MAINT31223 plus additional changes
31490 Problem bootstraping Win32CORE
31324 Fix DynaLoader​::dl_findfile() to locate .so files again
31214 Win32​::GetLastError fails when first called
31211 Restore Windows NT support
31188 Problem killing a pseudo-forked child on Win32
29732 ANSIfy the PATH environment variable on Windows
27527,29868 win32_async_check() can loop indefinitely
26970 Make Passive mode the default for Net​::FTP
26379 Fix alarm() for Windows 2003
24699 ICMP_UNREACHABLE handling in Net​::Ping

---
@​INC for perl v5.8.8​:
C​:/Perl/site/lib
C​:/Perl/lib
.

---
Environment for perl v5.8.8​:
HOME (unset)
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)

PATH=C​:\Perl\bin;C​:\Perl64\site\bin;C​:\Perl64\bin;C​:\WINDOWS\system32;C​:\WINDOWS;C​:\WINDOWS\System32\Wbem;C​:\Program

Files\Intel\DMIX;C​:\Program Files (x86)\Microsoft SQL
Server\90\Tools\binn\;C​:\Program Files (x86)\UnxUtils\usr\local\wbin
PERL_BADLANG (unset)
SHELL (unset)

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 29, 2009

From dioksin@gmail.com

another version of this bug

()=("qwe",$_=&{1==1});
print

--
Summary of my perl5 (revision 5 version 8 subversion 9) configuration​:
  Platform​:
  osname=freebsd, osvers=7.0-release-p3, archname=i386-freebsd-64int
  uname='freebsd bridge 7.0-release-p3 freebsd 7.0-release-p3 #5​:
wed sep 3 00​:56​:19 yekst 2008
root@​bridge​:usrsrcsysi386compilecelbridge i386 '
  config_args='-sde -Dprefix=/usr/local
-Darchlib=/usr/local/lib/perl5/5.8.9/mach
-Dprivlib=/usr/local/lib/perl5/5.8.9
-Dman3dir=/usr/local/lib/perl5/5.8.9/perl/man/man3
-Dman1dir=/usr/local/man/man1
-Dsitearch=/usr/local/lib/perl5/site_perl/5.8.9/mach
-Dsitelib=/usr/local/lib/perl5/site_perl/5.8.9
-Dscriptdir=/usr/local/bin
-Dsiteman3dir=/usr/local/lib/perl5/5.8.9/man/man3
-Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv
-Uinstallusrbinperl -Dcc=cc -Duseshrplib -Dinc_version_list=none
-Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.9/BSDPAN"
-Doptimize=-O2 -fno-strict-aliasing -pipe -Ud_dosuid -Ui_gdbm
-Dusethreads=n -Dusemymalloc=y -Duse64bitint'
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
  useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
  use64bitint=define use64bitall=undef uselongdouble=undef
  usemymalloc=y, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags
='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.9/BSDPAN" -DHAS_FPSETMASK
-DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe
-I/usr/local/include',
  optimize='-O2 -fno-strict-aliasing -pipe',
  cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.9/BSDPAN"
-DHAS_FPSETMASK-DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe
-I/usr/local/include'
  ccversion='', gccversion='4.2.1 20070719 [FreeBSD]', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, 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='off_t', lseeksize=8
  alignbytes=4, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -Wl,-E -L/usr/local/lib'
  libpth=/usr/lib /usr/local/lib
  libs=-lm -lcrypt -lutil
  perllibs=-lm -lcrypt -lutil
  libc=, so=so, useshrplib=true, libperl=libperl.so
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-Wl,-R/usr/local/lib/perl5/5.8.9/mach/CORE'
  cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib'

Locally applied patches​:
  defined-or


@​INC for perl v5.8.9​:
  /usr/local/lib/perl5/5.8.9/BSDPAN
  /usr/local/lib/perl5/site_perl/5.8.9/mach
  /usr/local/lib/perl5/site_perl/5.8.9
  /usr/local/lib/perl5/5.8.9/mach
  /usr/local/lib/perl5/5.8.9
  .


Environment for perl v5.8.9​:
  HOME=/home/di
  LANG (unset)
  LANGUAGE (unset)
  LC_CTYPE=ru_RU.KOI8-R
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/sbin​:/bin​:/usr/sbin​:/usr/bin​:/usr/local/sbin​:/usr/local/bin​:/home/di/bin
  PERL_BADLANG (unset)
  SHELL=/bin/tcsh

//
|]i0<5in

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Oct 30, 2010

From @iabyn

fixed with commit 4d198de

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Oct 30, 2010

@iabyn - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.