소스 검색

* fixed generic stack checking code (the stack pointer is already decreased
before FPC_STACKCHECK is called, so don't subtract the allocated size
again when checking)

git-svn-id: trunk@12525 -

Jonas Maebe 16 년 전
부모
커밋
b7d461d0f0
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      rtl/inc/system.inc

+ 4 - 1
rtl/inc/system.inc

@@ -708,7 +708,10 @@ begin
   { Avoid recursive calls when called from the exit routines }
   if StackError then
    exit;
-  c := Sptr - (stack_size + STACK_MARGIN);
+  { don't use sack_size, since the stack pointer has already been
+    decreased when this routine is called
+  }
+  c := Sptr - STACK_MARGIN;
   if (c <= StackBottom) then
    begin
      StackError:=true;