Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak report by Valgrind #4

Open
araujo88 opened this issue Aug 26, 2022 · 0 comments
Open

Memory leak report by Valgrind #4

araujo88 opened this issue Aug 26, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@araujo88
Copy link
Owner

araujo88 commented Aug 26, 2022

Here is the Valgrind report after running the application locally with the following command:
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt ./server

For testing the functions, the test file test1.py was utilized. Below is the report.

==16465== Memcheck, a memory error detector
==16465== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==16465== Using Valgrind-3.18.1-42b08ed5bd-20211015 and LibVEX; rerun with -h for copyright info
==16465== Command: ./server
==16465== Parent PID: 7432
==16465== 
--16465-- 
--16465-- Valgrind options:
--16465--    --leak-check=full
--16465--    --show-leak-kinds=all
--16465--    --track-origins=yes
--16465--    --verbose
--16465--    --log-file=valgrind-out.txt
--16465-- Contents of /proc/version:
--16465--   Linux version 5.15.0-46-generic (buildd@lcy02-amd64-115) (gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022
--16465-- 
--16465-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-rdtscp-sse3-ssse3-avx-f16c-rdrand
--16465-- Page sizes: currently 4096, max supported 4096
--16465-- Valgrind library directory: /usr/libexec/valgrind
--16465-- Reading syms from /home/leonardo/Github/ultra-minimal-fast-rest-api/server
--16465-- Reading syms from /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
--16465--   Considering /usr/lib/debug/.build-id/61/ef896a699bb1c2e4e231642b2e1688b2f1a61e.debug ..
--16465--   .. build-id is valid
--16465-- Reading syms from /usr/libexec/valgrind/memcheck-amd64-linux
--16465--    object doesn't have a symbol table
--16465--    object doesn't have a dynamic symbol table
--16465-- Scheduler: using generic scheduler lock implementation.
--16465-- Reading suppressions file: /usr/libexec/valgrind/default.supp
==16465== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-16465-by-leonardo-on-???
==16465== embedded gdbserver: writing to   /tmp/vgdb-pipe-to-vgdb-from-16465-by-leonardo-on-???
==16465== embedded gdbserver: shared mem   /tmp/vgdb-pipe-shared-mem-vgdb-16465-by-leonardo-on-???
==16465== 
==16465== TO CONTROL THIS PROCESS USING vgdb (which you probably
==16465== don't want to do, unless you know exactly what you're doing,
==16465== or are doing some strange experiment):
==16465==   /usr/bin/vgdb --pid=16465 ...command...
==16465== 
==16465== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==16465==   /path/to/gdb ./server
==16465== and then give GDB the following command
==16465==   target remote | /usr/bin/vgdb --pid=16465
==16465== --pid is optional if only one valgrind process is running
==16465== 
--16465-- REDIR: 0x402aa60 (ld-linux-x86-64.so.2:strlen) redirected to 0x580bcec2 (???)
--16465-- REDIR: 0x402a830 (ld-linux-x86-64.so.2:index) redirected to 0x580bcedc (???)
--16465-- Reading syms from /usr/libexec/valgrind/vgpreload_core-amd64-linux.so
--16465--    object doesn't have a symbol table
--16465-- Reading syms from /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so
--16465--    object doesn't have a symbol table
==16465== WARNING: new redirection conflicts with existing -- ignoring it
--16465--     old: 0x0402aa60 (strlen              ) R-> (0000.0) 0x580bcec2 ???
--16465--     new: 0x0402aa60 (strlen              ) R-> (2007.0) 0x0484ee30 strlen
--16465-- REDIR: 0x4027240 (ld-linux-x86-64.so.2:strcmp) redirected to 0x484fcd0 (strcmp)
--16465-- REDIR: 0x402afc0 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4853840 (mempcpy)
--16465-- Reading syms from /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
--16465--    object doesn't have a symbol table
--16465-- Reading syms from /usr/lib/x86_64-linux-gnu/libc.so.6
--16465--   Considering /usr/lib/debug/.build-id/69/389d485a9793dbe873f0ea2c93e02efaa9aa3d.debug ..
--16465--   .. build-id is valid
==16465== WARNING: new redirection conflicts with existing -- ignoring it
--16465--     old: 0x04a5dce0 (memalign            ) R-> (1011.0) 0x0484e080 memalign
--16465--     new: 0x04a5dce0 (memalign            ) R-> (1017.0) 0x0484e050 aligned_alloc
==16465== WARNING: new redirection conflicts with existing -- ignoring it
--16465--     old: 0x04a5dce0 (memalign            ) R-> (1011.0) 0x0484e080 memalign
--16465--     new: 0x04a5dce0 (memalign            ) R-> (1017.0) 0x0484e020 aligned_alloc
==16465== WARNING: new redirection conflicts with existing -- ignoring it
--16465--     old: 0x04a5dce0 (memalign            ) R-> (1011.0) 0x0484e080 memalign
--16465--     new: 0x04a5dce0 (memalign            ) R-> (1017.0) 0x0484e050 aligned_alloc
==16465== WARNING: new redirection conflicts with existing -- ignoring it
--16465--     old: 0x04a5dce0 (memalign            ) R-> (1011.0) 0x0484e080 memalign
--16465--     new: 0x04a5dce0 (memalign            ) R-> (1017.0) 0x0484e020 aligned_alloc
--16465-- Reading syms from /usr/lib/x86_64-linux-gnu/libm.so.6
--16465--   Considering /usr/lib/debug/.build-id/27/e82301dba6c3f644404d504e1bb1c97894b433.debug ..
--16465--   .. build-id is valid
--16465-- REDIR: 0x4a607a0 (libc.so.6:strnlen) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a60a60 (libc.so.6:strpbrk) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a60360 (libc.so.6:strcmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a7ed50 (libc.so.6:wcsnlen) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a61750 (libc.so.6:memset) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a7d5c0 (libc.so.6:wcslen) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a61c90 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a7d3f0 (libc.so.6:wcschr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a602e0 (libc.so.6:index) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a609e0 (libc.so.6:rindex) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a61620 (libc.so.6:memmove) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a7d470 (libc.so.6:wcscmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a61a60 (libc.so.6:stpncpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a7da30 (libc.so.6:wmemchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a608b0 (libc.so.6:strncmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a61af0 (libc.so.6:strcasecmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a604a0 (libc.so.6:strcspn) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a7d4f0 (libc.so.6:wcscpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a60250 (libc.so.6:strcat) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a61be0 (libc.so.6:strncasecmp_l) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a61500 (libc.so.6:bcmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a695f0 (libc.so.6:memrchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a63090 (libc.so.6:strchrnul) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a60410 (libc.so.6:strcpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a61b90 (libc.so.6:strcasecmp_l) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a60720 (libc.so.6:strlen) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a60950 (libc.so.6:strncpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a619d0 (libc.so.6:stpcpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a61470 (libc.so.6:memchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a60b80 (libc.so.6:strspn) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a61850 (libc.so.6:mempcpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a61b40 (libc.so.6:strncasecmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a63000 (libc.so.6:rawmemchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4aec430 (libc.so.6:__memcpy_chk) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a60820 (libc.so.6:strncat) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a61390 (libc.so.6:strstr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--16465-- REDIR: 0x4a726d0 (libc.so.6:__strrchr_sse2) redirected to 0x484e870 (__strrchr_sse2)
--16465-- REDIR: 0x4a729d0 (libc.so.6:__strlen_sse2) redirected to 0x484ed70 (__strlen_sse2)
--16465-- REDIR: 0x4a5d120 (libc.so.6:malloc) redirected to 0x4848820 (malloc)
--16465-- REDIR: 0x4a7cfe0 (libc.so.6:__memset_sse2_unaligned) redirected to 0x4852770 (memset)
--16465-- REDIR: 0x4a5d460 (libc.so.6:free) redirected to 0x484b210 (free)
--16465-- REDIR: 0x4a7c8f0 (libc.so.6:memcpy@GLIBC_2.2.5) redirected to 0x484fe00 (memcpy@GLIBC_2.2.5)
--16465-- REDIR: 0x4a6adf0 (libc.so.6:__strcmp_sse2_unaligned) redirected to 0x484fbd0 (strcmp)
--16465-- REDIR: 0x4a724c0 (libc.so.6:__strchrnul_sse2) redirected to 0x4853330 (strchrnul)
--16465-- REDIR: 0x4b4bbd0 (libc.so.6:__strncmp_sse42) redirected to 0x484f500 (__strncmp_sse42)
--16465-- REDIR: 0x4a61040 (libc.so.6:__GI_strstr) redirected to 0x4853ae0 (__strstr_sse2)
--16465-- REDIR: 0x4b5acb0 (libc.so.6:__memcmp_sse4_1) redirected to 0x4851f80 (__memcmp_sse4_1)
--16465-- REDIR: 0x4a72b70 (libc.so.6:__strnlen_sse2) redirected to 0x484ecb0 (strnlen)
--16465-- REDIR: 0x4b50730 (libc.so.6:__strcspn_sse42) redirected to 0x4853c70 (strcspn)
--16465-- REDIR: 0x4a7c8d0 (libc.so.6:__mempcpy_sse2_unaligned) redirected to 0x4853440 (mempcpy)
--16465-- REDIR: 0x4a5d7c0 (libc.so.6:realloc) redirected to 0x484dc50 (realloc)
--16465-- REDIR: 0x4a7c8e0 (libc.so.6:__memcpy_chk_sse2_unaligned) redirected to 0x4853940 (__memcpy_chk)
--16465-- REDIR: 0x4a77910 (libc.so.6:__strcpy_sse2_unaligned) redirected to 0x484ee60 (strcpy)
--16465-- REDIR: 0x4a5e5a0 (libc.so.6:calloc) redirected to 0x484d9d0 (calloc)
--16465-- REDIR: 0x4a7b250 (libc.so.6:__strncat_sse2_unaligned) redirected to 0x484ebc0 (strncat)
==16465== Thread 2:
==16465== Conditional jump or move depends on uninitialised value(s)
==16465==    at 0x484EBD0: strncat (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==16465==    by 0x10C1F7: get_request (server.c:230)
==16465==    by 0x10B950: send_data (server.c:75)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465==  Uninitialised value was created by a stack allocation
==16465==    at 0x10B8FB: send_data (server.c:69)
==16465== 
--16465-- REDIR: 0x4a7c200 (libc.so.6:__strstr_sse2_unaligned) redirected to 0x4853a50 (strstr)
==16465== Source and destination overlap in strcpy(0x58c6e40, 0x58c6e40)
==16465==    at 0x484EF00: strcpy (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==16465==    by 0x10BB7B: send_data (server.c:113)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465== 
--16465-- REDIR: 0x4b50990 (libc.so.6:__strspn_sse42) redirected to 0x4853d50 (strspn)
--16465-- Reading syms from /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
--16465--    object doesn't have a symbol table
==16465== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==16465==    at 0x4ADFAAE: __libc_send (send.c:28)
==16465==    by 0x4ADFAAE: send (send.c:23)
==16465==    by 0x10C866: get_users_view (views.c:36)
==16465==    by 0x10C065: send_data (server.c:197)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465==  Address 0x60c6773 is on thread 2's stack
==16465==  in frame #1, created by get_users_view (views.c:21)
==16465==  Uninitialised value was created by a stack allocation
==16465==    at 0x10C719: get_users_view (views.c:21)
==16465== 
==16465== Source and destination overlap in strcpy(0x68e8e40, 0x68e8e40)
==16465==    at 0x484EF00: strcpy (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==16465==    by 0x10BA4A: send_data (server.c:93)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465== 
==16465== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==16465==    at 0x4ADFAAE: __libc_send (send.c:28)
==16465==    by 0x4ADFAAE: send (send.c:23)
==16465==    by 0x10C9CF: get_user_view (views.c:55)
==16465==    by 0x10BAD8: send_data (server.c:101)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465==  Address 0x68e7770 is on thread 2's stack
==16465==  in frame #1, created by get_user_view (views.c:40)
==16465==  Uninitialised value was created by a stack allocation
==16465==    at 0x10C886: get_user_view (views.c:40)
==16465== 
==16465== Source and destination overlap in strcpy(0x80ebe40, 0x80ebe40)
==16465==    at 0x484EF00: strcpy (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==16465==    by 0x10BD50: send_data (server.c:146)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465== 
==16465== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==16465==    at 0x4ADFAAE: __libc_send (send.c:28)
==16465==    by 0x4ADFAAE: send (send.c:23)
==16465==    by 0x10CCAF: update_user_view (views.c:93)
==16465==    by 0x10BEF4: send_data (server.c:171)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465==  Address 0x80ea735 is on thread 2's stack
==16465==  in frame #1, created by update_user_view (views.c:78)
==16465==  Uninitialised value was created by a stack allocation
==16465==    at 0x10CB58: update_user_view (views.c:78)
==16465== 
==16465== Source and destination overlap in strcpy(0x90ede40, 0x90ede40)
==16465==    at 0x484EF00: strcpy (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==16465==    by 0x10BF7C: send_data (server.c:182)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465== 
==16465== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==16465==    at 0x4ADFAAE: __libc_send (send.c:28)
==16465==    by 0x4ADFAAE: send (send.c:23)
==16465==    by 0x10CB38: delete_user_view (views.c:74)
==16465==    by 0x10C00A: send_data (server.c:190)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465==  Address 0x90ec735 is on thread 2's stack
==16465==  in frame #1, created by delete_user_view (views.c:59)
==16465==  Uninitialised value was created by a stack allocation
==16465==    at 0x10C9EF: delete_user_view (views.c:59)
==16465== 
--16465-- Discarding syms at 0x60ce660-0x60e4be5 in /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 (have_dinfo 1)
==16465== 
==16465== HEAP SUMMARY:
==16465==     in use at exit: 2,452 bytes in 10 blocks
==16465==   total heap usage: 960 allocs, 950 frees, 367,873 bytes allocated
==16465== 
==16465== Searching for pointers to 10 not-freed blocks
==16465== Checked 75,372,512 bytes
==16465== 
==16465== Thread 1:
==16465== 4 bytes in 1 blocks are still reachable in loss record 1 of 2
==16465==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==16465==    by 0x10B88D: create_server (server.c:55)
==16465==    by 0x10B59D: main (main.c:12)
==16465== 
==16465== 2,448 bytes in 9 blocks are possibly lost in loss record 2 of 2
==16465==    at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==16465==    by 0x40147D9: calloc (rtld-malloc.h:44)
==16465==    by 0x40147D9: allocate_dtv (dl-tls.c:375)
==16465==    by 0x40147D9: _dl_allocate_tls (dl-tls.c:634)
==16465==    by 0x4A4D834: allocate_stack (allocatestack.c:430)
==16465==    by 0x4A4D834: pthread_create@@GLIBC_2.34 (pthread_create.c:647)
==16465==    by 0x10B8E4: create_server (server.c:63)
==16465==    by 0x10B59D: main (main.c:12)
==16465== 
==16465== LEAK SUMMARY:
==16465==    definitely lost: 0 bytes in 0 blocks
==16465==    indirectly lost: 0 bytes in 0 blocks
==16465==      possibly lost: 2,448 bytes in 9 blocks
==16465==    still reachable: 4 bytes in 1 blocks
==16465==         suppressed: 0 bytes in 0 blocks
==16465== 
==16465== ERROR SUMMARY: 23 errors from 10 contexts (suppressed: 0 from 0)
==16465== 
==16465== 1 errors in context 1 of 10:
==16465== Thread 2:
==16465== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==16465==    at 0x4ADFAAE: __libc_send (send.c:28)
==16465==    by 0x4ADFAAE: send (send.c:23)
==16465==    by 0x10CB38: delete_user_view (views.c:74)
==16465==    by 0x10C00A: send_data (server.c:190)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465==  Address 0x90ec735 is on thread 2's stack
==16465==  in frame #1, created by delete_user_view (views.c:59)
==16465==  Uninitialised value was created by a stack allocation
==16465==    at 0x10C9EF: delete_user_view (views.c:59)
==16465== 
==16465== 
==16465== 1 errors in context 2 of 10:
==16465== Source and destination overlap in strcpy(0x90ede40, 0x90ede40)
==16465==    at 0x484EF00: strcpy (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==16465==    by 0x10BF7C: send_data (server.c:182)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465== 
==16465== 
==16465== 1 errors in context 3 of 10:
==16465== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==16465==    at 0x4ADFAAE: __libc_send (send.c:28)
==16465==    by 0x4ADFAAE: send (send.c:23)
==16465==    by 0x10CCAF: update_user_view (views.c:93)
==16465==    by 0x10BEF4: send_data (server.c:171)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465==  Address 0x80ea735 is on thread 2's stack
==16465==  in frame #1, created by update_user_view (views.c:78)
==16465==  Uninitialised value was created by a stack allocation
==16465==    at 0x10CB58: update_user_view (views.c:78)
==16465== 
==16465== 
==16465== 1 errors in context 4 of 10:
==16465== Source and destination overlap in strcpy(0x80ebe40, 0x80ebe40)
==16465==    at 0x484EF00: strcpy (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==16465==    by 0x10BD50: send_data (server.c:146)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465== 
==16465== 
==16465== 1 errors in context 5 of 10:
==16465== Source and destination overlap in strcpy(0x58c6e40, 0x58c6e40)
==16465==    at 0x484EF00: strcpy (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==16465==    by 0x10BB7B: send_data (server.c:113)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465== 
==16465== 
==16465== 2 errors in context 6 of 10:
==16465== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==16465==    at 0x4ADFAAE: __libc_send (send.c:28)
==16465==    by 0x4ADFAAE: send (send.c:23)
==16465==    by 0x10C9CF: get_user_view (views.c:55)
==16465==    by 0x10BAD8: send_data (server.c:101)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465==  Address 0x68e7770 is on thread 2's stack
==16465==  in frame #1, created by get_user_view (views.c:40)
==16465==  Uninitialised value was created by a stack allocation
==16465==    at 0x10C886: get_user_view (views.c:40)
==16465== 
==16465== 
==16465== 2 errors in context 7 of 10:
==16465== Source and destination overlap in strcpy(0x68e8e40, 0x68e8e40)
==16465==    at 0x484EF00: strcpy (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==16465==    by 0x10BA4A: send_data (server.c:93)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465== 
==16465== 
==16465== 4 errors in context 8 of 10:
==16465== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==16465==    at 0x4ADFAAE: __libc_send (send.c:28)
==16465==    by 0x4ADFAAE: send (send.c:23)
==16465==    by 0x10C866: get_users_view (views.c:36)
==16465==    by 0x10C065: send_data (server.c:197)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465==  Address 0x60c6773 is on thread 2's stack
==16465==  in frame #1, created by get_users_view (views.c:21)
==16465==  Uninitialised value was created by a stack allocation
==16465==    at 0x10C719: get_users_view (views.c:21)
==16465== 
==16465== 
==16465== 9 errors in context 9 of 10:
==16465== Conditional jump or move depends on uninitialised value(s)
==16465==    at 0x484EBD0: strncat (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==16465==    by 0x10C1F7: get_request (server.c:230)
==16465==    by 0x10B950: send_data (server.c:75)
==16465==    by 0x4A4CB42: start_thread (pthread_create.c:442)
==16465==    by 0x4ADDBB3: clone (clone.S:100)
==16465==  Uninitialised value was created by a stack allocation
==16465==    at 0x10B8FB: send_data (server.c:69)
==16465== 
==16465== ERROR SUMMARY: 23 errors from 10 contexts (suppressed: 0 from 0)
@araujo88 araujo88 added the bug Something isn't working label Aug 26, 2022
@araujo88 araujo88 self-assigned this Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant