Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

HEAP CORRUPTION

jmloriot
Beginner
457 Views

I got the folowwing error

HEAP CORRUPTION DETECTED : after Normal block (#15840889)

at 0x00778E70.

CRT detected that the application wrote to memory after end of

Heap buffer.

What can I do ?

0 Kudos
2 Replies
Kevin_D_Intel
Employee
458 Views

Review the earlier post here. There may be advice that will help in your case too.

Which version of the Intel Fortran compiler are you using?

0 Kudos
IanH
Honored Contributor II
458 Views

It is probable that at some point not long before the error was reported, your program did something silly, like store a value to an array element whose subscript was out of bounds.  If you are not already running with /check:all, then do so.

There are C runtime (_CrtCheckMemory) and system API (HeapValidate) procedures that you can call to do a check of the state of the heap.  If /check:all doesn't identify something, then you can put these checks in at strategic places in your code, and try and narrow down the statements that are causing the corruption.  These functions are only applicable to debug builds, the appropriate one to use may depend on other settings such as the variety of runtime library that you are using.  (I cannot remember details - if /check:all doesn't help you then post back and I'll see if I can find my sample code.)

0 Kudos
Reply