Valgrind leak reported in libnvf.so

Hi, I am using valgrind to check memory leak for my program. Valgrind leak reported in libnvf.so.

==1552028== Memcheck, a memory error detector
==1552028== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1552028== Using Valgrind-3.18.0.GIT-4c8c4a9c3a-20210409 and LibVEX; rerun with -h for copyright info
==1552028== Command: ././bin/my_program
==1552028== Parent PID: 1552025
==1552028== 
--1552028-- 
--1552028-- Valgrind options:
--1552028--    --verbose
--1552028--    --log-file=./tools/valgrind/my_program.valgrind
--1552028--    --show-leak-kinds=all
--1552028--    --leak-check=full
--1552028--    --track-origins=yes
--1552028-- Contents of /proc/version:
--1552028--   Linux version 5.4.0-77-generic (buildd@lgw01-amd64-028) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021
--1552028-- 
--1552028-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand-rdseed
--1552028-- Page sizes: currently 4096, max supported 4096
--1552028-- Valgrind library directory: /opt/valgrind/3.18.0.GIT/libexec/valgrind
--1552028-- Reading syms from /prj/bin/my_program
--1552028-- Reading syms from /lib/x86_64-linux-gnu/ld-2.31.so
--1552028--   Considering /lib/x86_64-linux-gnu/ld-2.31.so ..
--1552028--   .. CRC mismatch (computed b1e31cec wanted 7bd1f8ba)
--1552028--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.31.so ..
--1552028--   .. CRC is valid
--1552028-- Reading syms from /opt/valgrind/3.18.0.GIT/libexec/valgrind/memcheck-amd64-linux
--1552028--    object doesn't have a dynamic symbol table
--1552028-- Scheduler: using generic scheduler lock implementation.
--1552028-- Reading suppressions file: /opt/valgrind/3.18.0.GIT/libexec/valgrind/default.supp
==1552028== embedded gdbserver: reading from tmp/vgdb-pipe-from-vgdb-to-1552028-by-alig-on-???
==1552028== embedded gdbserver: writing to   tmp/vgdb-pipe-to-vgdb-from-1552028-by-alig-on-???
==1552028== embedded gdbserver: shared mem   tmp/vgdb-pipe-shared-mem-vgdb-1552028-by-alig-on-???
==1552028== 
==1552028== TO CONTROL THIS PROCESS USING vgdb (which you probably
==1552028== don't want to do, unless you know exactly what you're doing,
==1552028== or are doing some strange experiment):
==1552028==   /opt/valgrind/3.18.0.GIT/libexec/valgrind/../../bin/vgdb --pid=1552028 ...command...
==1552028== 
==1552028== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==1552028==   /path/to/gdb ././bin/my_program
==1552028== and then give GDB the following command
==1552028==   target remote | /opt/valgrind/3.18.0.GIT/libexec/valgrind/../../bin/vgdb --pid=1552028
==1552028== --pid is optional if only one valgrind process is running
==1552028== 
--1552028-- REDIR: 0x4022f60 (ld-linux-x86-64.so.2:strlen) redirected to 0x580b2e82 (vgPlain_amd64_linux_REDIR_FOR_strlen)
--1552028-- REDIR: 0x4022d30 (ld-linux-x86-64.so.2:index) redirected to 0x580b2e9c (vgPlain_amd64_linux_REDIR_FOR_index)
--1552028-- Reading syms from /opt/valgrind/3.18.0.GIT/libexec/valgrind/vgpreload_core-amd64-linux.so
--1552028-- Reading syms from /opt/valgrind/3.18.0.GIT/libexec/valgrind/vgpreload_memcheck-amd64-linux.so
==1552028== WARNING: new redirection conflicts with existing -- ignoring it
--1552028--     old: 0x04022f60 (strlen              ) R-> (0000.0) 0x580b2e82 vgPlain_amd64_linux_REDIR_FOR_strlen
--1552028--     new: 0x04022f60 (strlen              ) R-> (2007.0) 0x04844390 strlen
--1552028-- REDIR: 0x401f740 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4845260 (strcmp)
--1552028-- REDIR: 0x40234c0 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4848df0 (mempcpy)
--1552028-- Reading syms from /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libblas_lp64.so.0
--1552028-- Reading syms from /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_intel_ilp64.so.1
--1552028-- Reading syms from /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_sequential.so.1
--1552028-- Reading syms from /opt/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_core.so.1
--1552028-- Reading syms from /lib/x86_64-linux-gnu/libpthread-2.31.so
--1552028--   Considering /usr/lib/debug/.build-id/ee/b5b055a9d738db64e450065f88980bebfc9cc2.debug ..
--1552028--   .. build-id is valid
--1552028-- Reading syms from /lib/x86_64-linux-gnu/libm-2.31.so
--1552028--   Considering /lib/x86_64-linux-gnu/libm-2.31.so ..
--1552028--   .. CRC mismatch (computed 5f7b2a42 wanted ffb185de)
--1552028--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libm-2.31.so ..
--1552028--   .. CRC is valid
--1552028-- Reading syms from /lib/x86_64-linux-gnu/libdl-2.31.so
--1552028--   Considering /lib/x86_64-linux-gnu/libdl-2.31.so ..
--1552028--   .. CRC mismatch (computed 3ec850eb wanted 9bcd6f8f)
--1552028--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libdl-2.31.so ..
--1552028--   .. CRC is valid
--1552028-- Reading syms from /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvf.so
--1552028-- Reading syms from /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvomp.so
--1552028-- Reading syms from /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvcpumath.so
--1552028-- Reading syms from /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvc.so
--1552028-- Reading syms from /lib/x86_64-linux-gnu/librt-2.31.so
--1552028--   Considering /lib/x86_64-linux-gnu/librt-2.31.so ..
--1552028--   .. CRC mismatch (computed cbb60aeb wanted a2f7da19)
--1552028--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/librt-2.31.so ..
--1552028--   .. CRC is valid
--1552028-- Reading syms from /lib/x86_64-linux-gnu/libc-2.31.so
--1552028--   Considering /lib/x86_64-linux-gnu/libc-2.31.so ..
--1552028--   .. CRC mismatch (computed 11759501 wanted 88150686)
--1552028--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so ..
--1552028--   .. CRC is valid
--1552028-- Reading syms from /opt/gcc/11.1.0/lib64/libgcc_s.so.1
--1552028-- REDIR: 0x4023320 (ld-linux-x86-64.so.2:stpcpy) redirected to 0x4847ad0 (stpcpy)
--1552028-- Reading syms from /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libacchost.so
--1552028-- REDIR: 0xe87f600 (libc.so.6:memmove) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
==1552028== Preferring higher priority redirection:
--1552028--     old: 0x0e96a670 (__memcpy_avx_unalign) R-> (2018.0) 0x04846530 __memcpy_avx_unaligned_erms
--1552028--     new: 0x0e96a670 (__memcpy_avx_unalign) R-> (2018.1) 0x04847e50 memmove
--1552028-- REDIR: 0xe87e900 (libc.so.6:strncpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87f930 (libc.so.6:strcasecmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87e220 (libc.so.6:strcat) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87e960 (libc.so.6:rindex) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe880dd0 (libc.so.6:rawmemchr) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe89be60 (libc.so.6:wmemchr) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe89b9a0 (libc.so.6:wcscmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87f760 (libc.so.6:mempcpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87f590 (libc.so.6:bcmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87e890 (libc.so.6:strncmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87e2d0 (libc.so.6:strcmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87f6c0 (libc.so.6:memset) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe89b960 (libc.so.6:wcschr) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87e7f0 (libc.so.6:strnlen) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87e3b0 (libc.so.6:strcspn) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87f980 (libc.so.6:strncasecmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87e350 (libc.so.6:strcpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87fad0 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe89d0d0 (libc.so.6:wcsnlen) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe89b9e0 (libc.so.6:wcscpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87e9a0 (libc.so.6:strpbrk) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87e280 (libc.so.6:index) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87e7b0 (libc.so.6:strlen) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe887d20 (libc.so.6:memrchr) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87f9d0 (libc.so.6:strcasecmp_l) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87f550 (libc.so.6:memchr) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe89bab0 (libc.so.6:wcslen) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87ec60 (libc.so.6:strspn) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87f8d0 (libc.so.6:stpncpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87f870 (libc.so.6:stpcpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe880e10 (libc.so.6:strchrnul) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe87fa20 (libc.so.6:strncasecmp_l) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--1552028-- REDIR: 0xe967490 (libc.so.6:__strrchr_avx2) redirected to 0x4843dd0 (rindex)
--1552028-- REDIR: 0xe967660 (libc.so.6:__strlen_avx2) redirected to 0x4844270 (strlen)
--1552028-- REDIR: 0xe96a670 (libc.so.6:__memcpy_avx_unaligned_erms) redirected to 0x4847e50 (memmove)
--1552028-- REDIR: 0xe96aaf0 (libc.so.6:__memset_avx2_unaligned_erms) redirected to 0x4847d50 (memset)
--1552028-- REDIR: 0xe968ba0 (libc.so.6:__strcpy_avx2) redirected to 0x48443c0 (strcpy)
--1552028-- REDIR: 0xe962fa0 (libc.so.6:__strncmp_avx2) redirected to 0x4844940 (strncmp)
--1552028-- REDIR: 0xe968f30 (libc.so.6:__strncpy_avx2) redirected to 0x4844540 (strncpy)
--1552028-- REDIR: 0xe9672a0 (libc.so.6:__strchrnul_avx2) redirected to 0x48488e0 (strchrnul)
--1552028-- REDIR: 0xe879260 (libc.so.6:malloc) redirected to 0x483e729 (malloc)
--1552028-- REDIR: 0xe879850 (libc.so.6:free) redirected to 0x4840ede (free)
--1552028-- REDIR: 0xe962b60 (libc.so.6:__strcmp_avx2) redirected to 0x4845160 (strcmp)
--1552028-- REDIR: 0xe87f120 (libc.so.6:__GI_strstr) redirected to 0x4849090 (__strstr_sse2)
--1552028-- REDIR: 0xe963c50 (libc.so.6:__memcmp_avx2_movbe) redirected to 0x48475f0 (bcmp)
--1552028-- REDIR: 0xe87ac90 (libc.so.6:calloc) redirected to 0x4843162 (calloc)
--1552028-- REDIR: 0xe96a650 (libc.so.6:__mempcpy_avx_unaligned_erms) redirected to 0x48489f0 (mempcpy)
--1552028-- REDIR: 0xe87a000 (libc.so.6:realloc) redirected to 0x48433a7 (realloc)
==1552028== 
==1552028== HEAP SUMMARY:
==1552028==     in use at exit: 80,763,016 bytes in 102,066 blocks
==1552028==   total heap usage: 19,094,220 allocs, 18,992,154 frees, 258,981,830,859 bytes allocated
==1552028== 
==1552028== Searching for pointers to 102,066 not-freed blocks
==1552028== Checked 14,468,256 bytes
==1552028== 
==1552028== 464 bytes in 1 blocks are still reachable in loss record 1 of 9
==1552028==    at 0x484342B: realloc (vg_replace_malloc.c:1192)
==1552028==    by 0xCFEB6B2: fw_check_size (in /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvf.so)
==1552028==    by 0x107: ???
==1552028==    by 0x107: ???
==1552028==    by 0xFF: ???
==1552028==    by 0xCFE8749: fw_write (in /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvf.so)
==1552028== 
==1552028== 2,008 bytes in 1 blocks are still reachable in loss record 2 of 9
==1552028==    at 0x483E79B: malloc (vg_replace_malloc.c:380)
==1552028==    by 0xCFE58FE: fr_init (in /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvf.so)
==1552028== 
==1552028== 12,288 bytes in 1 blocks are still reachable in loss record 3 of 9
==1552028==    at 0x483E79B: malloc (vg_replace_malloc.c:380)
==1552028==    by 0xD0CA240: __fort_malloc (in /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvf.so)
==1552028==    by 0x403892: main (in /prj/bin/my_program)
==1552028== 
==1552028== 37,488 bytes in 790 blocks are possibly lost in loss record 4 of 9
==1552028==    at 0x483E79B: malloc (vg_replace_malloc.c:380)
==1552028==    by 0xD0CA3C0: __fort_gmalloc_without_abort (in /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvf.so)
==1552028==    by 0x26: ???
==1552028==    by 0x18: ???
==1552028== 
==1552028== 85,952 bytes in 122 blocks are possibly lost in loss record 5 of 9
==1552028==    at 0x483E79B: malloc (vg_replace_malloc.c:380)
==1552028==    by 0xD0CA3C0: __fort_gmalloc_without_abort (in /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvf.so)
==1552028==    by 0x26: ???
==1552028==    by 0xD: ???
==1552028== 
==1552028== 1,710,576 bytes in 580 blocks are possibly lost in loss record 6 of 9
==1552028==    at 0x483E79B: malloc (vg_replace_malloc.c:380)
==1552028==    by 0xD0CA3C0: __fort_gmalloc_without_abort (in /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvf.so)
==1552028==    by 0x26: ???
==1552028==    by 0x1B: ???
==1552028== 
==1552028== 2,105,456 bytes in 45,305 blocks are definitely lost in loss record 7 of 9
==1552028==    at 0x483E79B: malloc (vg_replace_malloc.c:380)
==1552028==    by 0xD0CA3C0: __fort_gmalloc_without_abort (in /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvf.so)
==1552028==    by 0x26: ???
==1552028==    by 0x18: ???
==1552028== 
==1552028== 4,394,512 bytes in 6,855 blocks are definitely lost in loss record 8 of 9
==1552028==    at 0x483E79B: malloc (vg_replace_malloc.c:380)
==1552028==    by 0xD0CA3C0: __fort_gmalloc_without_abort (in /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvf.so)
==1552028==    by 0x26: ???
==1552028==    by 0xD: ???
==1552028== 
==1552028== 72,414,272 bytes in 48,411 blocks are definitely lost in loss record 9 of 9
==1552028==    at 0x483E79B: malloc (vg_replace_malloc.c:380)
==1552028==    by 0xD0CA3C0: __fort_gmalloc_without_abort (in /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvf.so)
==1552028==    by 0x26: ???
==1552028==    by 0x1B: ???
==1552028== 
==1552028== LEAK SUMMARY:
==1552028==    definitely lost: 78,914,240 bytes in 100,571 blocks
==1552028==    indirectly lost: 0 bytes in 0 blocks
==1552028==      possibly lost: 1,834,016 bytes in 1,492 blocks
==1552028==    still reachable: 14,760 bytes in 3 blocks
==1552028==         suppressed: 0 bytes in 0 blocks
==1552028== 
==1552028== ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 0 from 0)

Hi AliG,

Unforutnately it’s difficult to tell if these are issue with your program, the compiler, or false positives from Valgrind. Do you have a reproducing example?

Note that adding “-g” to you’re compilation may help since Valgrind will then be able to report where in your program they are coming from.

-Mat

Hi Mat

Thanks for your reply.

The Program was compiled with “-g” option.

Here is a simple example, which is actually an empty program.

PROGRAM PRG_TEST_NVFORTRAN

END PROGRAM PRG_TEST_NVFORTRAN

I compiled it using “-g” option again.
nvfortran -g -I ./obj/mod -module ./obj/mod -c -o ./obj/test/prg_test_nvfortran/prg_test_nvfortran.o test/prg_test_nvfortran/prg_test_nvfortran.F90

Valgrind reported memory leak in libnvf.so.

==491664== Memcheck, a memory error detector
==491664== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==491664== Using Valgrind-3.18.0.GIT-4c8c4a9c3a-20210409 and LibVEX; rerun with -h for copyright info
==491664== Command: ././bin/test_nvfortran
==491664== Parent PID: 491661
==491664== 
--491664-- 
--491664-- Valgrind options:
--491664--    --verbose
--491664--    --log-file=./tools/valgrind/test_nvfortran.valgrind
--491664--    --show-leak-kinds=all
--491664--    --leak-check=full
--491664--    --track-origins=yes
--491664-- Contents of /proc/version:
--491664--   Linux version 5.4.0-80-generic (buildd@lcy01-amd64-030) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #90-Ubuntu SMP Fri Jul 9 22:49:44 UTC 2021
--491664-- 
--491664-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand-rdseed
--491664-- Page sizes: currently 4096, max supported 4096
--491664-- Valgrind library directory: /prf/prg/lin/x86-x64/valgrind/3.18.0.GIT/libexec/valgrind
--491664-- Reading syms from /test/bin/test_nvfortran
--491664-- Reading syms from /lib/x86_64-linux-gnu/ld-2.31.so
--491664--   Considering /lib/x86_64-linux-gnu/ld-2.31.so ..
--491664--   .. CRC mismatch (computed b1e31cec wanted 7bd1f8ba)
--491664--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.31.so ..
--491664--   .. CRC is valid
--491664-- Reading syms from /prf/prg/lin/x86-x64/valgrind/3.18.0.GIT/libexec/valgrind/memcheck-amd64-linux
--491664--    object doesn't have a dynamic symbol table
--491664-- Scheduler: using generic scheduler lock implementation.
--491664-- Reading suppressions file: /prf/prg/lin/x86-x64/valgrind/3.18.0.GIT/libexec/valgrind/default.supp
==491664== embedded gdbserver: reading from /prf/prg/lin/x64/VSCode/1.58.2/data/tmp/vgdb-pipe-from-vgdb-to-491664-by-???
==491664== embedded gdbserver: writing to   /prf/prg/lin/x64/VSCode/1.58.2/data/tmp/vgdb-pipe-to-vgdb-from-491664-by-???
==491664== embedded gdbserver: shared mem   /prf/prg/lin/x64/VSCode/1.58.2/data/tmp/vgdb-pipe-shared-mem-vgdb-491664-by-???
==491664== 
==491664== TO CONTROL THIS PROCESS USING vgdb (which you probably
==491664== don't want to do, unless you know exactly what you're doing,
==491664== or are doing some strange experiment):
==491664==   /prf/prg/lin/x86-x64/valgrind/3.18.0.GIT/libexec/valgrind/../../bin/vgdb --pid=491664 ...command...
==491664== 
==491664== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==491664==   /path/to/gdb ././bin/test_nvfortran
==491664== and then give GDB the following command
==491664==   target remote | /prf/prg/lin/x86-x64/valgrind/3.18.0.GIT/libexec/valgrind/../../bin/vgdb --pid=491664
==491664== --pid is optional if only one valgrind process is running
==491664== 
--491664-- REDIR: 0x4022f60 (ld-linux-x86-64.so.2:strlen) redirected to 0x580b2e82 (vgPlain_amd64_linux_REDIR_FOR_strlen)
--491664-- REDIR: 0x4022d30 (ld-linux-x86-64.so.2:index) redirected to 0x580b2e9c (vgPlain_amd64_linux_REDIR_FOR_index)
--491664-- Reading syms from /prf/prg/lin/x86-x64/valgrind/3.18.0.GIT/libexec/valgrind/vgpreload_core-amd64-linux.so
--491664-- Reading syms from /prf/prg/lin/x86-x64/valgrind/3.18.0.GIT/libexec/valgrind/vgpreload_memcheck-amd64-linux.so
==491664== WARNING: new redirection conflicts with existing -- ignoring it
--491664--     old: 0x04022f60 (strlen              ) R-> (0000.0) 0x580b2e82 vgPlain_amd64_linux_REDIR_FOR_strlen
--491664--     new: 0x04022f60 (strlen              ) R-> (2007.0) 0x04844390 strlen
--491664-- REDIR: 0x401f740 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4845260 (strcmp)
--491664-- REDIR: 0x40234c0 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4848df0 (mempcpy)
--491664-- Reading syms from /prf/prg/lin/x86-x64/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvf.so
--491664-- Reading syms from /prf/prg/lin/x86-x64/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvomp.so
--491664-- Reading syms from /lib/x86_64-linux-gnu/libdl-2.31.so
--491664--   Considering /lib/x86_64-linux-gnu/libdl-2.31.so ..
--491664--   .. CRC mismatch (computed 3ec850eb wanted 9bcd6f8f)
--491664--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libdl-2.31.so ..
--491664--   .. CRC is valid
--491664-- Reading syms from /lib/x86_64-linux-gnu/libpthread-2.31.so
--491664--   Considering /usr/lib/debug/.build-id/ee/b5b055a9d738db64e450065f88980bebfc9cc2.debug ..
--491664--   .. build-id is valid
--491664-- Reading syms from /prf/prg/lin/x86-x64/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvcpumath.so
--491664-- Reading syms from /prf/prg/lin/x86-x64/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvc.so
--491664-- Reading syms from /lib/x86_64-linux-gnu/librt-2.31.so
--491664--   Considering /lib/x86_64-linux-gnu/librt-2.31.so ..
--491664--   .. CRC mismatch (computed cbb60aeb wanted a2f7da19)
--491664--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/librt-2.31.so ..
--491664--   .. CRC is valid
--491664-- Reading syms from /lib/x86_64-linux-gnu/libm-2.31.so
--491664--   Considering /lib/x86_64-linux-gnu/libm-2.31.so ..
--491664--   .. CRC mismatch (computed 5f7b2a42 wanted ffb185de)
--491664--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libm-2.31.so ..
--491664--   .. CRC is valid
--491664-- Reading syms from /lib/x86_64-linux-gnu/libc-2.31.so
--491664--   Considering /lib/x86_64-linux-gnu/libc-2.31.so ..
--491664--   .. CRC mismatch (computed 11759501 wanted 88150686)
--491664--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so ..
--491664--   .. CRC is valid
--491664-- Reading syms from /prf/prg/lin/x86-x64/gcc/11.1.0/lib64/libgcc_s.so.1
--491664-- REDIR: 0x630b600 (libc.so.6:memmove) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
==491664== Preferring higher priority redirection:
--491664--     old: 0x063f6670 (__memcpy_avx_unalign) R-> (2018.0) 0x04846530 __memcpy_avx_unaligned_erms
--491664--     new: 0x063f6670 (__memcpy_avx_unalign) R-> (2018.1) 0x04847e50 memmove
--491664-- REDIR: 0x630a900 (libc.so.6:strncpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630b930 (libc.so.6:strcasecmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630a220 (libc.so.6:strcat) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630a960 (libc.so.6:rindex) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630cdd0 (libc.so.6:rawmemchr) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x6327e60 (libc.so.6:wmemchr) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x63279a0 (libc.so.6:wcscmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630b760 (libc.so.6:mempcpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630b590 (libc.so.6:bcmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630a890 (libc.so.6:strncmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630a2d0 (libc.so.6:strcmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630b6c0 (libc.so.6:memset) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x6327960 (libc.so.6:wcschr) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630a7f0 (libc.so.6:strnlen) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630a3b0 (libc.so.6:strcspn) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630b980 (libc.so.6:strncasecmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630a350 (libc.so.6:strcpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630bad0 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x63290d0 (libc.so.6:wcsnlen) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x63279e0 (libc.so.6:wcscpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630a9a0 (libc.so.6:strpbrk) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630a280 (libc.so.6:index) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630a7b0 (libc.so.6:strlen) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x6313d20 (libc.so.6:memrchr) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630b9d0 (libc.so.6:strcasecmp_l) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630b550 (libc.so.6:memchr) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x6327ab0 (libc.so.6:wcslen) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630ac60 (libc.so.6:strspn) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630b8d0 (libc.so.6:stpncpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630b870 (libc.so.6:stpcpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630ce10 (libc.so.6:strchrnul) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x630ba20 (libc.so.6:strncasecmp_l) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--491664-- REDIR: 0x63f3490 (libc.so.6:__strrchr_avx2) redirected to 0x4843dd0 (rindex)
--491664-- REDIR: 0x63f3660 (libc.so.6:__strlen_avx2) redirected to 0x4844270 (strlen)
--491664-- REDIR: 0x63f6670 (libc.so.6:__memcpy_avx_unaligned_erms) redirected to 0x4847e50 (memmove)
--491664-- REDIR: 0x63f4ba0 (libc.so.6:__strcpy_avx2) redirected to 0x48443c0 (strcpy)
--491664-- REDIR: 0x63eefa0 (libc.so.6:__strncmp_avx2) redirected to 0x4844940 (strncmp)
--491664-- REDIR: 0x63eeb60 (libc.so.6:__strcmp_avx2) redirected to 0x4845160 (strcmp)
--491664-- REDIR: 0x6305260 (libc.so.6:malloc) redirected to 0x483e729 (malloc)
--491664-- REDIR: 0x6305850 (libc.so.6:free) redirected to 0x4840ede (free)
==491664== 
==491664== HEAP SUMMARY:
==491664==     in use at exit: 12,288 bytes in 1 blocks
==491664==   total heap usage: 2 allocs, 1 frees, 12,680 bytes allocated
==491664== 
==491664== Searching for pointers to 1 not-freed blocks
==491664== Checked 10,820,000 bytes
==491664== 
==491664== 12,288 bytes in 1 blocks are still reachable in loss record 1 of 1
==491664==    at 0x483E79B: malloc (vg_replace_malloc.c:380)
==491664==    by 0x49A7240: __fort_malloc (in /prf/prg/lin/x86-x64/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/lib/libnvf.so)
==491664==    by 0x4011D2: main (in /test/bin/test_nvfortran)
==491664== 
==491664== LEAK SUMMARY:
==491664==    definitely lost: 0 bytes in 0 blocks
==491664==    indirectly lost: 0 bytes in 0 blocks
==491664==      possibly lost: 0 bytes in 0 blocks
==491664==    still reachable: 12,288 bytes in 1 blocks
==491664==         suppressed: 0 bytes in 0 blocks
==491664== 
==491664== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

and here is the Valgrind output for the same program compiled with nvfortran 21.7.

==770740== Memcheck, a memory error detector
==770740== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==770740== Using Valgrind-3.18.0.GIT-4c8c4a9c3a-20210409 and LibVEX; rerun with -h for copyright info
==770740== Command: ././bin/test_nvfortran
==770740== Parent PID: 770737
==770740== 
--770740-- 
--770740-- Valgrind options:
--770740--    --verbose
--770740--    --log-file=./tools/valgrind/test_nvfortran.valgrind
--770740--    --show-leak-kinds=all
--770740--    --leak-check=full
--770740--    --track-origins=yes
--770740-- Contents of /proc/version:
--770740--   Linux version 5.4.0-80-generic (buildd@lcy01-amd64-030) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #90-Ubuntu SMP Fri Jul 9 22:49:44 UTC 2021
--770740-- 
--770740-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand-rdseed
--770740-- Page sizes: currently 4096, max supported 4096
--770740-- Valgrind library directory: /prf/prg/lin/x86-x64/valgrind/3.18.0.GIT/libexec/valgrind
--770740-- Reading syms from /test/bin/test_nvfortran
--770740-- Reading syms from /lib/x86_64-linux-gnu/ld-2.31.so
--770740--   Considering /lib/x86_64-linux-gnu/ld-2.31.so ..
--770740--   .. CRC mismatch (computed b1e31cec wanted 7bd1f8ba)
--770740--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.31.so ..
--770740--   .. CRC is valid
--770740-- Reading syms from /prf/prg/lin/x86-x64/valgrind/3.18.0.GIT/libexec/valgrind/memcheck-amd64-linux
--770740--    object doesn't have a dynamic symbol table
--770740-- Scheduler: using generic scheduler lock implementation.
--770740-- Reading suppressions file: /prf/prg/lin/x86-x64/valgrind/3.18.0.GIT/libexec/valgrind/default.supp
==770740== embedded gdbserver: reading from /prf/prg/lin/x64/VSCode/1.58.2/data/tmp/vgdb-pipe-from-vgdb-to-770740-by-???
==770740== embedded gdbserver: writing to   /prf/prg/lin/x64/VSCode/1.58.2/data/tmp/vgdb-pipe-to-vgdb-from-770740-by-???
==770740== embedded gdbserver: shared mem   /prf/prg/lin/x64/VSCode/1.58.2/data/tmp/vgdb-pipe-shared-mem-vgdb-770740-by-???
==770740== 
==770740== TO CONTROL THIS PROCESS USING vgdb (which you probably
==770740== don't want to do, unless you know exactly what you're doing,
==770740== or are doing some strange experiment):
==770740==   /prf/prg/lin/x86-x64/valgrind/3.18.0.GIT/libexec/valgrind/../../bin/vgdb --pid=770740 ...command...
==770740== 
==770740== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==770740==   /path/to/gdb ././bin/test_nvfortran
==770740== and then give GDB the following command
==770740==   target remote | /prf/prg/lin/x86-x64/valgrind/3.18.0.GIT/libexec/valgrind/../../bin/vgdb --pid=770740
==770740== --pid is optional if only one valgrind process is running
==770740== 
--770740-- REDIR: 0x4022f60 (ld-linux-x86-64.so.2:strlen) redirected to 0x580b2e82 (vgPlain_amd64_linux_REDIR_FOR_strlen)
--770740-- REDIR: 0x4022d30 (ld-linux-x86-64.so.2:index) redirected to 0x580b2e9c (vgPlain_amd64_linux_REDIR_FOR_index)
--770740-- Reading syms from /prf/prg/lin/x86-x64/valgrind/3.18.0.GIT/libexec/valgrind/vgpreload_core-amd64-linux.so
--770740-- Reading syms from /prf/prg/lin/x86-x64/valgrind/3.18.0.GIT/libexec/valgrind/vgpreload_memcheck-amd64-linux.so
==770740== WARNING: new redirection conflicts with existing -- ignoring it
--770740--     old: 0x04022f60 (strlen              ) R-> (0000.0) 0x580b2e82 vgPlain_amd64_linux_REDIR_FOR_strlen
--770740--     new: 0x04022f60 (strlen              ) R-> (2007.0) 0x04844390 strlen
--770740-- REDIR: 0x401f740 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4845260 (strcmp)
--770740-- REDIR: 0x40234c0 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4848df0 (mempcpy)
--770740-- Reading syms from /prf/prg/lin/x86-x64/nvidia/hpc_sdk/Linux_x86_64/21.7/compilers/lib/libblas_lp64.so.0
--770740-- Reading syms from /prf/prg/lin/x86-x64/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_intel_ilp64.so.1
--770740-- Reading syms from /prf/prg/lin/x86-x64/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_sequential.so.1
--770740-- Reading syms from /prf/prg/lin/x86-x64/intel/oneapi/mkl/2021.3.0/lib/intel64/libmkl_core.so.1
--770740-- Reading syms from /lib/x86_64-linux-gnu/libpthread-2.31.so
--770740--   Considering /usr/lib/debug/.build-id/ee/b5b055a9d738db64e450065f88980bebfc9cc2.debug ..
--770740--   .. build-id is valid
--770740-- Reading syms from /lib/x86_64-linux-gnu/libm-2.31.so
--770740--   Considering /lib/x86_64-linux-gnu/libm-2.31.so ..
--770740--   .. CRC mismatch (computed 5f7b2a42 wanted ffb185de)
--770740--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libm-2.31.so ..
--770740--   .. CRC is valid
--770740-- Reading syms from /lib/x86_64-linux-gnu/libdl-2.31.so
--770740--   Considering /lib/x86_64-linux-gnu/libdl-2.31.so ..
--770740--   .. CRC mismatch (computed 3ec850eb wanted 9bcd6f8f)
--770740--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libdl-2.31.so ..
--770740--   .. CRC is valid
--770740-- Reading syms from /prf/prg/lin/x86-x64/nvidia/hpc_sdk/Linux_x86_64/21.7/compilers/lib/libnvf.so
--770740-- Reading syms from /prf/prg/lin/x86-x64/nvidia/hpc_sdk/Linux_x86_64/21.7/compilers/lib/libnvomp.so
--770740-- Reading syms from /prf/prg/lin/x86-x64/nvidia/hpc_sdk/Linux_x86_64/21.7/compilers/lib/libnvcpumath.so
--770740-- Reading syms from /prf/prg/lin/x86-x64/nvidia/hpc_sdk/Linux_x86_64/21.7/compilers/lib/libnvc.so
--770740-- Reading syms from /lib/x86_64-linux-gnu/librt-2.31.so
--770740--   Considering /lib/x86_64-linux-gnu/librt-2.31.so ..
--770740--   .. CRC mismatch (computed cbb60aeb wanted a2f7da19)
--770740--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/librt-2.31.so ..
--770740--   .. CRC is valid
--770740-- Reading syms from /lib/x86_64-linux-gnu/libc-2.31.so
--770740--   Considering /lib/x86_64-linux-gnu/libc-2.31.so ..
--770740--   .. CRC mismatch (computed 11759501 wanted 88150686)
--770740--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.31.so ..
--770740--   .. CRC is valid
--770740-- Reading syms from /prf/prg/lin/x86-x64/gcc/11.1.0/lib64/libgcc_s.so.1
--770740-- REDIR: 0x4023320 (ld-linux-x86-64.so.2:stpcpy) redirected to 0x4847ad0 (stpcpy)
--770740-- Reading syms from /prf/prg/lin/x86-x64/nvidia/hpc_sdk/Linux_x86_64/21.7/compilers/lib/libacchost.so
--770740-- REDIR: 0xf0fa600 (libc.so.6:memmove) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
==770740== Preferring higher priority redirection:
--770740--     old: 0x0f1e5670 (__memcpy_avx_unalign) R-> (2018.0) 0x04846530 __memcpy_avx_unaligned_erms
--770740--     new: 0x0f1e5670 (__memcpy_avx_unalign) R-> (2018.1) 0x04847e50 memmove
--770740-- REDIR: 0xf0f9900 (libc.so.6:strncpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0fa930 (libc.so.6:strcasecmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0f9220 (libc.so.6:strcat) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0f9960 (libc.so.6:rindex) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0fbdd0 (libc.so.6:rawmemchr) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf116e60 (libc.so.6:wmemchr) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf1169a0 (libc.so.6:wcscmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0fa760 (libc.so.6:mempcpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0fa590 (libc.so.6:bcmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0f9890 (libc.so.6:strncmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0f92d0 (libc.so.6:strcmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0fa6c0 (libc.so.6:memset) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf116960 (libc.so.6:wcschr) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0f97f0 (libc.so.6:strnlen) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0f93b0 (libc.so.6:strcspn) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0fa980 (libc.so.6:strncasecmp) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0f9350 (libc.so.6:strcpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0faad0 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf1180d0 (libc.so.6:wcsnlen) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf1169e0 (libc.so.6:wcscpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0f99a0 (libc.so.6:strpbrk) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0f9280 (libc.so.6:index) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0f97b0 (libc.so.6:strlen) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf102d20 (libc.so.6:memrchr) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0fa9d0 (libc.so.6:strcasecmp_l) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0fa550 (libc.so.6:memchr) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf116ab0 (libc.so.6:wcslen) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0f9c60 (libc.so.6:strspn) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0fa8d0 (libc.so.6:stpncpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0fa870 (libc.so.6:stpcpy) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0fbe10 (libc.so.6:strchrnul) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf0faa20 (libc.so.6:strncasecmp_l) redirected to 0x48331a2 (_vgnU_ifunc_wrapper)
--770740-- REDIR: 0xf1e2490 (libc.so.6:__strrchr_avx2) redirected to 0x4843dd0 (rindex)
--770740-- REDIR: 0xf1e2660 (libc.so.6:__strlen_avx2) redirected to 0x4844270 (strlen)
--770740-- REDIR: 0xf1e5670 (libc.so.6:__memcpy_avx_unaligned_erms) redirected to 0x4847e50 (memmove)
--770740-- REDIR: 0xf1e5af0 (libc.so.6:__memset_avx2_unaligned_erms) redirected to 0x4847d50 (memset)
--770740-- REDIR: 0xf1e3ba0 (libc.so.6:__strcpy_avx2) redirected to 0x48443c0 (strcpy)
--770740-- REDIR: 0xf1ddfa0 (libc.so.6:__strncmp_avx2) redirected to 0x4844940 (strncmp)
--770740-- REDIR: 0xf1e3f30 (libc.so.6:__strncpy_avx2) redirected to 0x4844540 (strncpy)
--770740-- REDIR: 0xf1e22a0 (libc.so.6:__strchrnul_avx2) redirected to 0x48488e0 (strchrnul)
--770740-- REDIR: 0xf0f4260 (libc.so.6:malloc) redirected to 0x483e729 (malloc)
--770740-- REDIR: 0xf0f4850 (libc.so.6:free) redirected to 0x4840ede (free)
--770740-- REDIR: 0xf1ddb60 (libc.so.6:__strcmp_avx2) redirected to 0x4845160 (strcmp)
==770740== 
==770740== HEAP SUMMARY:
==770740==     in use at exit: 12,288 bytes in 1 blocks
==770740==   total heap usage: 3 allocs, 2 frees, 45,496 bytes allocated
==770740== 
==770740== Searching for pointers to 1 not-freed blocks
==770740== Checked 11,912,688 bytes
==770740== 
==770740== 12,288 bytes in 1 blocks are still reachable in loss record 1 of 1
==770740==    at 0x483E79B: malloc (vg_replace_malloc.c:380)
==770740==    by 0xD8D56F0: __fort_malloc (in /prf/prg/lin/x86-x64/nvidia/hpc_sdk/Linux_x86_64/21.7/compilers/lib/libnvf.so)
==770740==    by 0xFFFFFFFE: ???
==770740== 
==770740== LEAK SUMMARY:
==770740==    definitely lost: 0 bytes in 0 blocks
==770740==    indirectly lost: 0 bytes in 0 blocks
==770740==      possibly lost: 0 bytes in 0 blocks
==770740==    still reachable: 12,288 bytes in 1 blocks
==770740==         suppressed: 0 bytes in 0 blocks
==770740== 
==770740== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

AliG

The same test using gfortran 11.1.0, ifort 2021.3.0 20210609 and nagfor are successful.

Here is output of intel inspector:

P1: Error: Memory leak: Not fixed
 P1.3: Error: Memory leak: 12288 Bytes: Not fixed
  test/prg_test_nvfortran/prg_test_nvfortran.F90(1): Error X3: Allocation site: Function prg_test_nvfortran: Module bin/test_nvfortran
  Code snippet:
  >1  PROGRAM PRG_TEST_NVFORTRAN
   2  
   3  END PROGRAM PRG_TEST_NVFORTRAN

  Stack (1 of 1 instance(s))
  >libnvf.so!__fort_malloc - /prf/prg/lin/x86-x64/nvidia/hpc_sdk/Linux_x86_64/21.7/compilers/lib/libnvf.so:0x1bc6ec
   libnvf.so!__fort_entry_init - /prf/prg/lin/x86-x64/nvidia/hpc_sdk/Linux_x86_64/21.7/compilers/lib/libnvf.so:0x1b10b6
   libnvf.so!pghpf_init - /prf/prg/lin/x86-x64/nvidia/hpc_sdk/Linux_x86_64/21.7/compilers/lib/libnvf.so:0x1baf5f
   test_nvfortran!prg_test_nvfortran - test/prg_test_nvfortran/prg_test_nvfortran.F90:1
   test_nvfortran!main - bin/test_nvfortran:0x11ce
   libc.so.6!__libc_start_main - /build/glibc-YbNSs7/glibc-2.31/csu/../csu/libc-start.c:308
   test_nvfortran!_start - bin/test_nvfortran:0x10d8

FYI, I talked with engineering about this and they are aware. Though the missing free in this case is begin and safe to ignore.

1 Like