Skip Menu |
Report information
Id: 115880
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: bulk88 <bulk88 [at] hotmail.com>
Cc:
AdminCc:

Operating System: mswin32
PatchStatus: (no value)
Severity: low
Type: core
Perl Version: 5.17.7
Fixed In: (no value)



Subject: redundant SvUPGRADE in perl_construct?
Date: Thu, 22 Nov 2012 20:27:14 -0500
To: perlbug [...] perl.org
From: bulk88 <bulk88 [...] hotmail.com>
Download (untitled) / with headers
text/plain 3.7k
This is a bug report for perl from bulk88@hotmail.com, generated with the help of perlbug 1.39 running under perl 5.17.7. ----------------------------------------------------------------- [Please describe your issue here] At http://perl5.git.perl.org/perl.git/blame/4d91e28241ad974dc4df24b1f21b7278e74f5310:/perl.c#l363 I see a SvUPGRADE on something that will be passed to SvPV_nolen_const. It was added in http://perl5.git.perl.org/perl.git/commit/27da23d53ccce622bc51822f59df8def79b4df95?f=perl.c "Symbian port of Perl". I think the SvUPGRADE is redundant since SvPV will not crash if an SV is undef with no PV or no head. I have no way to compile a perl that has that code defed in, so I am filing this bug. [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=low --- Site configuration information for perl 5.17.7: Configured by Owner at Thu Nov 22 18:38:37 2012. Summary of my perl5 (revision 5 version 17 subversion 7 patch blead 2012-11-22.16:15:39 ac93cf5da977bd07a11ef68c5b684322bd23fd72 v5.17.6-28-gac93cf5) configuration: Snapshot of: ac93cf5da977bd07a11ef68c5b684322bd23fd72 Platform: osname=MSWin32, osvers=5.1, 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 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T', optimize='-MD -Zi -DNDEBUG -O1', cppflags='-DWIN32' ccversion='13.10.6030', 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:\perl517\lib\CORE" -machine:x86' libpth="C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\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=perl517.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:\perl517\lib\CORE" -machine:x86' Locally applied patches: --- @INC for perl 5.17.7: C:/perl517/site/lib C:/perl517/lib . --- Environment for perl 5.17.7: HOME (unset) LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=C:\perl517\bin;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\BIN;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\bin\prerelease;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem; PERL_BADLANG (unset) SHELL (unset)
Date: Mon, 13 Nov 2017 01:14:01 +0000
Subject: Re: [perl #115880] redundant SvUPGRADE in perl_construct?
To: perl5-porters [...] perl.org
From: Zefram <zefram [...] fysh.org>
Download (untitled) / with headers
text/plain 437b
Show quoted text
> I think the SvUPGRADE is redundant since SvPV >will not crash if an SV is undef with no PV or no head.
That's true, but you know what *will* crash? Evaluating ERRSV before PL_errgv has been created. Even if ERRSV did exist, there's nothing in that code to put a meaningful error message into it. This code has been buggy from its inception. Fixed in commit f63f40368cca0cfffd2773a6206d1ab3235b61b3. -zefram


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org