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 4,262 other subscribers

Debugging a Delphi – Format and Pointers/Hex Values (Memory Overwrite) – Stack Overflow

Posted by jpluimers on 2021/01/12

A long time ago (Delphi XE2 era), David Dubois and I helped out Doug find either the cause or a workaround of a memory overwrite in a 32-bit application.

The problem was that a call to Format for a pointe or hex value would give corrupt results, but with a regular integer value it would succeed.

Doug created an example [WayBack] overwriting some memory to simulate the problem.

I provided some steps [WayBack] to help trace such cases down.

In the and a rebuild – first withut madExcept, later with madExcept turned on again – solved the problem.

Likely this was the Delphi IDE becoming corrupt, something which I have seen intermittently over the last two decades.

Be sure to read both answers at [WayBack] delphi – Format and Pointers/Hex Values (Memory Overwrite) – Stack Overflow

–jeroen

Leave a comment

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