#1 2021-05-21 15:42:08

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,651
Website

FPC 3.2.2 Regression for Variant Late Binding - Do Not Use

I just tried FPC 3.2.2 with mORMot tests.
They added TThread.TerminatedSet for Delphi compatibility. So far so good. Just enable it for FPC 3.2.2+ as we do for Delphi.

But some problems occurs when running variant late binding with a method name of 1 character.
No problem when calling variantvalue.toto but variantvalue.a or variantvalue.b have a Parameter with the method name transmitted as #0 so there is no method name to match.
Sounds like a compiler regression. It seems to have nothing to do with mORMot itself: the generated asm have a wrong pointer constant.
I was not able to find in https://bugs.freepascal.org/roadmap_page.php from which

So we will stick to FPC 3.2.0 as supported version of FPC.
We advise you against using FPC 3.2.2 on production, if you consider using variant late binding.

Offline

#2 2021-11-05 21:24:09

PascalDragon
Member
From: Germany
Registered: 2016-06-01
Posts: 12

Re: FPC 3.2.2 Regression for Variant Late Binding - Do Not Use

We're currently preparing FPC 3.2.4, so would you please test whether the current FPC 3.2.3 fixes the Variant related problems correctly? smile


Free Pascal Compiler Core developer

Offline

#3 2021-11-11 19:34:58

AOG
Member
Registered: 2014-02-24
Posts: 490

Re: FPC 3.2.2 Regression for Variant Late Binding - Do Not Use

Just tested with FPC 3.2.3
Same problems still seem to be present unfortunately.

Last edited by AOG (2021-11-11 19:35:23)

Offline

#4 2021-11-12 07:24:26

AOG
Member
Registered: 2014-02-24
Posts: 490

Re: FPC 3.2.2 Regression for Variant Late Binding - Do Not Use

I have found the cause of this issue. If corrected, all mORMot tests run green !

Its a change in ncal.pas.
FPC 3.2.0 and earlier have: tcb.emit_pchar_const(pchar(methodname),length(methodname),true);
FPC 3.2.2 and newer have: tcb.emit_pchar_const(pchar(methodname),length(methodname)-1,true);

The change is commented by:
            { length-1, because the following names variable *always* starts
              with #0 which will be the terminator for methodname }

If this change is reverted, all test run green on 3.2.3 and trunk.

Greetings, Alf.

Offline

#5 2021-11-12 08:02:54

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,651
Website

Re: FPC 3.2.2 Regression for Variant Late Binding - Do Not Use

Offline

Board footer

Powered by FluxBB