NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/52368: SIGFPE in compile_rt __floatundidf on vax



>Number:         52368
>Category:       lib
>Synopsis:       SIGFPE in compile_rt __floatundidf on vax
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 05 08:55:00 +0000 2017
>Originator:     Martin Husemann
>Release:        NetBSD 8.99.1
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD dead-to-the-world.duskware.de 8.99.1 NetBSD 8.99.1 (DEAD) #4: Wed Jun 21 20:55:19 CEST 2017 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/vax/compile/DEAD vax
Architecture: vax
Machine: vax
>Description:

Trying to build perl on vax fails:

Core was generated by `perl'.
Program terminated with signal SIGFPE, Arithmetic exception.
#0  0x7f4ccbfb in __floatundidf (a=272487529377788, 1919217660, 63443)
    at /work/src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c:47
47      /work/src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c:
(gdb) bt
#0  0x7f4ccbfb in __floatundidf (a=272487529377788, 1919217660, 63443)
    at /work/src/sys/external/bsd/compiler_rt/dist/lib/builtins/floatundidf.c:47
#1  0x7f6c0f2e in Perl_drand48_r (2133864428)
   from /usr/pkgobj/lang/perl5/work/perl-5.26.0/libperl.so
#2  0x7f6c11e5 in Perl_get_hash_seed (2133862400, 2138877952)
   from /usr/pkgobj/lang/perl5/work/perl-5.26.0/libperl.so
#3  0x7f662240 in perl_construct (2133862400)
   from /usr/pkgobj/lang/perl5/work/perl-5.26.0/libperl.so
#4  0x00010c6c in main (6, 2147477828, 2147477856)
(gdb) x/16i __floatundidf
   0x7f4ccbd2 <__floatundidf>:  halt
   0x7f4ccbd3 <__floatundidf+1>:        halt
   0x7f4ccbd4 <__floatundidf+2>:        subl2 $0x4,sp
   0x7f4ccbd7 <__floatundidf+5>:        bisl3 $0x00006a80,0x8(ap),r0
   0x7f4ccbe0 <__floatundidf+14>:       clrf r1
   0x7f4ccbe2 <__floatundidf+16>:       subd2 $0x0000008000006a80 [d-float],r0
   0x7f4ccbed <__floatundidf+27>:       bisl3 $0x00005a80,0x4(ap),r2
   0x7f4ccbf6 <__floatundidf+36>:       clrf r3
   0x7f4ccbf8 <__floatundidf+38>:       addd2 r2,r0
=> 0x7f4ccbfb <__floatundidf+41>:       ret
(gdb) info reg
r0             0xffd3   65491
r1             0x20000000       536870912
r2             0x7264fffc       1919221756
r3             0x0      0
r4             0x7264effc       1919217660
r5             0xf7d3   63443
r6             0x7f7cb000       2138877952
r7             0x7f302800       2133862400
r8             0x7f7cb005       2138877957
r9             0x7f302fec       2133864428
r10            0x7f7cb008       2138877960
r11            0x0      0
ap             0x7fffe850       2147477584
fp             0x7fffe83c       2147477564
sp             0x7fffe838       2147477560
pc             0x7f4ccbfb       2135739387
ps             0x3c00004        62914564

I guess we are trying to add the two double values in r0/r1 to r2/r3
and get an overflow or something. Can gdb easily display these as double?
I only know about /f format:

(gdb) print/f $r0    
$3 = -1.40233554e+38
(gdb) print/f $r2
$5 = -1.67779703e+38

and adding those would be too big:

#define __DBL_MAX__ ((double)1.70141183460469229e+38L)
#define __DBL_MAX_10_EXP__ 38


>How-To-Repeat:
s/a

>Fix:
n/a



Home | Main Index | Thread Index | Old Index