On Mon, Aug 22, 2011 at 6:48 PM, Ludo Brands <ludo.bra...@free.fr> wrote:
>>
>> Ludo, the patch looks very promising, I just found one
>> problem. I have a test fragment in my form (in a simple
>> simplest application)
>>
>> procedure TForm1.FormCreate(Sender: TObject);
>> var
>>   a: integer;
>> begin
>>   a:=1;
>>   GetMem(fTest, 1024*1024);
>>   GetMem(fTest2, 1024*1024);
>> end;
>>
>
> The problem is a missing stack frame. The caller (TFORM1_FORMCREATE) has a
> stackframe but the callee (GetMem) doesn't.
>
> In other words: the address below the frame is the address of the caller. To
> find the caller, the callee has to have a stackframe.
>
> Attached a patch for missing stack frames. This doesn't solve all cases but
> most. The const MAXFAILS could be made higher but that is again running the
> risk of getting false positives. The reason for having maxfails is that a
> lot of valid addresses are outside the main program area. Your testcase is
> an example.
>

I see, it makes sense. And this temporal look up with maxfails looks
like decent workaround.

There are some things we discussed to fix and improve. Ludo, Isn't it
better to move the following discussion to the bugtracker inside a new
"feature request" topic. I just suppose there are few readers here
that follow and interested in this discussion :) (CMIIW)

Max
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to