Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7222 Discussions

Invalid Address specified to RtlFreeHeap

randoob1
Beginner
1,104 Views

I'm using the MKL V10 implementation of dgelss
in a VS 2005 C++ project to fit some multi-
dimensional data to a linear model. This works
correctly, but for problems above a certain size,
VS issues a warning after the debug version has
exited.

HEAP[CalTest.exe]: Invalid Address specified to
RtlFreeHeap( 00380000, 00382D48 )
Windows has triggered a breakpoint in CalTest.exe.

The release version does not complain and, either
way, the results seems to be correct. I am worried
that there might be a problem which is detected
only in the debug version.

If I build the program with MKL V9, it runs without
any such warning. The VS output logs are shown
below. A visible difference is that the V10 build
seems to have two threads, and libimalloc.dll is
loaded and unloaded twice before the program ends.
I have a one processor system with two cores, and
no hyperthreading capability.

Sorry about the long lines in this narrow window.


Loaded '..CalibrationdebugCalTest.exe', Symbols loaded.
Loaded 'C:WINDOWSsystem32 tdll.dll', No symbols loaded.
Loaded 'C:WINDOWSsystem32kernel32.dll', No symbols loaded.
Loaded 'C:WINDOWSWinSxSx86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16cmsvcp80d.dll', Symbols loaded.
Loaded 'C:WINDOWSWinSxSx86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16cmsvcr80d.dll', Symbols loaded.
Loaded 'C:WINDOWSsystem32msvcrt.dll', No symbols loaded.
Loaded 'C:Program FilesIntelMKL9.1.027ia32inmkl_lapack.dll', Binary was not built with debug information.
Loaded 'C:WINDOWSsystem32msvcr71.dll', No symbols loaded.
Loaded 'C:Program FilesIntelMKL9.1.027ia32inlibguide40.dll', Binary was not built with debug information.
Loaded 'C:Program FilesIntelMKL9.1.027ia32inmkl_p4p.dll', Binary was not built with debug information.
Loaded 'C:Program FilesIntelMKL9.1.027ia32inlibimalloc.dll', Binary was not built with debug information.
Unloaded 'C:Program FilesIntelMKL9.1.027ia32inlibimalloc.dll'
The program '[3888] CalTest.exe: Native' has exited with code 0 (0x0).


Loaded '..CalibrationdebugCalTest.exe', Symbols loaded.
Loaded 'C:WINDOWSsystem32 tdll.dll', No symbols loaded.
Loaded 'C:WINDOWSsystem32kernel32.dll', No symbols loaded.
Loaded 'C:Program FilesIntelMKL10.0.1.015ia32inmkl_intel_thread.dll', Binary was not built with debug information.
Loaded 'C:WINDOWSsystem32msvcr71.dll', No symbols loaded.
Loaded 'C:Program FilesIntelMKL10.0.1.015ia32inlibguide40.dll', Binary was not built with debug information.
Loaded 'C:WINDOWSWinSxSx86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16cmsvcp80d.dll', Symbols loaded.
Loaded 'C:WINDOWSWinSxSx86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16cmsvcr80d.dll', Symbols loaded.
Loaded 'C:WINDOWSsystem32msvcrt.dll', No symbols loaded.
Loaded 'C:Program FilesIntelMKL10.0.1.015ia32inmkl_lapack.dll', Binary was not built with debug information.
Loaded 'C:Program FilesIntelMKL10.0.1.015ia32inmkl_p4p.dll', Binary was not built with debug information.
Loaded 'C:Program FilesIntelMKL10.0.1.015ia32inlibimalloc.dll', Binary was not built with debug information.
Unloaded 'C:Program FilesIn telMKL10.0.1.015ia32inlibimalloc.dll'
Loaded 'C:Program FilesIntelMKL10.0.1.015ia32inlibimalloc.dll', Binary was not built with debug information.
Unloaded 'C:Program FilesIntelMKL10.0.1.015ia32inlibimalloc.dll'
The thread 'Win32 Thread' (0x220) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xbbc) has exited with code 0 (0x0).
HEAP[CalTest.exe]: Invalid Address specified to RtlFreeHeap( 00380000, 00382D48 )
Windows has triggered a breakpoint in CalTest.exe.
This may be due to a corruption of the heap, and indicates a bug in CalTest.exe or any of the DLLs it has loaded.

0 Kudos
1 Reply
randoob1
Beginner
1,104 Views

[Clarification] The anomaly occurs only when I run
from VS by clicking "Start Debugging". If I click
"Start Without Debugging" or run from acmd window,
there is no anomaly.

[Correction] It doesn't matter which program version
I use, Debug or Release, the behavior is the same.

[News] The antics of libimalloc.dll are irrelevant.
If I make that DLL unavailable, by moving it to an
undisclosed location, the program behavior is
exactly as before except that libimalloc.dll is
never loaded.

We are starting to see the same behavior in a
completely different program which uses MKL10 to do
Fourier transforms (DFTI interface). In this case,
the anomaly is intermittent instead of reproducible.

0 Kudos
Reply