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

[perl #128763] NV_PAYLOAD_SIZEOF_ASSERT fails on PPC darwin

Thread Previous
From:
Father Chrysostomos
Date:
July 28, 2016 05:27
Subject:
[perl #128763] NV_PAYLOAD_SIZEOF_ASSERT fails on PPC darwin
Message ID:
rt-4.0.18-17198-1469683665-625.128763-75-0@perl.org
# New Ticket Created by  Father Chrysostomos 
# Please include the string:  [perl #128763]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=128763 >


make test output includes:

ext/POSIX/t/math ............................................... Assertion failed: (sizeof(m) == NVSIZE / 2), function S_setpayload, file POSIX.xs, line 1169.
FAILED--no leader found

Line 1169 of ext/POSIX/POSIX.xs is:

  NV_PAYLOAD_SIZEOF_ASSERT(m);

That macro is defined as:

#ifdef LONGDOUBLE_DOUBLEDOUBLE
#  define NV_PAYLOAD_SIZEOF_ASSERT(a) assert(sizeof(a) == NVSIZE / 2)
#else
#  define NV_PAYLOAD_SIZEOF_ASSERT(a) assert(sizeof(a) == NVSIZE)
#endif

so apparently LONGDOUBLE_DOUBLEDOUBLE must be defined.

m is declared as:

  static const U8 m[] = { NV_NAN_PAYLOAD_MASK };

$ ./perl -Ilib Porting/expand-macro.pl NV_NAN_PAYLOAD_MASK
cc -c -DPERL_CORE -fno-common -DPERL_DARWIN -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV -O3 -O0 -g -Wall -Wextra -Wwrite-strings -E try.c > try.i
# 4 "NV_NAN_PAYLOAD_MASK expands to"
0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff

$ ./perl -Ilib -V

Summary of my perl5 (revision 5 version 25 subversion 4) configuration:
  Snapshot of: a3164817e46808339a605914ac61f15117615fe5
  Platform:
    osname=darwin
    osvers=9.7.0
    archname=darwin-2level
    uname='darwin treebeard.local 9.7.0 darwin kernel version 9.7.0: tue mar 31 22:54:29 pdt 2009; root:xnu-1228.12.14~1release_ppc power macintosh '
    config_args='-de -Dusedevel -DDEBUGGING -Aoptimize=-O0'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=undef
    usemultiplicity=undef
    use64bitint=undef
    use64bitall=undef
    uselongdouble=undef
    usemymalloc=n
    bincompat5005=undef
  Compiler:
    cc='cc'
    ccflags ='-fno-common -DPERL_DARWIN -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV'
    optimize='-O3 -O0 -g'
    cppflags='-fno-common -DPERL_DARWIN -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion=''
    gccversion='4.0.1 (Apple Inc. build 5465)'
    gccosandvers=''
    intsize=4
    longsize=4
    ptrsize=4
    doublesize=8
    byteorder=4321
    doublekind=4
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=6
    ivtype='long'
    ivsize=4
    nvtype='double'
    nvsize=8
    Off_t='off_t'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc'
    ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib
    libs=-lpthread -ldbm -ldl -lm -lutil -lc
    perllibs=-lpthread -ldl -lm -lutil -lc
    libc=
    so=dylib
    useshrplib=false
    libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=bundle
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector'


Characteristics of this binary (from libperl): 
  Compile-time options:
    DEBUGGING
    HAS_TIMES
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    PERL_USE_DEVEL
    PERL_USE_SAFE_PUTENV
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
  Built under darwin
  Compiled at Jul 27 2016 18:45:08
  @INC:
    lib
    /usr/local/lib/perl5/site_perl/5.25.4/darwin-2level
    /usr/local/lib/perl5/site_perl/5.25.4
    /usr/local/lib/perl5/5.25.4/darwin-2level
    /usr/local/lib/perl5/5.25.4
    .

Is that enough information?

-- 

Father Chrysostomos


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About