Changeset 14233


Ignore:
Timestamp:
Sep 6, 2010, 7:37:28 PM (14 years ago)
Author:
Gary Byers
Message:

Don't use the (Linux-specific ?) MAP_GROWSDOWN mmap option when allocating
stacks; it doesn't do what we thought it did and using it seems to trigger
a bug in some 2.6.32 Linux kernels. See ticket:731, which this change might
fix.

Location:
trunk/source/lisp-kernel
Files:
3 edited

Legend:

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

    r14206 r14233  
    298298  return VirtualAlloc(0, nbytes, MEM_RESERVE|MEM_COMMIT, MEMPROTECT_RWX);
    299299#else
    300   return mmap(NULL, nbytes, MEMPROTECT_RWX, MAP_PRIVATE|MAP_ANON|MAP_GROWSDOWN, -1, 0);
     300  return mmap(NULL, nbytes, MEMPROTECT_RWX, MAP_PRIVATE|MAP_ANON, -1, 0);
    301301#endif
    302302}
  • trunk/source/lisp-kernel/memprotect.h

    r14145 r14233  
    4646#define MEMPROTECT_RX   (PROT_READ|PROT_EXEC)
    4747#define MEMPROTECT_RWX  (PROT_READ|PROT_WRITE|PROT_EXEC)
    48 #ifndef MAP_GROWSDOWN
    49 #define MAP_GROWSDOWN (0)
    50 #endif
    5148
    5249
  • trunk/source/lisp-kernel/thread_manager.c

    r14199 r14233  
    15981598 
    15991599 
    1600 #ifndef MAP_GROWSDOWN
    1601 #define MAP_GROWSDOWN 0
    1602 #endif
    16031600
    16041601Ptr
Note: See TracChangeset for help on using the changeset viewer.