develooper Front page | perl.perl5.porters | Postings from April 2006

[perl #38831] "use sort 'stable'" sort backwards with perl5.9.3

Thread Next
From:
lidden @ gmail . com
Date:
April 2, 2006 03:16
Subject:
[perl #38831] "use sort 'stable'" sort backwards with perl5.9.3
Message ID:
rt-3.0.11-38831-131825.12.8263268260688@perl.org
# New Ticket Created by  lidden@gmail.com 
# Please include the string:  [perl #38831]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=38831 >



This is a bug report for perl from lidden@gmail.com,
generated with the help of perlbug 1.35 running under perl v5.9.3.


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

perl5.9.3 sorts backwards if you C<use sort 'stable'>.

Oneliner:
perl5.9.3 -M'sort"stable"' -wle 'print join " : ", sort { $a <=> $b } (4, 2, -7, 8);'

It sorts correct with 5.9.2 and 5.8.7 or if you remove C<sort 'stable'>.

/Stefan Lidman

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=low
---
This perlbug was built using Perl v5.8.7 - Tue Aug 23 20:30:12 CEST 2005
It is being executed now by  Perl v5.9.3 - Thu Feb  2 16:53:40 CET 2006.

Site configuration information for perl v5.9.3:

Configured by root at Thu Feb  2 16:53:40 CET 2006.

Summary of my perl5 (revision 5 version 9 subversion 3) configuration:
  Platform:
    osname=linux, osvers=2.6.16-rc1-mm4, archname=i686-linux
    uname='linux puce 2.6.16-rc1-mm4 #1 mon jan 30 06:23:39 cet 2006 i686 pentium4 i386 gnulinux '
    config_args=''
    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='gcc', ccflags ='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include'
    ccversion='', gccversion='4.0.2', 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='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.3.4.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.3.4'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl v5.9.3:
    /usr/local/lib/perl5/5.9.3/i686-linux
    /usr/local/lib/perl5/5.9.3
    /usr/local/lib/perl5/site_perl/5.9.3/i686-linux
    /usr/local/lib/perl5/site_perl/5.9.3
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.9.3:
    HOME=/home/stefan
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/stefan/bin:./bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/usr/misc/pgsql/bin:/usr/local/netpbm/bin
    PERLDOC_PAGER=less -j8 -iMfsRF
    PERL_BADLANG (unset)
    SHELL=/bin/bash


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