develooper Front page | perl.perl5.porters | Postings from January 2005

[perl #33989] timelocal not -w safe

Thread Next
From:
sune . karlsson @ esi . oru . se
Date:
January 30, 2005 12:50
Subject:
[perl #33989] timelocal not -w safe
Message ID:
rt-3.0.11-33989-106765.9.82347561646556@perl.org
# New Ticket Created by  sune.karlsson@esi.oru.se 
# Please include the string:  [perl #33989]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=33989 >


This is a bug report for perl from sune.karlsson@esi.oru.se,
generated with the help of perlbug 1.35 running under perl v5.8.6.


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

timelocal in version 1.10 of Time::Local is not -w safe:

c:\temp>perl -MTime::Local -we "print timelocal(localtime())"
Use of uninitialized value in integer addition (+) at C:/Program/Perl/lib/Time/Local.pm line 76.
Use of uninitialized value in integer multiplication (*) at C:/Program/Perl/lib/Time/Local.pm line 76.
Use of uninitialized value in integer multiplication (*) at C:/Program/Perl/lib/Time/Local.pm line 76.
Use of uninitialized value in pack at C:/Program/Perl/lib/Time/Local.pm line 67.

Use of uninitialized value in pack at C:/Program/Perl/lib/Time/Local.pm line 67.

Use of uninitialized value in integer addition (+) at C:/Program/Perl/lib/Time/Local.pm line 68.
Use of uninitialized value in integer addition (+) at C:/Program/Perl/lib/Time/Local.pm line 69.
Use of uninitialized value in integer addition (+) at C:/Program/Perl/lib/Time/Local.pm line 67.
1107103782

As far as I can tell this comes from the second call to _zoneadjust (line 77) where
$MinInt (= -2147483648) is fed to localtime which doesn't work to well with negative arguments.

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

Configured by ActiveState at Mon Dec 13 09:51:32 2004.

Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
  Platform:
    osname=MSWin32, osvers=4.0, 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 -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
    optimize='-MD -Zi -DNDEBUG -O1',
    cppflags='-DWIN32'
    ccversion='', 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 -opt:ref,icf  -libpath:"c:\Program\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=yes, libperl=perl58.lib
    gnulibc_version='undef'
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf  -libpath:"c:\Program\Perl\lib\CORE"  -machine:x86'

Locally applied patches:
    ACTIVEPERL_LOCAL_PATCHES_ENTRY
    21540 Fix backward-compatibility issues in if.pm
    23565 Wrong MANIFEST.SKIP

---
@INC for perl v5.8.6:
    c:\MyDocs\code\perl
    C:/Program/Perl/lib
    C:/Program/Perl/site/lib
    .

---
Environment for perl v5.8.6:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\Program\Perl\bin\;c:\MyDocs\code\perl;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\Common\Msdev98\BIN;C:\Program Files\Microsoft Visual Studio\DF98\BIN;C:\Program Files\Microsoft Visual Studio\VC98\BIN;C:\program\miktex\texmf\miktex\bin;C:\Program\Windows Resource Kits\Tools\;C:\PROGRAM\THINKPAD\UTILITIES;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program\ATI Technologies\ATI Control Panel;C:\Program\PC-Doctor for Windows\services;C:\Program\Support Tools\;C:\Program\ActiveState Komodo 2.5\
    PERL5LIB=c:\MyDocs\code\perl
    PERL_BADLANG (unset)
    SHELL (unset)





Thread Next


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