Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ==1220== Memcheck, a memory error detector
- ==1220== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
- ==1220== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
- ==1220== Command: ./main server 1926 sharedfile.txt 10
- ==1220== Parent PID: 1161
- ==1220==
- --1220--
- --1220-- Valgrind options:
- --1220-- --leak-check=full
- --1220-- --show-leak-kinds=all
- --1220-- --track-origins=yes
- --1220-- --verbose
- --1220-- --log-file=valgrind-out.txt
- --1220-- Contents of /proc/version:
- --1220-- Linux version 4.10.0-28-generic (buildd@lgw01-12) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48 UTC 2017
- --1220--
- --1220-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-avx-avx2-bmi
- --1220-- Page sizes: currently 4096, max supported 4096
- --1220-- Valgrind library directory: /usr/lib/valgrind
- --1220-- Reading syms from /media/psf/Home/CLionProjects/file_editing/main
- --1220-- Reading syms from /lib/x86_64-linux-gnu/ld-2.23.so
- --1220-- Considering /lib/x86_64-linux-gnu/ld-2.23.so ..
- --1220-- .. CRC mismatch (computed 9bc477cd wanted 3da2f12a)
- --1220-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.23.so ..
- --1220-- .. CRC is valid
- --1220-- Reading syms from /usr/lib/valgrind/memcheck-amd64-linux
- --1220-- Considering /usr/lib/valgrind/memcheck-amd64-linux ..
- --1220-- .. CRC mismatch (computed 2535049d wanted 2b024814)
- --1220-- object doesn't have a symbol table
- --1220-- object doesn't have a dynamic symbol table
- --1220-- Scheduler: using generic scheduler lock implementation.
- --1220-- Reading suppressions file: /usr/lib/valgrind/default.supp
- ==1220== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-1220-by-parallels-on-???
- ==1220== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-1220-by-parallels-on-???
- ==1220== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-1220-by-parallels-on-???
- ==1220==
- ==1220== TO CONTROL THIS PROCESS USING vgdb (which you probably
- ==1220== don't want to do, unless you know exactly what you're doing,
- ==1220== or are doing some strange experiment):
- ==1220== /usr/lib/valgrind/../../bin/vgdb --pid=1220 ...command...
- ==1220==
- ==1220== TO DEBUG THIS PROCESS USING GDB: start GDB like this
- ==1220== /path/to/gdb ./main
- ==1220== and then give GDB the following command
- ==1220== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=1220
- ==1220== --pid is optional if only one valgrind process is running
- ==1220==
- --1220-- REDIR: 0x401cf90 (ld-linux-x86-64.so.2:strlen) redirected to 0x3809e181 (???)
- --1220-- Reading syms from /usr/lib/valgrind/vgpreload_core-amd64-linux.so
- --1220-- Considering /usr/lib/valgrind/vgpreload_core-amd64-linux.so ..
- --1220-- .. CRC mismatch (computed d0558d51 wanted ab599393)
- --1220-- object doesn't have a symbol table
- --1220-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
- --1220-- Considering /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so ..
- --1220-- .. CRC mismatch (computed f5fca1b4 wanted 7dda00ad)
- --1220-- object doesn't have a symbol table
- ==1220== WARNING: new redirection conflicts with existing -- ignoring it
- --1220-- old: 0x0401cf90 (strlen ) R-> (0000.0) 0x3809e181 ???
- --1220-- new: 0x0401cf90 (strlen ) R-> (2007.0) 0x04c31020 strlen
- --1220-- REDIR: 0x401b8e0 (ld-linux-x86-64.so.2:index) redirected to 0x4c30bc0 (index)
- --1220-- REDIR: 0x401bb00 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4c320d0 (strcmp)
- --1220-- REDIR: 0x401dcf0 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4c35270 (mempcpy)
- --1220-- Reading syms from /lib/x86_64-linux-gnu/libpthread-2.23.so
- --1220-- Considering /usr/lib/debug/.build-id/27/f189ef8db8c3734c6a678e6ef3cb0b206d58b2.debug ..
- --1220-- .. build-id is valid
- --1220-- Reading syms from /lib/x86_64-linux-gnu/libc-2.23.so
- --1220-- Considering /lib/x86_64-linux-gnu/libc-2.23.so ..
- --1220-- .. CRC mismatch (computed b2979fac wanted 1affc958)
- --1220-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.23.so ..
- --1220-- .. CRC is valid
- --1220-- REDIR: 0x50e6a00 (libc.so.6:strcasecmp) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
- --1220-- REDIR: 0x50e2280 (libc.so.6:strcspn) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
- --1220-- REDIR: 0x50e8cf0 (libc.so.6:strncasecmp) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
- --1220-- REDIR: 0x50e46f0 (libc.so.6:strpbrk) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
- --1220-- REDIR: 0x50e4a80 (libc.so.6:strspn) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
- --1220-- REDIR: 0x50e614b (libc.so.6:memcpy@GLIBC_2.2.5) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
- --1220-- REDIR: 0x50e4400 (libc.so.6:rindex) redirected to 0x4c308a0 (rindex)
- --1220-- REDIR: 0x50e0cd0 (libc.so.6:strcmp) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
- --1220-- REDIR: 0x50f6570 (libc.so.6:__strcmp_sse2_unaligned) redirected to 0x4c31f90 (strcmp)
- ==1220== Warning: ignored attempt to set SIGKILL handler in sigaction();
- ==1220== the SIGKILL signal is uncatchable
- --1220-- REDIR: 0x50e2720 (libc.so.6:strlen) redirected to 0x4c30f60 (strlen)
- --1220-- REDIR: 0x50db130 (libc.so.6:malloc) redirected to 0x4c2db20 (malloc)
- --1220-- REDIR: 0x50ed760 (libc.so.6:strchrnul) redirected to 0x4c34da0 (strchrnul)
- --1220-- REDIR: 0x50e2160 (libc.so.6:strcpy) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
- --1220-- REDIR: 0x50fc9d0 (libc.so.6:__strcpy_sse2_unaligned) redirected to 0x4c31040 (strcpy)
- ==1220== Invalid write of size 8
- ==1220== at 0x40283E: addClient (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x401695: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== Address 0x5421338 is 0 bytes after a block of size 8 alloc'd
- ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==1220== by 0x402831: addClient (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x401695: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220==
- --1220-- REDIR: 0x50dbd10 (libc.so.6:calloc) redirected to 0x4c2faa0 (calloc)
- ==1220== Thread 2:
- ==1220== Invalid read of size 8
- ==1220== at 0x40180B: threadSingleClient (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4E416B9: start_thread (pthread_create.c:333)
- ==1220== Address 0x5421338 is 0 bytes after a block of size 8 alloc'd
- ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==1220== by 0x402831: addClient (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x401695: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220==
- --1220-- REDIR: 0x50db4f0 (libc.so.6:free) redirected to 0x4c2ed80 (free)
- ==1220==
- ==1220== HEAP SUMMARY:
- ==1220== in use at exit: 1,228 bytes in 14 blocks
- ==1220== total heap usage: 15 allocs, 1 frees, 1,500 bytes allocated
- ==1220==
- ==1220== Searching for pointers to 14 not-freed blocks
- ==1220== Checked 91,928 bytes
- ==1220==
- ==1220== Thread 1:
- ==1220== 4 bytes in 1 blocks are definitely lost in loss record 1 of 10
- ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==1220== by 0x4016C4: manageHandshake (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4016A8: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220==
- ==1220== 8 bytes in 1 blocks are definitely lost in loss record 2 of 10
- ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==1220== by 0x402831: addClient (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x401695: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220==
- ==1220== 15 bytes in 1 blocks are still reachable in loss record 3 of 10
- ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==1220== by 0x402BED: initializeServerArguments (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4013A4: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220==
- ==1220== 17 bytes in 1 blocks are definitely lost in loss record 4 of 10
- ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==1220== by 0x401450: fromIntToString (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4029E1: serverLogInt (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x40132D: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220==
- ==1220== 17 bytes in 1 blocks are definitely lost in loss record 5 of 10
- ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==1220== by 0x401450: fromIntToString (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4029E1: serverLogInt (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4016DC: manageHandshake (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4016A8: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220==
- ==1220== 17 bytes in 1 blocks are definitely lost in loss record 6 of 10
- ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==1220== by 0x401450: fromIntToString (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4029E1: serverLogInt (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x402965: removeClient (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x40193B: onDisconnectedThread (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x401894: threadSingleClient (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4E416B9: start_thread (pthread_create.c:333)
- ==1220==
- ==1220== 17 bytes in 1 blocks are definitely lost in loss record 7 of 10
- ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==1220== by 0x401450: fromIntToString (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4029E1: serverLogInt (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x40194F: onDisconnectedThread (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x401894: threadSingleClient (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4E416B9: start_thread (pthread_create.c:333)
- ==1220==
- ==1220== 24 bytes in 1 blocks are still reachable in loss record 8 of 10
- ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==1220== by 0x402BAF: initializeServerArguments (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4013A4: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220==
- ==1220== 85 bytes in 5 blocks are definitely lost in loss record 9 of 10
- ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==1220== by 0x401450: fromIntToString (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4029E1: serverLogInt (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x401354: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220==
- ==1220== 1,024 bytes in 1 blocks are definitely lost in loss record 10 of 10
- ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==1220== by 0x40181C: threadSingleClient (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4E416B9: start_thread (pthread_create.c:333)
- ==1220==
- ==1220== LEAK SUMMARY:
- ==1220== definitely lost: 1,189 bytes in 12 blocks
- ==1220== indirectly lost: 0 bytes in 0 blocks
- ==1220== possibly lost: 0 bytes in 0 blocks
- ==1220== still reachable: 39 bytes in 2 blocks
- ==1220== suppressed: 0 bytes in 0 blocks
- ==1220==
- ==1220== ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 0 from 0)
- ==1220==
- ==1220== 1 errors in context 1 of 10:
- ==1220== Thread 2:
- ==1220== Invalid read of size 8
- ==1220== at 0x40180B: threadSingleClient (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4E416B9: start_thread (pthread_create.c:333)
- ==1220== Address 0x5421338 is 0 bytes after a block of size 8 alloc'd
- ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==1220== by 0x402831: addClient (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x401695: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220==
- ==1220==
- ==1220== 1 errors in context 2 of 10:
- ==1220== Thread 1:
- ==1220== Invalid write of size 8
- ==1220== at 0x40283E: addClient (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x401695: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== Address 0x5421338 is 0 bytes after a block of size 8 alloc'd
- ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==1220== by 0x402831: addClient (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x401695: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
- ==1220==
- ==1220== ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 0 from 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement