| Store | Cart

[perl #124201] Invalid handshake, static build, 5.21.6+, 32bit Linux, no threads, no debug

From: zgrim (via RT) <perl...@perl.org>
Sat, 28 Mar 2015 07:47:21 -0700
# New Ticket Created by  zgrim 
# Please include the string:  [perl #124201]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=124201 >



This is a bug report for perl from zgrim <zzg...@gmail.com>,
generated with the help of perlbug 1.40 running under perl 5.21.10.


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


For a perl built statically with the aid of Marc Lehmann's staticperl
( https://metacpan.org/pod/distribution/App-Staticperl/bin/staticperl ),
no debug, no threads.

$ ./perl -MDigest::xxHash -E1
xxHash.c: loadable library and perl binaries are mismatched (got handshake key 0x7bc0000, needed 0x7cc0000)

This is a problem that appeared between 5.21.5 and 5.21.6 and still exists in 5.21.10.
( verified by building all from 1 to 10 )
I can only reproduce on 32bit Linux, with different gccs (>= 4.7 - debian wheezy) and clangs.
The problem does not manifest on 64bit.
And also I could not reproduce on 32bit FreeBSD 10.1 with either gcc or clang.

I made a repo for easier reproducible builds on a few different VMs.

https://github.com/zgrim/perlbug-handshake.git

eg:
git clone https://github.com/zgrim/perlbug-handshake.git pbtmp.git
cd pbtmp.git
make
./pvm5.21.10 -MDigest::xxHash -E1 && echo ok

Build flags are specified in .staticperlrc.
Perl version to be built can be specified in the environment PV,
eg: PV=5.21.5 make

HTH

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

Configured by zgrim at Tue Mar 24 14:54:20 EET 2015.

Summary of my perl5 (revision 5 version 21 subversion 10) configuration:

  Platform:
    osname=linux, osvers=3.19.0-1-arch, archname=x86_64-linux
    uname='linux salmoxis 3.19.0-1-arch #1 smp preempt mon feb 9 07:08:20 cet 2015 x86_64 gnulinux '
    config_args='-de -Dprefix=/home/zgrim/perl5/perlbrew/perls/perl-5.21.10 -Dusedevel -Aeval:scriptdir=/home/zgrim/perl5/perlbrew/perls/perl-5.21.10/bin'
    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 -D_FORTIFY_SOURCE=2',
    optimize='-O2',
    cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion='', gccversion='4.9.2 20150304 (prerelease)', 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-unknown-linux-gnu/4.9.2/include-fixed /usr/lib /lib/../lib /usr/lib/../lib /lib /lib64 /usr/lib64 /usr/local/lib64
    libs=-lpthread -lnsl -lnm -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lpthread -lnsl -lnm -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.21.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.21'
  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.21.10:
    /home/zgrim/perl5/perlbrew/perls/perl-5.21.10/lib/site_perl/5.21.10/x86_64-linux
    /home/zgrim/perl5/perlbrew/perls/perl-5.21.10/lib/site_perl/5.21.10
    /home/zgrim/perl5/perlbrew/perls/perl-5.21.10/lib/5.21.10/x86_64-linux
    /home/zgrim/perl5/perlbrew/perls/perl-5.21.10/lib/5.21.10
    .

---
Environment for perl 5.21.10:
    HOME=/home/zgrim
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LANG_ALL=en_US.UTF-8
    LC_ALL=en_US.UTF-8
    LD_LIBRARY_PATH=/home/zgrim/apps/svm/lib:/home/zgrim/apps/svm/lib:
    LOGDIR (unset)
    PATH=/home/zgrim/bin:/home/zgrim/perl5/perlbrew/perls/perl-5.21.10/bin:/home/zgrim/go/bin:/home/zgrim/apps/golang/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/plan9/bin
    PERLBREW_BASHRC_VERSION=0.73
    PERLBREW_HOME=/home/zgrim/.perlbrew
    PERLBREW_MANPATH=/home/zgrim/perl5/perlbrew/perls/perl-5.21.10/man
    PERLBREW_PATH=/home/zgrim/perl5/perlbrew/bin:/home/zgrim/perl5/perlbrew/perls/perl-5.21.10/bin
    PERLBREW_PERL=perl-5.21.10
    PERLBREW_ROOT=/home/zgrim/perl5/perlbrew
    PERLBREW_VERSION=0.73
    PERL_BADLANG (unset)
    SHELL=/bin/bash

Recent Messages in this Thread
zgrim (via RT) Mar 28, 2015 02:47 pm
Andy Dougherty Mar 29, 2015 03:18 am
bulk88 via RT Mar 29, 2015 05:38 am
zgrim Mar 29, 2015 11:22 pm
bulk88 via RT Mar 29, 2015 08:19 am
Messages in this thread