Changeset 14692 for trunk/source
- Timestamp:
- Mar 22, 2011, 9:40:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/lisp-kernel/x86-exceptions.c
r14672 r14692 2373 2373 stack.ss_flags = 0; 2374 2374 mmap(stack.ss_sp,stack.ss_size, PROT_READ|PROT_WRITE|PROT_EXEC,MAP_FIXED|MAP_ANON|MAP_PRIVATE,-1,0); 2375 #ifdef LINUX 2376 /* The ucontext pushed on the altstack may not contain the (largish) 2377 __fpregs_mem field; copy_ucontext() wants to copy what it thinks 2378 is a pointer to a full ucontext. That'll touch a page beyond the 2379 bottom of the altstack, and when this happens on the initial 2380 thread's stack on a recent (2.6.32+?) kernel, we'll SIGBUS instead 2381 of mapping that page. 2382 It's easier to just reserve that page here than it would be to 2383 change copy_ucontext(). 2384 */ 2385 stack.ss_size -= sizeof(struct ucontext); 2386 #endif 2375 2387 if (sigaltstack(&stack, NULL) != 0) { 2376 2388 perror("sigaltstack");
Note: See TracChangeset
for help on using the changeset viewer.