The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,058 other followers

Delphi still doesn’t raise overflow exception on Int64 multiplication…

Posted by jpluimers on 2018/06/28

Thanks to Stefan Glienke for pointing me at the below patch for [WayBack] Why doesn’t raise overflow exception on multiplication example or how to detect in this case?{$RANGECHECKS ON} {$OVERFLOWCHECKS ON}varvalue: Int64;… – Rafael Dipold – Google+.

It’s basically an issue in __llmulo that has been documented but not solved since “forever”:

some people “some while ago” reported this and even posted a solution: [WayBack

And there it is again: [WayBack

And most recently:

FWIW here is a runtime patch that corrects this (using the version posted in QC#119146):

The bug tracking of the Delphi team is so bad, that some of the reports actually mark this issue “As Designed” like in [WayBack

The below patch requires rights to call [WayBackWriteProcessMemory as documented in [WayBackHow to Read and Write Other Process Memory.


Patch at [WayBack]




3 Responses to “Delphi still doesn’t raise overflow exception on Int64 multiplication…”

  1. rvelthuis said

    As others said, it was fixed. I reported and I checked it regularly. It is fixed.

  2. Marco Cantu said

    As indicates it was fixed in 10.2 Tokyo

  3. HeartWare said

    It sems to have been fixed in 10.2.3

    I : Int64;

    I:=Int64.MaxValue; I:=I*2;

    produces an integer overflow exception…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: