Changeset 15091


Ignore:
Timestamp:
Nov 23, 2011, 9:59:03 PM (8 years ago)
Author:
rme
Message:

In create_exception_callback_frame(), try to figure out if a tra
on the top of the stack looks reasonable before dereferencing it.
Bug if it looks suspect.

File:
1 edited

Legend:

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

    r15055 r15091  
    411411  f = xpGPR(xp,Ifn);
    412412  tra = *(LispObj*)(xpGPR(xp,Isp));
    413   tra_f = tra_function(tra);
     413  if (tra_p(tra)) {
     414    char *p = (char *)tra;
     415    extern char *spentry_start, *spentry_end;
     416
     417    if (ptr_in_area(p, tcr->ts_area) ||
     418        (p > spentry_start && p < spentry_end) ||
     419        in_any_consing_area(tra))
     420      tra_f = tra_function(tra);
     421    else
     422      Bug(xp, "martian tra %p\n", tra);
     423  }
    414424  abs_pc = (LispObj)xpPC(xp);
    415425#if WORD_SIZE == 64
Note: See TracChangeset for help on using the changeset viewer.