[fpc-pascal] writeln: FPC runtime race conditions in external C threads

Michael Van Canneyt michael at freepascal.org
Mon Jul 12 20:45:06 CEST 2010



On Mon, 12 Jul 2010, Alexander Grau wrote:

>
> Am 12.07.2010 um 18:17 schrieb Jonas Maebe:
>
>> 
>> On 12 Jul 2010, at 13:24, Michael Van Canneyt wrote:
>> 
>>> Basically, any heap memory access and standard pascal I/O are forbidden in
>>> threads started outside FPC, because the necessary thread structures are 
>>> not
>>> initialized correctly.
>> 
>> I think that I've finally found a way to resolve this properly in r15557.
>
>
> Wow, that's interesting! (was it so easy or was it already on your TODO/wish 
> list ;-))  - I'll give it a try!
>
>
>
> r15557 | jonas | 2010-07-12 18:16:50 +0200 (Mo, 12 Jul 2010) | 3 lines
>
> + added support for intialising/finalising threads not started via the FPC
>   runtime

I don't see how this helps, because CRelocateThreadvar is only called from
within the FPC thread creation routine, or am I wrong in that ?

Michael.



More information about the fpc-pascal mailing list