Wed 21 Sep 2011 05:12:51 AM UTC, original submission:
In windows, the allocation of physical memory for the stack is controlled by a guard page on the last not allocated page of the stack. Functions that use more then 4K of stack, should access every page of the stack they need in the correct order, to ensure the allocation of physical memory for the complete stack they use. Failing to do so, results in an access violation exception. Libjit did not do this. The changes below implement this. See also:
http://blogs.technet.com/b/markrussinovich/archive/2009/07/08/3261309.aspx
The fixes are below. I couldn't make a diff, because my previous patches are already applied in this code, but not in the main trunk...
Fix for 32 bit (jit-rules-x86.c), chages are on and after the #ifdef WIN32 block:
Fix for 64 bit (jit-rules-x86-64.c), changes are in the block with the inline assembler within the #ifdef WIN64:
|