Memory leak? valgrind is not happy.
sijanec opened this issue · 1 comments
sijanec commented
I directly cloned the repository, ran make and ran the test binary on Linux kondenzator 5.3.0-53-generic #47~18.04.1-Ubuntu SMP Thu May 7 13:10:50 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
.
a@kondenzator:/tmp/sha-2$ valgrind -v ./test > valgrind-output.txt 2>&1
Killed
a@kondenzator:/tmp/sha-2$ cat valgrind-output.txt
==10564== Memcheck, a memory error detector
==10564== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==10564== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==10564== Command: ./test
==10564==
--10564-- Valgrind options:
--10564-- -v
--10564-- Contents of /proc/version:
--10564-- Linux version 5.3.0-53-generic (buildd@lgw01-amd64-016) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #47~18.04.1-Ubuntu SMP Thu May 7 13:10:50 UTC 2020
--10564--
--10564-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-sse3
--10564-- Page sizes: currently 4096, max supported 4096
--10564-- Valgrind library directory: /usr/lib/valgrind
--10564-- Reading syms from /tmp/sha-2/test
--10564-- Reading syms from /lib/x86_64-linux-gnu/ld-2.27.so
--10564-- Considering /lib/x86_64-linux-gnu/ld-2.27.so ..
--10564-- .. CRC mismatch (computed 1b7c895e wanted 2943108a)
--10564-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.27.so ..
--10564-- .. CRC is valid
--10564-- Reading syms from /usr/lib/valgrind/memcheck-amd64-linux
--10564-- Considering /usr/lib/valgrind/memcheck-amd64-linux ..
--10564-- .. CRC mismatch (computed 41ddb025 wanted 9972f546)
--10564-- object doesn't have a symbol table
--10564-- object doesn't have a dynamic symbol table
--10564-- Scheduler: using generic scheduler lock implementation.
--10564-- Reading suppressions file: /usr/lib/valgrind/default.supp
==10564== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-10564-by-a-on-???
==10564== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-10564-by-a-on-???
==10564== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-10564-by-a-on-???
==10564==
==10564== TO CONTROL THIS PROCESS USING vgdb (which you probably
==10564== don't want to do, unless you know exactly what you're doing,
==10564== or are doing some strange experiment):
==10564== /usr/lib/valgrind/../../bin/vgdb --pid=10564 ...command...
==10564==
==10564== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==10564== /path/to/gdb ./test
==10564== and then give GDB the following command
==10564== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=10564
==10564== --pid is optional if only one valgrind process is running
==10564==
--10564-- REDIR: 0x401f2f0 (ld-linux-x86-64.so.2:strlen) redirected to 0x580608c1 (???)
--10564-- REDIR: 0x401f0d0 (ld-linux-x86-64.so.2:index) redirected to 0x580608db (???)
--10564-- Reading syms from /usr/lib/valgrind/vgpreload_core-amd64-linux.so
--10564-- Considering /usr/lib/valgrind/vgpreload_core-amd64-linux.so ..
--10564-- .. CRC mismatch (computed 50df1b30 wanted 4800a4cf)
--10564-- object doesn't have a symbol table
--10564-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
--10564-- Considering /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so ..
--10564-- .. CRC mismatch (computed f893b962 wanted 95ee359e)
--10564-- object doesn't have a symbol table
==10564== WARNING: new redirection conflicts with existing -- ignoring it
--10564-- old: 0x0401f2f0 (strlen ) R-> (0000.0) 0x580608c1 ???
--10564-- new: 0x0401f2f0 (strlen ) R-> (2007.0) 0x04c32db0 strlen
--10564-- REDIR: 0x401d360 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4c33ee0 (strcmp)
--10564-- REDIR: 0x401f830 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4c374f0 (mempcpy)
--10564-- Reading syms from /lib/x86_64-linux-gnu/libc-2.27.so
--10564-- Considering /lib/x86_64-linux-gnu/libc-2.27.so ..
--10564-- .. CRC mismatch (computed b1c74187 wanted 042cc048)
--10564-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.27.so ..
--10564-- .. CRC is valid
--10564-- REDIR: 0x4edac70 (libc.so.6:memmove) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4ed9d40 (libc.so.6:strncpy) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4edaf50 (libc.so.6:strcasecmp) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4ed9790 (libc.so.6:strcat) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4ed9d70 (libc.so.6:rindex) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4edc7c0 (libc.so.6:rawmemchr) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4edade0 (libc.so.6:mempcpy) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4edac10 (libc.so.6:bcmp) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4ed9d00 (libc.so.6:strncmp) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4ed9800 (libc.so.6:strcmp) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4edad40 (libc.so.6:memset) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4ef80f0 (libc.so.6:wcschr) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4ed9ca0 (libc.so.6:strnlen) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4ed9870 (libc.so.6:strcspn) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4edafa0 (libc.so.6:strncasecmp) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4ed9840 (libc.so.6:strcpy) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4edb0e0 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4ed9da0 (libc.so.6:strpbrk) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4ed97c0 (libc.so.6:index) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4ed9c70 (libc.so.6:strlen) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4ee46c0 (libc.so.6:memrchr) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4edaff0 (libc.so.6:strcasecmp_l) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4edabe0 (libc.so.6:memchr) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4ef8eb0 (libc.so.6:wcslen) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4eda050 (libc.so.6:strspn) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4edaf20 (libc.so.6:stpncpy) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4edaef0 (libc.so.6:stpcpy) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4edc7f0 (libc.so.6:strchrnul) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4edb040 (libc.so.6:strncasecmp_l) redirected to 0x4a2a6e0 (_vgnU_ifunc_wrapper)
--10564-- REDIR: 0x4eed330 (libc.so.6:__strrchr_sse2) redirected to 0x4c32790 (__strrchr_sse2)
--10564-- REDIR: 0x4eed620 (libc.so.6:__strlen_sse2) redirected to 0x4c32d30 (__strlen_sse2)
--10564-- REDIR: 0x4ef7460 (libc.so.6:memcpy@GLIBC_2.2.5) redirected to 0x4c34060 (memcpy@GLIBC_2.2.5)
--10564-- REDIR: 0x4ef7870 (libc.so.6:__memset_sse2_unaligned) redirected to 0x4c365d0 (memset)
--10564-- REDIR: 0x4eed120 (libc.so.6:__strchrnul_sse2) redirected to 0x4c37020 (strchrnul)
--10564-- REDIR: 0x4ed3070 (libc.so.6:malloc) redirected to 0x4c2faa0 (malloc)
--10564-- REDIR: 0x4ef7440 (libc.so.6:__mempcpy_sse2_unaligned) redirected to 0x4c37130 (mempcpy)
--10564-- REDIR: 0x4ee5e70 (libc.so.6:__strcmp_sse2_unaligned) redirected to 0x4c33da0 (strcmp)
==10564== Warning: set address range perms: large range [0x562d040, 0x2562d040) (undefined)
==10564== Warning: set address range perms: large range [0x59e43040, 0x9ae43040) (undefined)
==10564== Warning: set address range perms: large range [0x9ae44040, 0xfae4407e) (undefined)