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

Owner: Nobody
Requestors: gdg [at] zplane.com
Cc:
AdminCc:

Operating System: Linux
PatchStatus: (no value)
Severity: medium
Type: core
Perl Version: 5.22.0
Fixed In: (no value)



Subject: Possible bugs in printf '%a' format results
To: perlbug [...] perl.org
From: gdg [...] zplane.com
Date: Sat, 5 Dec 2015 11:12:47 -0700 (MST)
Download (untitled) / with headers
text/plain 4.2k
This is a bug report for perl from gdg@zplane.com, generated with the help of perlbug 1.40 running under perl 5.22.0. ----------------------------------------------------------------- [Please describe your issue here] This perlbug is related to this p5p thread: http://www.nntp.perl.org/group/perl.perl5.porters/2015/11/msg232956.html regarding some peculiar/inconsistent behavior of the printf '%a' format specifier. I'm not sure that any of the behaviors described therein are actually bugs, but since the post asked for guidance in that regard and no response was received, figured might as well just submit it as a perlbug anyway so that the issue doesn't fall in a crack. My bad if they're not really bugs. [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=medium --- Site configuration information for perl 5.22.0: Configured by builduser at Tue Jun 2 09:41:38 CEST 2015. Summary of my perl5 (revision 5 version 22 subversion 0) configuration: Platform: osname=linux, osvers=4.0.4-2-arch, archname=i686-linux-thread-multi uname='linux flo-32 4.0.4-2-arch #1 smp preempt fri may 22 03:05:23 utc 2015 i686 gnulinux ' config_args='-des -Dusethreads -Duseshrplib -Doptimize=-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -Dprefix=/usr -Dvendorprefix=/usr -Dprivlib=/usr/share/perl5/core_perl -Darchlib=/usr/lib/perl5/core_perl -Dsitelib=/usr/share/perl5/site_perl -Dsitearch=/usr/lib/perl5/site_perl -Dvendorlib=/usr/share/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/vendor_perl -Dscriptdir=/usr/bin/core_perl -Dsitescript=/usr/bin/site_perl -Dvendorscript=/usr/bin/vendor_perl -Dinc_version_list=none -Dman1ext=1perl -Dman3ext=3perl -Dlddlflags=-shared -Wl,-O1,--sort-common,--as-needed,-z,relro -Dldflags=-Wl,-O1,--sort-common,--as-needed,-z,relro' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4', cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='', gccversion='5.1.0', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12, longdblkind=3 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags ='-Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector-strong -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/i686-pc-linux-gnu/5.1.0/include-fixed /usr/lib /lib libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.21.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.21' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE' cccdlflags='-fPIC', lddlflags='-shared -Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib -fstack-protector-strong' --- @INC for perl 5.22.0: /home/XXXXX/locperl/lib/perl5/i686-linux-thread-multi /home/XXXXX/locperl/lib/perl5 /home/XXXXX/lib/perllib /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl . --- Environment for perl 5.22.0: HOME=/home/XXXXX LANG=en_US.UTF-8 LANGUAGE (unset) LC_ALL=en_US LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/XXXXX/bin:/usr/local/bin:/usr/bin:.:/usr/bin/core_perl:/usr/bin/vendor_perl:/opt/bin32-jre/jre/bin PERL5LIB=/home/XXXXX/locperl/lib/perl5:/home/XXXXX/lib/perllib PERL_BADLANG (unset) SHELL=/bin/bash
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.3k
On Sat Dec 05 10:13:31 2015, gdg@zplane.com wrote: Show quoted text
> This perlbug is related to this p5p thread: > > http://www.nntp.perl.org/group/perl.perl5.porters/2015/11/msg232956.html > > regarding some peculiar/inconsistent behavior of the printf '%a' > format > specifier. I'm not sure that any of the behaviors described therein > are > actually bugs, but since the post asked for guidance in that regard > and no > response was received, figured might as well just submit it as a > perlbug > anyway so that the issue doesn't fall in a crack. My bad if they're > not > really bugs.
It looks like Jarkko has already fixed these in: commit 4755cf0153b43de3331f3442033278c6151cb5e8 Author: Jarkko Hietaniemi <jhi@iki.fi> Date: Sat Nov 28 17:45:19 2015 -0500 hexfp: printf %a for negative zero. commit 454ce668d507a01bfb2497b01aa728006848b750 Author: Jarkko Hietaniemi <jhi@iki.fi> Date: Sat Nov 28 22:22:25 2015 -0500 hexfp: printf %.13a 1.0 commit 798a7a50ba821b0294cbf03dc1e274fa128084db Author: Jarkko Hietaniemi <jhi@iki.fi> Date: Sat Nov 28 22:56:29 2015 -0500 hexfp: printf %.13a 0.0 tony@mars:.../git/perl$ ./perl -e '@vals = ( +1, +0.0, -0.0, -1); for (@vals) { printf "%+f\n", $_; } for (@vals) { printf "%+-.13a\n", $_ }' +1.000000 +0.000000 -0.000000 -1.000000 +0x1.0000000000000p+0 +0x0.0000000000000p+0 -0x0.0000000000000p+0 -0x1.0000000000000p+0 Tony
Date: Sun, 6 Dec 2015 18:10:10 -0700
Subject: Re: [perl #126822] Possible bugs in printf '%a' format results
From: Glenn Golden <gdg [...] zplane.com>
To: Tony Cook via RT <perlbug-followup [...] perl.org>
CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 859b
Tony Cook via RT <perlbug-followup@perl.org> [2015-12-06 14:52:16 -0800]: Show quoted text
> On Sat Dec 05 10:13:31 2015, gdg@zplane.com wrote:
> > This perlbug is related to this p5p thread: > > > > http://www.nntp.perl.org/group/perl.perl5.porters/2015/11/msg232956.html > > > > regarding some peculiar/inconsistent behavior of the printf '%a' > > format > > specifier. I'm not sure that any of the behaviors described therein > > are > > actually bugs, but since the post asked for guidance in that regard > > and no > > response was received, figured might as well just submit it as a > > perlbug > > anyway so that the issue doesn't fall in a crack. My bad if they're > > not > > really bugs.
> > It looks like Jarkko has already fixed these in: > > [ ... ] >
Ok thanks, looks good. Must've missed Jarkko's post on the original thread. Sorry for the noise. Glenn
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.3k
On Sun Dec 06 17:10:57 2015, gdg@zplane.com wrote: Show quoted text
> Tony Cook via RT <perlbug-followup@perl.org> [2015-12-06 14:52:16 -0800]:
> > On Sat Dec 05 10:13:31 2015, gdg@zplane.com wrote:
> > > This perlbug is related to this p5p thread: > > > > > > http://www.nntp.perl.org/group/perl.perl5.porters/2015/11/msg232956.html > > > > > > regarding some peculiar/inconsistent behavior of the printf '%a' > > > format > > > specifier. I'm not sure that any of the behaviors described therein > > > are > > > actually bugs, but since the post asked for guidance in that regard > > > and no > > > response was received, figured might as well just submit it as a > > > perlbug > > > anyway so that the issue doesn't fall in a crack. My bad if they're > > > not > > > really bugs.
> > > > It looks like Jarkko has already fixed these in: > > > > [ ... ] > >
> > Ok thanks, looks good. Must've missed Jarkko's post on the original thread. > Sorry for the noise. >
Apologies required from us, not from you: In the flurry of activity in getting these bugs fixed, tested and a new RC made with the fixes in, we seem to have forgotten to reply to your post to inform you of this. So please accept our apologies for that, and thank you for reporting the bugs -- twice, in fact! :-) Marking this ticket as 'pending release' now, since the bugs are indeed fixed.
CC: Steve Hay via RT <perlbug-followup [...] perl.org>
To: perl5-porters [...] perl.org
From: Glenn Golden <gdg [...] zplane.com>
Subject: Re: [perl #126822] Possible bugs in printf '%a' format results
Date: Wed, 9 Dec 2015 07:01:05 -0700
Download (untitled) / with headers
text/plain 1.2k
Steve Hay via RT <perlbug-followup@perl.org> [2015-12-06 17:17:56 -0800]: Show quoted text
> > > > > > It looks like Jarkko has already fixed these in: > > > > > > [ ... ] > > >
> > > > Ok thanks, looks good. Must've missed Jarkko's post on the original > > thread. Sorry for the noise. > >
> > Apologies required from us, not from you: In the flurry of activity in > getting these bugs fixed, tested and a new RC made with the fixes in, we > seem to have forgotten to reply to your post to inform you of this. >
No problemo, glad the report was useful. This brings up a side question though: Is it ok to file a perlbug solely for the purpose of acting as a reminder about an ongoing thread discussion that has not yet been resolved? Just to keep it on the radar at some level so that it doesn't fall in a crack. For example, this thread was started about six months ago with a query I had on a doc issue http://www.nntp.perl.org/group/perl.perl5.porters/2015/05/msg227897.html It ran for a while, generated some debate, then lapsed into a coma. I pinged it out, it went for a few more rounds, then fell back to sleep. Rather than being a bi-yearly gadfly about it on the list, would it be better to just file the issue as a perlbug with a link to the thread and a short description of the issue?
From: Steve Hay via perl5-porters <perl5-porters [...] perl.org>
To: gdg [...] zplane.com
CC: "perl5-porters [...] perl.org" <perl5-porters [...] perl.org>, Steve Hay via RT <perlbug-followup [...] perl.org>
Subject: Re: [perl #126822] Possible bugs in printf '%a' format results
Date: Wed, 9 Dec 2015 18:17:06 +0000
Download (untitled) / with headers
text/plain 1.5k
On 9 December 2015 at 14:01, Glenn Golden <gdg@zplane.com> wrote: Show quoted text
> Steve Hay via RT <perlbug-followup@perl.org> [2015-12-06 17:17:56 -0800]:
>> > > >> > > It looks like Jarkko has already fixed these in: >> > > >> > > [ ... ] >> > >
>> > >> > Ok thanks, looks good. Must've missed Jarkko's post on the original >> > thread. Sorry for the noise. >> >
>> >> Apologies required from us, not from you: In the flurry of activity in >> getting these bugs fixed, tested and a new RC made with the fixes in, we >> seem to have forgotten to reply to your post to inform you of this. >>
> > No problemo, glad the report was useful. > > This brings up a side question though: Is it ok to file a perlbug solely for > the purpose of acting as a reminder about an ongoing thread discussion that > has not yet been resolved? Just to keep it on the radar at some level so that > it doesn't fall in a crack. > > For example, this thread was started about six months ago with a query I had > on a doc issue > > http://www.nntp.perl.org/group/perl.perl5.porters/2015/05/msg227897.html > > It ran for a while, generated some debate, then lapsed into a coma. I pinged it > out, it went for a few more rounds, then fell back to sleep. Rather than being > a bi-yearly gadfly about it on the list, would it be better to just file the > issue as a perlbug with a link to the thread and a short description of the > issue?
Yes, I would say it's fine to perlbug anything that you feel a discussion over hasn't yet reached a firm conclusion. It's easier to keep tabs on such things in the RT queue than having to cite links in the p5p archives.
Download (untitled) / with headers
text/plain 252b
Thank you for submitting this report. You have helped make Perl better. With the release of Perl 5.24.0 on May 9, 2016, this and 149 other issues have been resolved. Perl 5.24.0 may be downloaded via https://metacpan.org/release/RJBS/perl-5.24.0


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