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

[ID 20000414.005] NaN passed to gcvt

Thread Next
From:
gin
Date:
April 14, 2000 10:32
Subject:
[ID 20000414.005] NaN passed to gcvt
Message ID:
023a38f7561586-gin@mo.msk.ru
This is a bug report for perl from gin@mo.msk.ru,
generated with the help of perlbug 1.28 running under perl v5.6.0.


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

lib/bigfltpm test fails in step 351.  `perl' passes a NaN value to
gcvt(), which causes it to get SIGFPE and dump core.  gdb backtrace
follows.

#0  0x80019223 in PL_regflags ()
#1  0x80f721d in cvt ()
#2  0x80f71ae in ecvt ()
#3  0x80f7025 in gcvt ()
#4  0x80aa5bb in Perl_sv_2pv (sv=0x811cb50, lp=0x804787c) at sv.c:2114
#5  0x80a23ce in Perl_pp_match () at pp_hot.c:956
#6  0x809f74c in Perl_runops_standard () at run.c:27
#7  0x805bd66 in S_run_body (oldscope=1) at perl.c:1401
#8  0x805ba3b in perl_run (my_perl=0x8116804) at perl.c:1325
#9  0x80590ee in main (argc=2, argv=0x8047b18, env=0x8047b24) at perlmain.c:52
#10 0x8058feb in .text ()

Hex dump of double value in question is:

0x00	0x00	0x00	0x00	0x00	0x00	0xf8	0x7f

It always causes my gcvt to get SIGFPE, regardless of program which
passed such an arg to it.

I do not know, is such a behavior of perl considered proper (and gcvt
must handle NaN's) or it is a bug in perl.

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

Configured by gin at Fri Apr 14 15:07:46 MSD 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=sco, osvers=3.2v5.0.2, archname=i386-sco
    uname='sco_sv d-fens 3.2 2 i386 '
    config_args='-de'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='cc', optimize='-O0', gccversion=
    cppflags='-U M_XENIX -D PERL_SCO -D PERL_SCO5 -w0 -belf -I/usr/local/include'
    ccflags ='-U M_XENIX -D PERL_SCO -D PERL_SCO5 -w0 -belf -g -I/usr/local/include'
    stdchar='unsigned char', d_stdstdio=undef, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=undef, longlongsize=, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
    alignbytes=4, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lintl -lsocket -lnsl -lndbm -ldbm -lld -lm -lc -lcrypt -lsec -lPW -lx
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-Bexport -L/usr/local/lib'
    cccdlflags='-Kpic', lddlflags='-G -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl v5.6.0:
    lib
    /usr/local/lib/perl5/5.6.0/i386-sco
    /usr/local/lib/perl5/5.6.0
    /usr/local/lib/perl5/site_perl/5.6.0/i386-sco
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.6.0:
    HOME=/home/gin
    LANG=C_C.C
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=.:/home/gin/pbin:/bin:/usr/bin:/usr/local/bin:/usr/merge/dosroot/ubin:/usr/bin/X11:/home/gin/bin
    PERL_BADLANG (unset)
    SHELL=/bin/sh

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