[Lazarus] Anyone using LCLIntf critical section routines?

Boian Mitov mitov at mitov.com
Mon Jun 23 12:15:38 CEST 2008


  The callbacks are "stdcall" . The problem is confirmed to be the Delphi 
calling convention, and you seem to be right. It appears to be registers not 
being properly saved. I never had the time to investigate it on assembly 
level :-( .

  To make you laugh at me, and my stupidity, 3 years after I discovered the 
problem in Delphi after 3 days of cutting code to nail it down to problem 
with the calling convention I did the same mistake in C++ Builder where the 
same problem exists :-D . Am I stupid or what, should have known after the 
first burn, but sometimes you just forget. Now this is the first thing I 
check when I have unexpected rare crashes.

  With best regards,
    Boian Mitov

--------------------------------------------------------------------
Mitov Software
http://www.mitov.com
--------------------------------------------------------------------


----- Original Message ----- 
From: "Marco van de Voort" <marcov at stack.nl>
To: "General mailing list" <lazarus at lazarus.freepascal.org>
Sent: Monday, June 23, 2008 3:01 AM
Subject: Re: [Lazarus] Anyone using LCLIntf critical section routines?


>
> Hmm, it might be a problem of those api's callbacks, or their declarations
> that assume some registers are saved that aren't saved when the register
> calling convention is used.
>
> IOW, you could be looking at the wrong place, the problem not being the
> cdecl adding, but a wrong declaration of the callbacks (cdecl vs stdcall?)
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus 




More information about the Lazarus mailing list