Hi,
I'm using VCL Styles Utils which uses DDetours. Until recently I was working with a circa year and a half old version of both libraries but decided to update yesterday. After updating, the Win32 version of my app works okay but the WIn64 version of my app throws the below exception. I've managed to replicate the issue with a basis new Win64 VCL application (DPR code provided below). The line that raises the first exception is:
Initially, I could not replicate the error until I turned on Overflow Checking in the compiler options. All my debug application run with Range, Overflow and IO checking on. I'm thinking that the above should be wrapped in {$Q-} if it is intended that range checking should be switched off. I did this as a test but further, similar lines, threw exceptions so this might need to be applied to the whole unit.
BTW: I'm using RAD Studio 10.4.1 Enterprise.
Exception Message from IDE Event LogFirst chance exception at $00007FFD4A033B29. Exception class EIntOverflow with message 'Integer overflow at (000000000076CFEF{Win64DDetours.exe}) [0000000000B6CFEF] DDetours.CorrectJ (Line 1040, "DDetours.pas") + $14'. Process Win64DDetours.exe (11456)
Hi, I'm using VCL Styles Utils which uses DDetours. Until recently I was working with a circa year and a half old version of both libraries but decided to update yesterday. After updating, the Win32 version of my app works okay but the WIn64 version of my app throws the below exception. I've managed to replicate the issue with a basis new Win64 VCL application (DPR code provided below). The line that raises the first exception is:
DDetours.pas 1040:
Offset := Int64(UInt64(PInst^.Branch.Target) - UInt64(PQ) - 6);
Initially, I could not replicate the error until I turned on Overflow Checking in the compiler options. All my debug application run with Range, Overflow and IO checking on. I'm thinking that the above should be wrapped in {$Q-} if it is intended that range checking should be switched off. I did this as a test but further, similar lines, threw exceptions so this might need to be applied to the whole unit.
BTW: I'm using RAD Studio 10.4.1 Enterprise.
Exception Message from IDE Event Log
First chance exception at $00007FFD4A033B29. Exception class EIntOverflow with message 'Integer overflow at (000000000076CFEF{Win64DDetours.exe}) [0000000000B6CFEF] DDetours.CorrectJ (Line 1040, "DDetours.pas") + $14'. Process Win64DDetours.exe (11456)
Call Stack from IDE
DPR Code