develooper Front page | perl.perl5.porters | Postings from November 2016

[perl #130133] [PATCH] Configure leaves garbage in$Config{longdblinfbytes}

Thread Previous | Thread Next
From:
Niko Tyni
Date:
November 18, 2016 19:18
Subject:
[perl #130133] [PATCH] Configure leaves garbage in$Config{longdblinfbytes}
Message ID:
rt-4.0.24-31813-1479496687-1063.130133-75-0@perl.org
# New Ticket Created by  Niko Tyni 
# Please include the string:  [perl #130133]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=130133 >


This is a bug report for perl from Niko Tyni <ntyni@debian.org>,
generated with the help of perlbug 1.40 running under perl 5.25.7.


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

The Configure test for long double implementation details probes the
contents of "long double inf", and they get stored in the Config module:

 % perl -V:longdblinfbytes
 longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00';

Some of these bytes are currently essentially random and vary between
builds on at least amd64 and i386, because their long doubles are only
80-bit and the remaining six bytes stay uninitialized.

The relevant Configure probe tries to initialize these bytes, but has
several bugs that defeat the purpose. Patch attached.

The randomness seems to only have started to show on Debian with GCC-6
for one reason or another; the bytes are zeroed out on at least GCC-5.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=low
    Type=Patch
    PatchStatus=HasPatch
---
Site configuration information for perl 5.25.7:

Configured by niko at Fri Nov 18 19:58:21 EET 2016.

Summary of my perl5 (revision 5 version 25 subversion 7) configuration:
  Commit id: 97eaa8936166129d88f778562e587a9151ce15b7
  Platform:
    osname=linux
    osvers=4.8.0-1-amd64
    archname=x86_64-linux
    uname='linux estella 4.8.0-1-amd64 #1 smp debian 4.8.5-1 (2016-10-28) x86_64 gnulinux '
    config_args='-des -Dusedevel'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=undef
    usemultiplicity=undef
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    bincompat5005=undef
  Compiler:
    cc='cc'
    ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    optimize='-O2'
    cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion=''
    gccversion='6.2.0 20161103'
    gccosandvers=''
    intsize=4
    longsize=8
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='off_t'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='cc'
    ldflags =' -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../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.24.so
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version='2.24'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E'
    cccdlflags='-fPIC'
    lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'


---
@INC for perl 5.25.7:
    lib
    /usr/local/lib/perl5/site_perl/5.25.7/x86_64-linux
    /usr/local/lib/perl5/site_perl/5.25.7
    /usr/local/lib/perl5/5.25.7/x86_64-linux
    /usr/local/lib/perl5/5.25.7

---
Environment for perl 5.25.7:
    HOME=/home/niko
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LC_CTYPE=fi_FI.UTF-8
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/niko/bin:/home/niko/bin:/home/niko/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:/sbin:/usr/sbin
    PERL_BADLANG (unset)
    SHELL=/bin/zsh

Thread Previous | 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