Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5115 Discussions

Kernel resource leak at string array assignment (Fortran)

Bernar
Beginner
487 Views

Hi!

Inspector shows me an Kernel resource leak in source: exe_common.inl

Do I have to expect such errors all the time or did I do anything wrong?
(I read about the possibility of "Include only the following module(s)" in the Target Tab)  As far as I understood, this is valid fortran 2015 code? (That why I put it here instead of the Fortran Forum)

I also didn't find any limitation documentation on that.

I did an minimal programm to reproduce. ( C Main Programm calls an Fortran Function)

subroutine entry_point() bind(c, name='entry_point')
    use, intrinsic::iso_c_binding
    integer :: i,j
    
    character(len=1000), dimension(1000) :: MESSAGES = 'BLANK' 
    MESSAGES(1) = 'ONE'    !Either this or the next line cause the problem
    !MESSAGES(:)='BLANK'  !Either this or the previous line cause the problem
end subroutine
#include "stdafx.h"

extern "C"
{
  void entry_point();
}

int main()
{
  entry_point();
  return 0;
}

Thanks in advance

B.

i used: inspector 2018, ifort 17.02, VS2015, [edit, Plattform added] on a intel x64 Windows 10 machine

inspxe-cl -collect mi1 -knob detect-leaks-on-exit=true -knob detect-resource-leaks=true -knob enable-memory-growth-detection=true -knob enable-on-demand-leak-detection=true -knob still-allocated-memory=true -knob stack-depth=8 -mrte-mode=auto -module-filter-mode=include -app-working-dir "Documents\Visual Studio 2015\Projects\Playground\MemoryDebugging\MemoryDebugging" -- "\Documents\Visual Studio 2015\Projects\Playground\MemoryDebugging\x64\Debug\MemoryDebugging.exe"

ifort-flags: /nologo /debug:full /Od /stand:f15 /warn:all /module:"x64\Debug\\" /object:"x64\Debug\\" /Fd"x64\Debug\vc140.pdb" /traceback /check:none /libs:dll /threads /libdir:noauto /libdir:nouser /c /OUT:"x64\Debug\MinimalFLib.lib" /NOLOGO /NODEFAULTLIB

lib "$(SolutionDir)..\MinimalFLib\MinimalFLib\MinimalFLib\$(PlatformName)\$(Configuration)\MinimalFLib.lib"  "$(IFORT_COMPILER17)compiler\lib\intel64_win\libirc.lib" "$(IFORT_COMPILER17)compiler\lib\intel64_win\ifmodintr.lib" "$(IFORT_COMPILER17)compiler\lib\intel64_win\libifcoremt.lib" "$(IFORT_COMPILER17)compiler\lib\intel64_win\libifport.lib" "$(IFORT_COMPILER17)compiler\lib\intel64_win\libmmt.lib" "$(IFORT_COMPILER17)compiler\lib\intel64_win\ifconsol.lib"

vc++ flags: /Yu"stdafx.h" /GS /W3 /Zc:wchar_t /ZI /Gm /Od /sdl /Fd"x64\Debug\vc140.pdb" /Zc:inline /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /MDd /Fa"x64\Debug\" /EHsc /nologo /Fo"x64\Debug\" /Fp"x64\Debug\MemoryDebugging.pch"  /OUT:"Documents\Visual Studio 2015\Projects\Playground\MemoryDebugging\x64\Debug\MemoryDebugging.exe" /MANIFEST /NXCOMPAT /PDB:"Documents\Visual Studio 2015\Projects\Playground\MemoryDebugging\x64\Debug\MemoryDebugging.pdb" /DYNAMICBASE "Documents\Visual Studio 2015\Projects\Playground\MinimalFLib\MinimalFLib\MinimalFLib\x64\Debug\MinimalFLib.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X64 /NODEFAULTLIB:"libirc.lib" /INCREMENTAL /PGD:"Documents\Visual Studio 2015\Projects\Playground\MemoryDebugging\x64\Debug\MemoryDebugging.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Debug\MemoryDebugging.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /TLBID:1 

 

0 Kudos
0 Replies
Reply