Front page | perl.perl5.porters |
Postings from August 2001
Re: [ID 20010824.010] Alpha error writing exceptional math value
Thread Previous
From:
Nicholas Clark
Date:
August 26, 2001 04:53
Subject:
Re: [ID 20010824.010] Alpha error writing exceptional math value
Message ID:
20010826125300.E4950@plum.flirble.org
On Fri, Aug 24, 2001 at 05:00:44PM -0400, Andrew Dalke wrote:
Thanks for the very thorough report.
> There is a problem with Perl 5.005_03 and 5.6.1 when printing
> the IEEE 754 NaN exception value.
>
> Here's the reproducible, with the first to show that non-exceptional
> values really do work.
>
> ===============
> [dalke@pw600a perl-5.6.1]$ ./perl -Ilib -e 'use POSIX; print acos(0.5), "\n"'
> 1.0471975511966
> [dalke@pw600a perl-5.6.1]$ ./perl -Ilib -e 'use POSIX; print acos(3.7), "\n"'
> Floating exception (core dumped)
I asked a friend to run
perl -we 'use POSIX; print acos(3.7), "\n"'
on an alpha running Debian GNU/Linux. He gets NaN rather than a core dump.
He suggests building with -mieee in the cflags, which is what Debian use.
> Compiler:
> cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
> optimize='-O2',
> cppflags='-fno-strict-aliasing -I/usr/local/include'
> ccversion='', gccversion='egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)', gccosandvers=''
> intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
> d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
> ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
> alignbytes=8, usemymalloc=n, prototype=define
> Linker and Libraries:
> ld='cc', ldflags =' -L/usr/local/lib'
> libpth=/usr/local/lib /usr/shlib /lib /usr/lib
> libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt -lutil
> perllibs=-lnsl -ldl -lm -lc -lposix -lcrypt -lutil
> libc=, so=so, useshrplib=false, libperl=libperl.a
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
> cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Debian's Alpha perl gives a -V of
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=linux, osvers=2.2.15, archname=alpha-linux
uname='linux flatline 2.2.15 #8 smp fri jul 12 09:36:31 mst 2052 alpha unknown '
config_args='-Dccflags=-DDEBIAN -mieee -Dcccdlflags=-fPIC -Darchname=alpha-linux -Dprefix=/usr -Dprivlib=/usr/share/perl/5.6.1 -Darchlib=/usr/lib/perl/5.6.1 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.6.1 -Dsitearch=/usr/local/lib/perl/5.6.1 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Dotherlibdirs=/usr/lib/perl5/5.6:/usr/lib/perl5/5.005 -Duseshrplib -Dlibperl=libperl.so.5.6.1 -Dd_dosuid -des'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=undef
Compiler:
cc='cc', ccflags ='-DDEBIAN -mieee -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-DDEBIAN -mieee -fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.95.4 20010604 (Debian prerelease)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lgdbm -ldbm -ldb -ldl -lm -lc -lcrypt
perllibs=-ldl -lm -lc -lcrypt
libc=, so=so, useshrplib=true, libperl=libperl.so.5.6.1
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_64_BIT_INT USE_64_BIT_ALL USE_LARGE_FILES
Built under linux
Compiled at Jun 24 2001 01:25:23
@INC:
/usr/local/lib/perl/5.6.1
/usr/local/share/perl/5.6.1
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.6.1
/usr/share/perl/5.6.1
/usr/local/lib/site_perl
/usr/lib/perl5/5.6/alpha-linux
/usr/lib/perl5/5.6
/usr/lib/perl5/5.005
.
Is building with -mieee a sensible idea? If so, should it be on by
default on Alpha linux?
Nicholas Clark
Thread Previous