Changeset 13943


Ignore:
Timestamp:
Jul 8, 2010, 9:08:20 PM (14 years ago)
Author:
R. Matthew Emerson
Message:

When we get EXC_ARITHMETIC in catch_exception_raise(), translate a
code of EXC_I386_DIV (1) to FPE_INTDIV (7).

This apparently worked by luck before because FPE_FLTDIV happens to
be 1, and the error callback looked for either FPE_FLTDIV or
FPE_INTDIV.

This change also causes the lisp to enter the kernel debugger right
away when foreign code does an integer /0 (before the change, we would
attempt to invoke the error callback, which got confused.)

(This is all Darwin-specific, of course.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/x86-exceptions.c

    r13882 r13943  
    33693369      case EXC_ARITHMETIC:
    33703370        signum = SIGFPE;
     3371        if (code == EXC_I386_DIV)
     3372          code = FPE_INTDIV;
    33713373        break;
    33723374       
Note: See TracChangeset for help on using the changeset viewer.