mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 17:29:21 +02:00
Try to implement CheckPointer exclusion range for FreeBSD OS
git-svn-id: trunk@39394 -
This commit is contained in:
parent
7d96c2a368
commit
18cc1f1709
@ -968,6 +968,13 @@ var
|
|||||||
eend : ptruint; external name '_end';
|
eend : ptruint; external name '_end';
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
|
{$ifdef freebsd}
|
||||||
|
var
|
||||||
|
text_start: ptruint; external name '__executable_start';
|
||||||
|
etext: ptruint; external name '_etext';
|
||||||
|
eend : ptruint; external name '_end';
|
||||||
|
{$endif}
|
||||||
|
|
||||||
{$ifdef os2}
|
{$ifdef os2}
|
||||||
(* Currently still EMX based - possibly to be changed in the future. *)
|
(* Currently still EMX based - possibly to be changed in the future. *)
|
||||||
var
|
var
|
||||||
@ -1081,6 +1088,15 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
{$endif linux}
|
{$endif linux}
|
||||||
|
|
||||||
|
{$ifdef freebsd}
|
||||||
|
{ inside stack ? }
|
||||||
|
if (ptruint(p)>ptruint(get_frame)) and
|
||||||
|
(ptruint(p)<ptruint(StackTop)) then
|
||||||
|
exit;
|
||||||
|
{ inside data or bss ? }
|
||||||
|
if (ptruint(p)>=ptruint(@text_start)) and (ptruint(p)<ptruint(@eend)) then
|
||||||
|
exit;
|
||||||
|
{$endif linux}
|
||||||
{$ifdef morphos}
|
{$ifdef morphos}
|
||||||
{ inside stack ? }
|
{ inside stack ? }
|
||||||
if (ptruint(p)<ptruint(StackTop)) and (ptruint(p)>ptruint(StackBottom)) then
|
if (ptruint(p)<ptruint(StackTop)) and (ptruint(p)>ptruint(StackBottom)) then
|
||||||
|
Loading…
Reference in New Issue
Block a user