Migration of old project from C++Builder 10.2 to 10.2.3 crashes at runtime

277 Views Asked by At

I have a very hard time upgrading our old C++Builder 10.2 project to 10.2.3 (we are using the Clang compiler, 32bit application on a 64bit PC).

The 10.2.3 installation went OK (on a clean Windows 10 PC), - the project compiles and links - everyone is happy so far.

But, when running the application in the debugger, I can see that the this pointer for the MainForm (a rather large object, for historic reasons) suddenly changes to garbage across a single method invocation call (when calling one of its own methods - just after the constructor is finished) which leads to a crucial failure.

I have tried to comment out the __fastcall calling convention for the particular method, and then the debugger goes a bit further, but then crashes in the next method invocation using __fastcall due to this pointer corruption (we have 1000+ methods with __fastcall, so commenting them all out is not an option).

Does anyone have a clue what is happening?

A new Clang compiler switch, maybe?

Issue with large objects?

I also tried to build a brand new project from scratch in 10.2.3 - but with no luck - the same weird thing happens.

1

There are 1 best solutions below

1
On