mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-23 18:40:37 +02:00
* fixed pointer checking for win32, thx to Martin Schreiber for the patch
This commit is contained in:
parent
a8a32ac06f
commit
522531dbf8
@ -729,6 +729,14 @@ var
|
||||
eend : ptruint; external name '_end';
|
||||
{$endif}
|
||||
|
||||
{$ifdef win32}
|
||||
var
|
||||
sdata : ptruint; external name '__data_start__';
|
||||
edata : ptruint; external name '__data_end__';
|
||||
sbss : ptruint; external name '__bss_start__';
|
||||
ebss : ptruint; external name '__bss_end__';
|
||||
{$endif}
|
||||
|
||||
|
||||
procedure CheckPointer(p : pointer);{$ifndef NOSAVEREGISTERS}saveregisters;{$endif}[public, alias : 'FPC_CHECKPOINTER'];
|
||||
var
|
||||
@ -768,6 +776,13 @@ begin
|
||||
if (ptruint(p)>ptruint(get_frame)) and
|
||||
(ptruint(p)<Win32StackTop) then
|
||||
goto _exit;
|
||||
{ inside data ? }
|
||||
if (ptruint(p)>=ptruint(@sdata)) and (ptruint(p)<ptruint(@edata)) then
|
||||
goto _exit;
|
||||
|
||||
{ inside bss ? }
|
||||
if (ptruint(p)>=ptruint(@sbss)) and (ptruint(p)<ptruint(@ebss)) then
|
||||
goto _exit;
|
||||
{$endif win32}
|
||||
|
||||
{$ifdef linux}
|
||||
@ -1178,7 +1193,10 @@ finalization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.41 2005-03-04 16:49:34 peter
|
||||
Revision 1.42 2005-03-10 20:36:31 florian
|
||||
* fixed pointer checking for win32, thx to Martin Schreiber for the patch
|
||||
|
||||
Revision 1.41 2005/03/04 16:49:34 peter
|
||||
* fix getheapstatus bootstrapping
|
||||
|
||||
Revision 1.40 2005/02/28 15:38:38 marco
|
||||
|
Loading…
Reference in New Issue
Block a user