NetBSD-Bugs archive

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

Re: misc/56820: Many FPE related tests fail on softfloat machines



The following reply was made to PR misc/56820; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: misc/56820: Many FPE related tests fail on softfloat machines
Date: Sat, 7 Oct 2023 14:13:34 +0200

 There is still something missing - float_exception_flags needs to be cleared
 "more often", but I'm not quite sure where.
 
 For example with the patch applied, the following still fails:
 
 Test case: lib/libc/gen/t_fpsetmask/fpsetmask_unmasked_double
 Duration: 21.741232 seconds
 Termination reason
 
 FAILED: Test program received signal 8 (core dumped)
 Standard error stream
 
 Test program crashed; attempting to get stack trace
 [New process 9660]
 Core was generated by `t_fpsetmask'.
 Program terminated with signal SIGFPE, Arithmetic exception.
 #0  0x752ea0f4 in sigqueueinfo () from /usr/lib/libc.so.12
 #0  0x752ea0f4 in sigqueueinfo () from /usr/lib/libc.so.12
 #1  0x752e84c2 in _softfloat_float_raise (flags=<optimized out>) at /work/src/lib/libc/softfloat/softfloat-specialize:117
 #2  0x752e9bc8 in __divdf3 (a=<optimized out>, b=<optimized out>) at /work/src/lib/libc/softfloat/bits64/softfloat.c:2944
 #3  0x004011b0 in d_inv () at /work/src/tests/lib/libc/gen/t_fpsetmask.c:126
 #4  0x0040146e in fpsetmask_unmasked (test_ops=0x4127f8 <double_ops>) at /work/src/tests/lib/libc/gen/t_fpsetmask.c:281
 #5  0x7539947c in atf_tc_run (tc=0x412a98 <atfu_fpsetmask_unmasked_double_tc>, resfile=<optimized out>) at /work/src/external/bsd/atf/dist/atf-c/tc.c:1024
 #6  0x753964f4 in atf_tp_run (tp=<optimized out>, tcname=<optimized out>, resfile=0x753b5018 "/tmp/atf-run.Uu9ByZ/tcr") at /work/src/external/bsd/atf/dist/atf-c/tp.c:205
 #7  0x75395ff0 in run_tc (exitcode=<synthetic pointer>, p=0x7ff074f0, tp=0x7ff074e4) at /work/src/external/bsd/atf/dist/atf-c/detail/tp_main.c:510
 #8  controlled_main (exitcode=<synthetic pointer>, add_tcs_hook=0x401968 <atfu_tp_add_tcs>, argv=<optimized out>, argc=<optimized out>) at /work/src/external/bsd/atf/dist/atf-c/detail/tp_main.c:580
 #9  atf_tp_main (argc=<optimized out>, argv=<optimized out>, add_tcs_hook=0x401968 <atfu_tp_add_tcs>) at /work/src/external/bsd/atf/dist/atf-c/detail/tp_main.c:610
 #10 0x00401d4a in main (argc=<optimized out>, argv=<optimized out>) at /work/src/tests/lib/libc/gen/t_fpsetmask.c:352
 Stack trace complete
 
 
 This is due to float_exception_flags being set to 1 for the first round
 of that test (d_dz -> double division by zero) and that bit is still present
 in the second iteration (d_inv -> double infinite value), where bit 4 gets
 added to float_exception_flags and masked in _softfloat_float_raise(),
 but due to 1 being left over after the mask operation it still triggers
 a SIGFPE.
 
 Martin
 


Home | Main Index | Thread Index | Old Index