Author Topic: DebugHeap updated  (Read 48 times)

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 11855
  • Assembler is fun ;-)
    • MasmBasic
DebugHeap updated
« on: January 12, 2022, 11:44:48 AM »
RichMasm users can insert OPT_Debug 1 somewhere in their source to run the executable via \Masm32\MasmBasic\Res\DebugHeap.exe

If you have a suspicion that your proggie does not respect the rules, DebugHeap.exe will detect it, and show you where it happens. It's one of the most useful tools in my repertoire, I use it a lot.

Attached a new version, with one minor change. The old version did create a console if an error occurred and there was no console present (which is the case for most GUI programs). However, I had a case (SSD saver) where a console was present but hidden. The new version detects that and restores the console to make sure the output becomes visible. Example:

Code: [Select]
## HEAP[DebugHeapTest.exe]:
## Heap block at 00286AE0 modified at 00286B22 past requested size of 39
*
## HEAP[DebugHeapTest.exe]:
## Invalid address specified to RtlFreeHeap( 00280000, 00286AE8 )
*
** DebugHeap found errors **