Advertisement
Guest User

Untitled

a guest
Jan 25th, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.03 KB | None | 0 0
  1. ==1220== Memcheck, a memory error detector
  2. ==1220== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
  3. ==1220== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
  4. ==1220== Command: ./main server 1926 sharedfile.txt 10
  5. ==1220== Parent PID: 1161
  6. ==1220==
  7. --1220--
  8. --1220-- Valgrind options:
  9. --1220-- --leak-check=full
  10. --1220-- --show-leak-kinds=all
  11. --1220-- --track-origins=yes
  12. --1220-- --verbose
  13. --1220-- --log-file=valgrind-out.txt
  14. --1220-- Contents of /proc/version:
  15. --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
  16. --1220--
  17. --1220-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-avx-avx2-bmi
  18. --1220-- Page sizes: currently 4096, max supported 4096
  19. --1220-- Valgrind library directory: /usr/lib/valgrind
  20. --1220-- Reading syms from /media/psf/Home/CLionProjects/file_editing/main
  21. --1220-- Reading syms from /lib/x86_64-linux-gnu/ld-2.23.so
  22. --1220-- Considering /lib/x86_64-linux-gnu/ld-2.23.so ..
  23. --1220-- .. CRC mismatch (computed 9bc477cd wanted 3da2f12a)
  24. --1220-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.23.so ..
  25. --1220-- .. CRC is valid
  26. --1220-- Reading syms from /usr/lib/valgrind/memcheck-amd64-linux
  27. --1220-- Considering /usr/lib/valgrind/memcheck-amd64-linux ..
  28. --1220-- .. CRC mismatch (computed 2535049d wanted 2b024814)
  29. --1220-- object doesn't have a symbol table
  30. --1220-- object doesn't have a dynamic symbol table
  31. --1220-- Scheduler: using generic scheduler lock implementation.
  32. --1220-- Reading suppressions file: /usr/lib/valgrind/default.supp
  33. ==1220== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-1220-by-parallels-on-???
  34. ==1220== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-1220-by-parallels-on-???
  35. ==1220== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-1220-by-parallels-on-???
  36. ==1220==
  37. ==1220== TO CONTROL THIS PROCESS USING vgdb (which you probably
  38. ==1220== don't want to do, unless you know exactly what you're doing,
  39. ==1220== or are doing some strange experiment):
  40. ==1220== /usr/lib/valgrind/../../bin/vgdb --pid=1220 ...command...
  41. ==1220==
  42. ==1220== TO DEBUG THIS PROCESS USING GDB: start GDB like this
  43. ==1220== /path/to/gdb ./main
  44. ==1220== and then give GDB the following command
  45. ==1220== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=1220
  46. ==1220== --pid is optional if only one valgrind process is running
  47. ==1220==
  48. --1220-- REDIR: 0x401cf90 (ld-linux-x86-64.so.2:strlen) redirected to 0x3809e181 (???)
  49. --1220-- Reading syms from /usr/lib/valgrind/vgpreload_core-amd64-linux.so
  50. --1220-- Considering /usr/lib/valgrind/vgpreload_core-amd64-linux.so ..
  51. --1220-- .. CRC mismatch (computed d0558d51 wanted ab599393)
  52. --1220-- object doesn't have a symbol table
  53. --1220-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
  54. --1220-- Considering /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so ..
  55. --1220-- .. CRC mismatch (computed f5fca1b4 wanted 7dda00ad)
  56. --1220-- object doesn't have a symbol table
  57. ==1220== WARNING: new redirection conflicts with existing -- ignoring it
  58. --1220-- old: 0x0401cf90 (strlen ) R-> (0000.0) 0x3809e181 ???
  59. --1220-- new: 0x0401cf90 (strlen ) R-> (2007.0) 0x04c31020 strlen
  60. --1220-- REDIR: 0x401b8e0 (ld-linux-x86-64.so.2:index) redirected to 0x4c30bc0 (index)
  61. --1220-- REDIR: 0x401bb00 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4c320d0 (strcmp)
  62. --1220-- REDIR: 0x401dcf0 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4c35270 (mempcpy)
  63. --1220-- Reading syms from /lib/x86_64-linux-gnu/libpthread-2.23.so
  64. --1220-- Considering /usr/lib/debug/.build-id/27/f189ef8db8c3734c6a678e6ef3cb0b206d58b2.debug ..
  65. --1220-- .. build-id is valid
  66. --1220-- Reading syms from /lib/x86_64-linux-gnu/libc-2.23.so
  67. --1220-- Considering /lib/x86_64-linux-gnu/libc-2.23.so ..
  68. --1220-- .. CRC mismatch (computed b2979fac wanted 1affc958)
  69. --1220-- Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.23.so ..
  70. --1220-- .. CRC is valid
  71. --1220-- REDIR: 0x50e6a00 (libc.so.6:strcasecmp) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
  72. --1220-- REDIR: 0x50e2280 (libc.so.6:strcspn) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
  73. --1220-- REDIR: 0x50e8cf0 (libc.so.6:strncasecmp) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
  74. --1220-- REDIR: 0x50e46f0 (libc.so.6:strpbrk) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
  75. --1220-- REDIR: 0x50e4a80 (libc.so.6:strspn) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
  76. --1220-- REDIR: 0x50e614b (libc.so.6:memcpy@GLIBC_2.2.5) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
  77. --1220-- REDIR: 0x50e4400 (libc.so.6:rindex) redirected to 0x4c308a0 (rindex)
  78. --1220-- REDIR: 0x50e0cd0 (libc.so.6:strcmp) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
  79. --1220-- REDIR: 0x50f6570 (libc.so.6:__strcmp_sse2_unaligned) redirected to 0x4c31f90 (strcmp)
  80. ==1220== Warning: ignored attempt to set SIGKILL handler in sigaction();
  81. ==1220== the SIGKILL signal is uncatchable
  82. --1220-- REDIR: 0x50e2720 (libc.so.6:strlen) redirected to 0x4c30f60 (strlen)
  83. --1220-- REDIR: 0x50db130 (libc.so.6:malloc) redirected to 0x4c2db20 (malloc)
  84. --1220-- REDIR: 0x50ed760 (libc.so.6:strchrnul) redirected to 0x4c34da0 (strchrnul)
  85. --1220-- REDIR: 0x50e2160 (libc.so.6:strcpy) redirected to 0x4a286f0 (_vgnU_ifunc_wrapper)
  86. --1220-- REDIR: 0x50fc9d0 (libc.so.6:__strcpy_sse2_unaligned) redirected to 0x4c31040 (strcpy)
  87. ==1220== Invalid write of size 8
  88. ==1220== at 0x40283E: addClient (in /media/psf/Home/CLionProjects/file_editing/main)
  89. ==1220== by 0x401695: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
  90. ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
  91. ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
  92. ==1220== Address 0x5421338 is 0 bytes after a block of size 8 alloc'd
  93. ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  94. ==1220== by 0x402831: addClient (in /media/psf/Home/CLionProjects/file_editing/main)
  95. ==1220== by 0x401695: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
  96. ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
  97. ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
  98. ==1220==
  99. --1220-- REDIR: 0x50dbd10 (libc.so.6:calloc) redirected to 0x4c2faa0 (calloc)
  100. ==1220== Thread 2:
  101. ==1220== Invalid read of size 8
  102. ==1220== at 0x40180B: threadSingleClient (in /media/psf/Home/CLionProjects/file_editing/main)
  103. ==1220== by 0x4E416B9: start_thread (pthread_create.c:333)
  104. ==1220== Address 0x5421338 is 0 bytes after a block of size 8 alloc'd
  105. ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  106. ==1220== by 0x402831: addClient (in /media/psf/Home/CLionProjects/file_editing/main)
  107. ==1220== by 0x401695: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
  108. ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
  109. ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
  110. ==1220==
  111. --1220-- REDIR: 0x50db4f0 (libc.so.6:free) redirected to 0x4c2ed80 (free)
  112. ==1220==
  113. ==1220== HEAP SUMMARY:
  114. ==1220== in use at exit: 1,228 bytes in 14 blocks
  115. ==1220== total heap usage: 15 allocs, 1 frees, 1,500 bytes allocated
  116. ==1220==
  117. ==1220== Searching for pointers to 14 not-freed blocks
  118. ==1220== Checked 91,928 bytes
  119. ==1220==
  120. ==1220== Thread 1:
  121. ==1220== 4 bytes in 1 blocks are definitely lost in loss record 1 of 10
  122. ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  123. ==1220== by 0x4016C4: manageHandshake (in /media/psf/Home/CLionProjects/file_editing/main)
  124. ==1220== by 0x4016A8: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
  125. ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
  126. ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
  127. ==1220==
  128. ==1220== 8 bytes in 1 blocks are definitely lost in loss record 2 of 10
  129. ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  130. ==1220== by 0x402831: addClient (in /media/psf/Home/CLionProjects/file_editing/main)
  131. ==1220== by 0x401695: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
  132. ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
  133. ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
  134. ==1220==
  135. ==1220== 15 bytes in 1 blocks are still reachable in loss record 3 of 10
  136. ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  137. ==1220== by 0x402BED: initializeServerArguments (in /media/psf/Home/CLionProjects/file_editing/main)
  138. ==1220== by 0x4013A4: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
  139. ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
  140. ==1220==
  141. ==1220== 17 bytes in 1 blocks are definitely lost in loss record 4 of 10
  142. ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  143. ==1220== by 0x401450: fromIntToString (in /media/psf/Home/CLionProjects/file_editing/main)
  144. ==1220== by 0x4029E1: serverLogInt (in /media/psf/Home/CLionProjects/file_editing/main)
  145. ==1220== by 0x40132D: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
  146. ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
  147. ==1220==
  148. ==1220== 17 bytes in 1 blocks are definitely lost in loss record 5 of 10
  149. ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  150. ==1220== by 0x401450: fromIntToString (in /media/psf/Home/CLionProjects/file_editing/main)
  151. ==1220== by 0x4029E1: serverLogInt (in /media/psf/Home/CLionProjects/file_editing/main)
  152. ==1220== by 0x4016DC: manageHandshake (in /media/psf/Home/CLionProjects/file_editing/main)
  153. ==1220== by 0x4016A8: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
  154. ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
  155. ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
  156. ==1220==
  157. ==1220== 17 bytes in 1 blocks are definitely lost in loss record 6 of 10
  158. ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  159. ==1220== by 0x401450: fromIntToString (in /media/psf/Home/CLionProjects/file_editing/main)
  160. ==1220== by 0x4029E1: serverLogInt (in /media/psf/Home/CLionProjects/file_editing/main)
  161. ==1220== by 0x402965: removeClient (in /media/psf/Home/CLionProjects/file_editing/main)
  162. ==1220== by 0x40193B: onDisconnectedThread (in /media/psf/Home/CLionProjects/file_editing/main)
  163. ==1220== by 0x401894: threadSingleClient (in /media/psf/Home/CLionProjects/file_editing/main)
  164. ==1220== by 0x4E416B9: start_thread (pthread_create.c:333)
  165. ==1220==
  166. ==1220== 17 bytes in 1 blocks are definitely lost in loss record 7 of 10
  167. ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  168. ==1220== by 0x401450: fromIntToString (in /media/psf/Home/CLionProjects/file_editing/main)
  169. ==1220== by 0x4029E1: serverLogInt (in /media/psf/Home/CLionProjects/file_editing/main)
  170. ==1220== by 0x40194F: onDisconnectedThread (in /media/psf/Home/CLionProjects/file_editing/main)
  171. ==1220== by 0x401894: threadSingleClient (in /media/psf/Home/CLionProjects/file_editing/main)
  172. ==1220== by 0x4E416B9: start_thread (pthread_create.c:333)
  173. ==1220==
  174. ==1220== 24 bytes in 1 blocks are still reachable in loss record 8 of 10
  175. ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  176. ==1220== by 0x402BAF: initializeServerArguments (in /media/psf/Home/CLionProjects/file_editing/main)
  177. ==1220== by 0x4013A4: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
  178. ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
  179. ==1220==
  180. ==1220== 85 bytes in 5 blocks are definitely lost in loss record 9 of 10
  181. ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  182. ==1220== by 0x401450: fromIntToString (in /media/psf/Home/CLionProjects/file_editing/main)
  183. ==1220== by 0x4029E1: serverLogInt (in /media/psf/Home/CLionProjects/file_editing/main)
  184. ==1220== by 0x401354: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
  185. ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
  186. ==1220==
  187. ==1220== 1,024 bytes in 1 blocks are definitely lost in loss record 10 of 10
  188. ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  189. ==1220== by 0x40181C: threadSingleClient (in /media/psf/Home/CLionProjects/file_editing/main)
  190. ==1220== by 0x4E416B9: start_thread (pthread_create.c:333)
  191. ==1220==
  192. ==1220== LEAK SUMMARY:
  193. ==1220== definitely lost: 1,189 bytes in 12 blocks
  194. ==1220== indirectly lost: 0 bytes in 0 blocks
  195. ==1220== possibly lost: 0 bytes in 0 blocks
  196. ==1220== still reachable: 39 bytes in 2 blocks
  197. ==1220== suppressed: 0 bytes in 0 blocks
  198. ==1220==
  199. ==1220== ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 0 from 0)
  200. ==1220==
  201. ==1220== 1 errors in context 1 of 10:
  202. ==1220== Thread 2:
  203. ==1220== Invalid read of size 8
  204. ==1220== at 0x40180B: threadSingleClient (in /media/psf/Home/CLionProjects/file_editing/main)
  205. ==1220== by 0x4E416B9: start_thread (pthread_create.c:333)
  206. ==1220== Address 0x5421338 is 0 bytes after a block of size 8 alloc'd
  207. ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  208. ==1220== by 0x402831: addClient (in /media/psf/Home/CLionProjects/file_editing/main)
  209. ==1220== by 0x401695: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
  210. ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
  211. ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
  212. ==1220==
  213. ==1220==
  214. ==1220== 1 errors in context 2 of 10:
  215. ==1220== Thread 1:
  216. ==1220== Invalid write of size 8
  217. ==1220== at 0x40283E: addClient (in /media/psf/Home/CLionProjects/file_editing/main)
  218. ==1220== by 0x401695: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
  219. ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
  220. ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
  221. ==1220== Address 0x5421338 is 0 bytes after a block of size 8 alloc'd
  222. ==1220== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  223. ==1220== by 0x402831: addClient (in /media/psf/Home/CLionProjects/file_editing/main)
  224. ==1220== by 0x401695: setupServer (in /media/psf/Home/CLionProjects/file_editing/main)
  225. ==1220== by 0x4013C6: main_server (in /media/psf/Home/CLionProjects/file_editing/main)
  226. ==1220== by 0x403157: main (in /media/psf/Home/CLionProjects/file_editing/main)
  227. ==1220==
  228. ==1220== ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 0 from 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement