i386/85417: Possible bug in ia32 floating-point exception handler

Chuck Ebbert 76306.1226 at compuserve.com
Sun Aug 28 18:00:44 GMT 2005


>Number:         85417
>Category:       i386
>Synopsis:       Possible bug in ia32 floating-point exception handler
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-i386
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 28 18:00:31 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Chuck Ebbert
>Release:        RELENG_6
>Organization:
>Environment:
>Description:
src/sys/i386/i386/trap.c 1.277.2.1 lines 303-308:
303:                case T_ARITHTRAP:       /* arithmetic trap */
304: #ifdef DEV_NPX
305:                        ucode = npxtrap();
306:                        if (ucode == -1)
307:                                goto userout;
308: #else

src/sys/i386/isa/npx.c:npxtrap() 
can never return -1, so SIGFPE code 0 will be sent to the
user app if no unmasked i387 exception bits are set.  This
can happen on some non-Intel processors.


>How-To-Repeat:
      
>Fix:

(1) If the current behavior is correct, remove the if statement
at line 306 since it has no effect and only confuses reviewers.

(2) Otherwise, change fpetable[] in src/sys/i386/isa/npx.c
so entry 0 is -1 instead of 0

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-i386 mailing list