Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters

[perl #112820] t/op/sprintf.t fails one test on FreeBSD 4.6

 

 

Perl porters RSS feed   Index | Next | Previous | View Threaded


perlbug-followup at perl

May 8, 2012, 1:47 PM

Post #1 of 3 (101 views)
Permalink
[perl #112820] t/op/sprintf.t fails one test on FreeBSD 4.6

# New Ticket Created by Nicholas Clark
# Please include the string: [perl #112820]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=112820 >



This is a bug report for perl from nick [at] ccl4,
generated with the help of perlbug 1.39 running under perl 5.15.9.


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

t/op/sprintf.t fails one test on FreeBSD 4.6
*Everything* else passes. This is a pleasant surprise.

Patch adds a skip for FreeBSD 4, and should not skip on FreeBSD 5 and later.
Tested on FreeBSD 7 too. Due to the way versions don't map to real numbers,
4.6 > 4.11, whereas 4.6 <= 4.9 (and 4.9 <= 4.9, 4.10 <= 4.9 and 4.11 <= 4.9)
so the skip skips for all releases of FreeBSD 4.

diff --git a/t/op/sprintf.t b/t/op/sprintf.t
index 9c942b4..34086c8 100644
--- a/t/op/sprintf.t
+++ b/t/op/sprintf.t
@@ -399,7 +399,7 @@ __END__
> %.0g< >[]< > 0 MISSING<
>%.2g< >[]< >0 MISSING<
>%.2gC< >[]< >0C MISSING<
->%.0g< >-0.0< >-0< >C99 standard mandates minus sign but C89 does not skip: MSWin32 VMS hpux:10.20 openbsd netbsd:1.5 irix darwin<
+>%.0g< >-0.0< >-0< >C99 standard mandates minus sign but C89 does not skip: MSWin32 VMS hpux:10.20 openbsd netbsd:1.5 irix darwin freebsd:4.9<
>%.0g< >12345.6789< >1e+04<
>%#.0g< >12345.6789< >1.e+04<
>%.2g< >12345.6789< >1.2e+04<


Nicholas Clark

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl 5.15.9:

Configured by nick at Mon May 7 09:37:52 BST 2012.

Summary of my perl5 (revision 5 version 15 subversion 9) configuration:

Platform:
osname=freebsd, osvers=4.6-release, archname=i386-freebsd
uname='freebsd thinking-cap.moo 4.6-release freebsd 4.6-release #0: sat jul 13 18:39:23 gmt 2002 nick [at] thinking-cap:usrlocalobjusrsrcsysthinkingcap i386 '
config_args='-Dusedevel -Dcc=ccache cc -Dld=cc -Doptimize=-Os -Dprefix=/usr/local/blead -de'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='ccache cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include',
optimize='-Os',
cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='2.95.3 20010315 (release) [FreeBSD]', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
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,-E -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lm -lcrypt -lutil -lc
perllibs=-lm -lcrypt -lutil -lc
libc=, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:


---
@INC for perl 5.15.9:
lib
/usr/local/blead/lib/perl5/site_perl/5.15.9/i386-freebsd
/usr/local/blead/lib/perl5/site_perl/5.15.9
/usr/local/blead/lib/perl5/5.15.9/i386-freebsd
/usr/local/blead/lib/perl5/5.15.9
.

---
Environment for perl 5.15.9:
HOME=/home/nick
LANG (unset)
LANGUAGE (unset)
LC_CTYPE=en_GB.ISO_8859-1
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/nick/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/nick/bin:/sbin:/usr/sbin:/usr/local/sbin
PERL_BADLANG (unset)
SHELL=/usr/local/bin/bash


nick at ccl4

May 8, 2012, 2:04 PM

Post #2 of 3 (107 views)
Permalink
Re: [perl #112820] t/op/sprintf.t fails one test on FreeBSD 4.6 [In reply to]

On Tue, May 08, 2012 at 01:47:10PM -0700, Nicholas Clark wrote:

> t/op/sprintf.t fails one test on FreeBSD 4.6
> *Everything* else passes. This is a pleasant surprise.

> Site configuration information for perl 5.15.9:
>
> Configured by nick at Mon May 7 09:37:52 BST 2012.
>
> Summary of my perl5 (revision 5 version 15 subversion 9) configuration:

> Locally applied patches:
>
>
> ---

This isn't exactly true. It's a tarball made from a clean git checkout
of the branch nicholas/build-trim (which contains a proposed small
refactoring of mktables to drop memory usage by 7%), and then this patch
for sv.c too:

diff --git a/sv.c b/sv.c
index 3ac2fd8..5d0f961 100644
--- a/sv.c
+++ b/sv.c
@@ -1507,7 +1507,7 @@ Perl_sv_grow(pTHX_ register SV *const sv, register STRLEN newlen)

if (newlen > SvLEN(sv)) { /* need more room? */
STRLEN minlen = SvCUR(sv);
- minlen += (minlen >> PERL_STRLEN_EXPAND_SHIFT) + 10;
+ minlen += (minlen >> PERL_STRLEN_EXPAND_SHIFT);
if (newlen < minlen)
newlen = minlen;
#ifndef Perl_safesysmalloc_size

which drops memory usage by a further 2.5% on x86 FreeBSD!
(And doesn't change memory usage on x86 Linux. FreeBSD's malloc is more
frugal, but seems to pay for it on repeated reallocs)

Why?

Because without that I ran out of swap. With the above, I can build in 96M
of swap. (Only 16M of real RAM). I also ran out of swap [just :-(] running
t/harness. t/TEST gets through. It all takes a bit of time, mind you, and
makes a heck of a racket, given that there's swap on all 4 hard drives :-)

"The marvel is not that the bear dances well, but that the bear dances at all."

I think that this means that blead would probably build and test OK within
the hardware of a typical smartphone (without swapping), if they actually
had native toolchains. Which they don't.

Nicholas Clark


tony at develop-help

May 8, 2012, 4:50 PM

Post #3 of 3 (98 views)
Permalink
Re: [perl #112820] t/op/sprintf.t fails one test on FreeBSD 4.6 [In reply to]

On Tue, May 08, 2012 at 10:04:01PM +0100, Nicholas Clark wrote:
> I think that this means that blead would probably build and test OK within
> the hardware of a typical smartphone (without swapping), if they actually
> had native toolchains. Which they don't.

The pogoplug I do ARM builds on has less RAM than my now fairly dated
Nexus One.

I don't do parallel builds or tests on it.

Tony

perlsmoke [at] iapetu:~/smoke-me/smoke$ free
total used free shared buffers cached
Mem: 255672 236260 19412 0 5572 151336
-/+ buffers/cache: 79352 176320
Swap: 506036 58492 447544
perlsmoke [at] iapetu:~/smoke-me/smoke$ uname -a
Linux iapetus 2.6.32-5-kirkwood #1 Tue Jun 14 23:05:32 UTC 2011 armv5tel GNU/Linux
perlsmoke [at] iapetu:~/smoke-me/smoke$ cat /proc/cpuinfo
Processor : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS : 1192.75
Features : swp half thumb fastmult edsp
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant : 0x2
CPU part : 0x131
CPU revision : 1

Hardware : Marvell SheevaPlug Reference Board
Revision : 0000
Serial : 0000000000000000

Perl porters RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.