Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.91k stars 542 forks source link

Another 32-bit residual in 64-bit perl 5.18 #13179

Closed p5pRT closed 6 years ago

p5pRT commented 11 years ago

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

Searchable as RT119367$

p5pRT commented 11 years ago

From browseruk@inbox.com

Created by BrowserUk@xoxy.net

The repeat count/repeat counter for unpack is still limited to a signed
32-bit integer in 64-bit builds.

This demonstrates the problem​:

C​:>\perl5.18\bin\perl.exe -E"$v=chr(255); $v x= 2**27; print unpack
'%32b*'\, $v" 1073741824

C​:>\perl5.18\bin\perl.exe -E"$v=chr(255); $v x= 2**28; print unpack
'%32b*'\, $v" 0

Perl Info ``` Flags: category=core severity=high Site configuration information for perl 5.18.0: Configured by sshd_server at Wed Jan 27 14:12:08 2010. Summary of my perl5 (revision 5 version 18 subversion 0) configuration: Platform: osname=MSWin32, osvers=6.0, archname=MSWin32-x64-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=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -fp:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO', optimize='-O1 -MD -Zi -DNDEBUG -GL -fp:precise', cppflags='-DWIN32' ccversion='15.00.21022.08', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='__int64', ivsize=8, 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 -ltcg -libpath:"c:\perl5.18\lib\CORE" -machine:AMD64 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"' 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=perl518.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl5.18\lib\CORE" -machine:AMD64 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF Built under MSWin32 Compiled at May 21 2013 10:03:07 @INC: C:/perl5.18/site/lib C:/perl5.18/lib . ____________________________________________________________ FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more! ```
p5pRT commented 7 years ago

From @jkeenan

On Mon\, 19 Aug 2013 19​:28​:40 GMT\, browseruk@​inbox.com wrote​:

Subject​: Another 32-bit residual in 64-bit perl 5.18 Message-Id​: \5\.10\.1\_10680\_1376940251@​PB\-IM2525\-AIO Reply-To​: BrowserUk@​xoxy.net To​: perlbug@​perl.org

This is a bug report for perl from BrowserUk@​xoxy.net\, generated with the help of perlbug 1.39 running under perl 5.10.1.

----------------------------------------------------------------- [Please describe your issue here]

The repeat count/repeat counter for unpack is still limited to a signed 32-bit integer in 64-bit builds.

This demonstrates the problem​:

C​:>\perl5.18\bin\perl.exe -E"$v=chr(255); $v x= 2**27; print unpack '%32b*'\, $v" 1073741824

C​:>\perl5.18\bin\perl.exe -E"$v=chr(255); $v x= 2**28; print unpack '%32b*'\, $v" 0

Persists in perl-5.24.0​:

##### $ perl -E '$v=chr(255); $v x= 2**27; say unpack "%32b*"\, $v' 1073741824

$ perl -E '$v=chr(255); $v x= 2**28; say unpack "%32b*"\, $v' 0 #####

-- James E Keenan (jkeenan@​cpan.org)

p5pRT commented 7 years ago

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

p5pRT commented 6 years ago

From zefram@fysh.org

Fixed in commit e1b825c19be2a160b0a3b633eb68e8d61887d21e.

-zefram

p5pRT commented 6 years ago

@xsawyerx - Status changed from 'open' to 'pending release'

p5pRT commented 6 years ago

From @khwilliamson

Thank you for filing this report. You have helped make Perl better.

With the release yesterday of Perl 5.28.0\, this and 185 other issues have been resolved.

Perl 5.28.0 may be downloaded via​: https://metacpan.org/release/XSAWYERX/perl-5.28.0

If you find that the problem persists\, feel free to reopen this ticket.

p5pRT commented 6 years ago

@khwilliamson - Status changed from 'pending release' to 'resolved'