Perl / perl5

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

Data/Dumper warning format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘U32’ #11395

Closed p5pRT closed 13 years ago

p5pRT commented 13 years ago

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

Searchable as RT91836$

p5pRT commented 13 years ago

From perl-diddler@tlinx.org

This is a bug report for perl from perl-diddler@​tlinx.org\, generated with the help of perlbug 1.39 running under perl 5.12.3.


[Please describe your issue here]


May be a non issue\, but thought I'd mentioned it as it appears to be something to do with 32/64-bit size/format assumptions​:

[PAN.pm​: Going to build S/SM/SMUELLER/Data-Dumper-2.131.tar.gz

  Checking if your kit is complete...   Looks good   Writing Makefile for Data​::Dumper   Could not read metadata file. Falling back to other methods to determine prerequisites   /usr/bin/perl /usr/lib/perl5/5.12.3/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.12.3/ExtUtils/typemap Dumper.xs > Dumper.xsc && mv Dumper.xsc Dumper.c   Running Mkbootstrap for Data​::Dumper ()   chmod 644 Dumper.bs   cp Dumper.bs blib/arch/auto/Data/Dumper/Dumper.bs   cp Dumper.pm blib/lib/Data/Dumper.pm   chmod 644 blib/arch/auto/Data/Dumper/Dumper.bs   cc -c -D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe -DVERSION=\"2.131\" -DXS_VERSION=\"2.131\" -fPIC "-I/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE" -DUSE_PPPORT_H Dumper.c   Dumper.xs​: In function ‘DD_dump’​:   Dumper.xs​:817​:6​: warning​: format ‘%ld’ expects type ‘long int’\, but argument 2 has type ‘U32’   rm -f blib/arch/auto/Data/Dumper/Dumper.so   cc -shared -L/usr/local/lib64 -fstack-protector Dumper.o -o blib/arch/auto/Data/Dumper/Dumper.so \   \  
  chmod 755 blib/arch/auto/Data/Dumper/Dumper.so   SMUELLER/Data-Dumper-2.131.tar.gz   /usr/bin/make -j -j -- OK   Running make test   PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils​::Command​::MM" "-e" "test_harness(0\, 'blib/lib'\, 'blib/arch')" t/*.t   t/bless.t ....... ok
  t/bugs.t ........ ok
  t/dumper.t ...... ok
  t/freezer.t ..... ok
  t/overload.t .... ok
  t/pair.t ........ ok
  t/perl-74170.t .. ok
  t/terse.t ....... ok
  All tests successful.   Files=8\, Tests=420\, 1 wallclock secs ( 0.06 usr 0.02 sys + 0.28 cusr 0.07 csys = 0.43 CPU)   Result​: PASS   SMUELLER/Data-Dumper-2.131.tar.gz   /usr/bin/make test -- OK   Running make install   Prepending /home/CPAN-ishtar-build-cache/build/Data-Dumper-2.131-NDvBSa/blib/arch /home/CPAN-ishtar-build-cache/build/Data-Dumper-2.131-NDvBSa/blib/lib to PERL5LIB for 'install'   Appending installation info to /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/perllocal.pod   Files found in blib/arch​: installing files in blib/lib into architecture dependent library tree   Installing /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/auto/Data/Dumper/Dumper.so   Installing /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/Data/Dumper.pm   SMUELLER/Data-Dumper-2.131.tar.gz   sudo make -j install UNINST=1 -- OK


Finished ok\, just don't know if it should use a different format on U32. Probably is harmless on little-endian (x86) machines\, but could be a problem on big-endian ones...



Flags​:   category=library   severity=low   module=Data​::Dumper


This perlbug was built using Perl 5.12.3 - Fri May 6 13​:31​:41 UTC 2011 It is being executed now by Perl 5.12.3 - Fri May 6 13​:26​:30 UTC 2011.

Site configuration information for perl 5.12.3​:

Configured by abuild at Fri May 6 13​:26​:30 UTC 2011.

Summary of my perl5 (revision 5 version 12 subversion 3) configuration​:  
  Platform​:   osname=linux\, osvers=2.6.36\, archname=x86_64-linux-thread-multi   uname='linux build33 2.6.36 #1 smp 2011-02-21 10​:34​:10 +0100 x86_64 x86_64 x86_64 gnulinux '   config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Duseshrplib=true -Doptimize=-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe -Accflags=-DPERL_USE_SAFE_PUTENV'   hint=recommended\, useposix=true\, d_sigaction=define   useithreads=define\, usemultiplicity=define   useperlio=define\, d_sfio=undef\, uselargefiles=define\, usesocks=undef   use64bitint=define\, use64bitall=define\, uselongdouble=undef   usemymalloc=n\, bincompat5005=undef   Compiler​:   cc='cc'\, ccflags ='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'\,   optimize='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe'\,   cppflags='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector'   ccversion=''\, gccversion='4.5.1 20101208 [gcc-4_5-branch revision 167585]'\, gccosandvers=''   intsize=4\, longsize=8\, ptrsize=8\, doublesize=8\, byteorder=12345678   d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=16   ivtype='long'\, ivsize=8\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8   alignbytes=8\, prototype=define   Linker and Libraries​:   ld='cc'\, ldflags =' -L/usr/local/lib64 -fstack-protector'   libpth=/lib64 /usr/lib64 /usr/local/lib64   libs=-lm -ldl -lcrypt -lpthread   perllibs=-lm -ldl -lcrypt -lpthread   libc=/lib64/libc-2.11.3.so\, so=so\, useshrplib=true\, libperl=libperl.so   gnulibc_version='2.11.3'   Dynamic Linking​:   dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags='-Wl\,-E -Wl\,-rpath\,/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE'   cccdlflags='-fPIC'\, lddlflags='-shared -L/usr/local/lib64 -fstack-protector'

Locally applied patches​:  


@​INC for perl 5.12.3​:   /usr/lib/perl5/site_perl/5.12.3/x86_64-linux-thread-multi   /usr/lib/perl5/site_perl/5.12.3   /usr/lib/perl5/vendor_perl/5.12.3/x86_64-linux-thread-multi   /usr/lib/perl5/vendor_perl/5.12.3   /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi   /usr/lib/perl5/5.12.3   .


Environment for perl 5.12.3​:   HOME=/home/law   LANG=en_US.UTF-8   LANGUAGE (unset)   LC_CTYPE=en_US.UTF-8   LD_LIBRARY_PATH (unset)   LOGDIR (unset)   PATH=.​:/sbin​:/usr/local/sbin​:/home/law/bin​:/usr/local/bin​:/usr/bin​:/bin​:/usr/bin/X11​:/usr/X11R6/bin​:/usr/games​:/opt/kde3/bin​:/usr/lib64/jvm/jre/bin​:/usr/lib/mit/bin​:/usr/lib/mit/sbin​:/usr/sbin   PERL_BADLANG (unset)   SHELL=/bin/bash

p5pRT commented 13 years ago

perl-diddler@tlinx.org - Status changed from 'new' to 'open'

p5pRT commented 13 years ago

perl-diddler@tlinx.org - Status changed from 'open' to 'new'

p5pRT commented 13 years ago

From perl-diddler@tlinx.org

(accidently hit wrong link)...

p5pRT commented 13 years ago

perl-diddler@tlinx.org - Status changed from 'new' to 'open'

p5pRT commented 13 years ago

perl-diddler@tlinx.org - Status changed from 'open' to 'new'

p5pRT commented 13 years ago

From perl-diddler@tlinx.org

ARG!...hitting reply defaulted to re-opening! ...so back to 'new' again...

p5pRT commented 13 years ago

From @cpansprout

On Sun May 29 10​:34​:44 2011\, LAWalsh wrote​:

May be a non issue\, but thought I'd mentioned it as it appears to be something to do with 32/64-bit size/format assumptions​:

It is a non-issue\, but I’ve added a cast to suppress the warning\, with commit 4f12661. Since the variable in question never exceeds 15 (and will likely never exceed 255)\, I changed it to %d with an int cast.

p5pRT commented 13 years ago

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

p5pRT commented 13 years ago

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