[fpc-devel] protecting dataspace suggestion

Peter Vreman peter at freepascal.org
Mon Apr 17 14:10:28 CEST 2006


At 11:59 17-4-2006, you wrote:
>Sometimes RTL dataspace, including run time error numbers (may be some 
>debug information), is corrupted because of poor programming. It's a 
>reason for getting strange messages like "Run time error 998" (may be 
>omitting line number information etc).
>
>FPC has implemented e.g. some checks for pointers, so some checks for 
>corrupted RTL dataspace would not be really out of the way.
>
>If I get it right, there is a simple way to check validity of dataspace 
>(e.g. RTL one) using global properties. I suggest three ways. Of course, 
>all of them are for debug purposes and are not for releases.
>
>Also, no error correction is provided, but it is possible (with slightly 
>more complicated algorithm). But it wouldn't help after large memory block 
>is garbaged.

I don't see the use of this for general implementation in fpc. In 90% of 
the overwrite cases the stack or heap is corrupted and not the datasegment 
itself. But ofcourse you can create your own error checking units that fit 
your own situation.



Peter




More information about the fpc-devel mailing list