Ignore:
Timestamp:
Jul 27, 2010, 11:08:50 PM (10 years ago)
Author:
gb
Message:

Lots of changes to support stack-overflow detection on ARM Linux.
(Write protect the control stack, handle SIGSEGV on an alternate
signal stack ...) The sigaltstack mechanism doesn't work if the
specified signal stack is within the allocated control stack region
(we generally use the top few pages of the control stack on x86;
here, we map a few pages and need to remember to free them when the
thread dies.)
Also: need some recovery mechanism, so that after the thread unwinds
out of the "yellow zone" the yellow zone is re-protected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/arm/lisp-kernel/arm-exceptions.h

    r13989 r14066  
    148148extern natural ror(natural, natural);
    149149#endif
     150
     151#ifdef DARWIN
     152#undef USE_SIGALTSTACK
     153#else
     154#define USE_SIGALTSTACK 1
     155#endif
     156
     157#ifdef USE_SIGALTSTACK
     158void
     159invoke_handler_on_main_stack(int, siginfo_t*, ExceptionInformation *, void *, void*);
     160#endif
     161
     162#ifdef USE_SIGALTSTACK
     163#define ALTSTACK(handler) altstack_ ## handler
     164#else
     165#define ALTSTACK(handler) handler
     166#endif
Note: See TracChangeset for help on using the changeset viewer.