[fpc-devel] Memory leak on BeginThread() when RTL compiled with -O2
Yuriy Sydorov
jura at cp-lab.com
Tue May 25 18:08:25 CEST 2021
On 24.05.2021 23:16, Jonas Maebe via fpc-devel wrote:
> On 24/05/2021 12:18, Yuriy Sydorov via fpc-devel wrote:
>> You can't first pass the -Mdelphi switch and then override it with
>> -Mfpc. -Mdelphi implicitly enables lot of other compiler options which
>> are not reverted by -Mfpc.
>
> That feels like a bug.
I've double checked this and the mode change seems to work fine.
The source of the issue is that specifying -Mfpc enables inlining which triggers a bug in the Windows RTL.
I've fixed the bug in r49400.
Yuriy.
More information about the fpc-devel
mailing list