From 8ff0aaa36918970b7eaa0bdfbfa320afa564ad20 Mon Sep 17 00:00:00 2001 From: pierre Date: Tue, 16 Apr 2019 15:10:40 +0000 Subject: [PATCH] Avoid arithmetic overflow inside heaptrc unit on this test git-svn-id: trunk@41883 - --- tests/webtbs/tw17430.pp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/webtbs/tw17430.pp b/tests/webtbs/tw17430.pp index 3884580cc0..90ef6892f8 100644 --- a/tests/webtbs/tw17430.pp +++ b/tests/webtbs/tw17430.pp @@ -6,7 +6,13 @@ var p:pointer; begin returnnilifgrowheapfails:=true; - GetMem(p,ptruint(-128)); + { Use a bigger absoulte value to avoid + getting a overflow inside heaptrc + if compiled with -gh option: + -128 changed to -1024, + which should be larger than typical + size of extra memory used by heaptrc } + GetMem(p,ptruint(-1024)); if assigned(p) then halt(1); end.