Changeset 7521 for branches/working-0710


Ignore:
Timestamp:
Oct 25, 2007, 6:10:28 PM (12 years ago)
Author:
gb
Message:

Check to ensure that both rsp and rbp are somewhere in the vstack area
before taking an interrupt.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0710/ccl/lisp-kernel/x86-exceptions.c

    r7458 r7521  
    11951195#endif
    11961196
     1197Boolean
     1198stack_pointer_on_vstack_p(LispObj stack_pointer, TCR *tcr)
     1199{
     1200  area *a = tcr->vs_area;
     1201 
     1202  return (((BytePtr)stack_pointer <= a->high) &&
     1203          ((BytePtr)stack_pointer > a->low));
     1204}
     1205
    11971206void
    11981207interrupt_handler (int signum, siginfo_t *info, ExceptionInformation *context)
     
    12051214    if ((TCR_INTERRUPT_LEVEL(tcr) < 0) ||
    12061215        (tcr->valence != TCR_STATE_LISP) ||
    1207         (tcr->unwinding != 0)) {
     1216        (tcr->unwinding != 0) ||
     1217        ! stack_pointer_on_vstack_p(xpGPR(context,Isp), tcr) ||
     1218        ! stack_pointer_on_vstack_p(xpGPR(context,Irbp), tcr)) {
    12081219      tcr->interrupt_pending = (1L << (nbits_in_word - 1L));
    12091220    } else {
Note: See TracChangeset for help on using the changeset viewer.