Skip to content

Instantly share code, notes, and snippets.

@bagder
Created April 16, 2025 08:57
Show Gist options
  • Save bagder/2dad9b6c0b4f2ed30ed44c8303f9e42e to your computer and use it in GitHub Desktop.
Save bagder/2dad9b6c0b4f2ed30ed44c8303f9e42e to your computer and use it in GitHub Desktop.
valgrind --leak-check=full ./src/curl cloudflare.com
==450632==
==450632== HEAP SUMMARY:
==450632== in use at exit: 13,496 bytes in 331 blocks
==450632== total heap usage: 5,306 allocs, 4,975 frees, 581,992 bytes allocated
==450632==
==450632== 24 bytes in 1 blocks are definitely lost in loss record 12 of 81
==450632== at 0x4844818: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==450632== by 0x153E93: curl_dbg_malloc (memdebug.c:145)
==450632== by 0x174753: Curl_memdup (strdup.c:93)
==450632== by 0x1E7CD9: Curl_httpsrr_set (httpsrr.c:103)
==450632== by 0x1E81AE: httpsrr_opt (httpsrr.c:170)
==450632== by 0x1E837F: Curl_httpsrr_from_ares (httpsrr.c:202)
==450632== by 0x198CF3: async_ares_rr_done (asyn-ares.c:666)
==450632== by 0x488E7E7: ??? (in /usr/lib/x86_64-linux-gnu/libcares.so.2.19.4)
==450632== by 0x488D80B: ??? (in /usr/lib/x86_64-linux-gnu/libcares.so.2.19.4)
==450632== by 0x488DF40: ares_process_fds (in /usr/lib/x86_64-linux-gnu/libcares.so.2.19.4)
==450632== by 0x488DFD0: ares_process_fd (in /usr/lib/x86_64-linux-gnu/libcares.so.2.19.4)
==450632== by 0x199715: Curl_ares_perform (asyn-base.c:160)
==450632==
==450632== 48 bytes in 1 blocks are definitely lost in loss record 26 of 81
==450632== at 0x4844818: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==450632== by 0x153E93: curl_dbg_malloc (memdebug.c:145)
==450632== by 0x174753: Curl_memdup (strdup.c:93)
==450632== by 0x1E7E75: Curl_httpsrr_set (httpsrr.c:121)
==450632== by 0x1E81AE: httpsrr_opt (httpsrr.c:170)
==450632== by 0x1E837F: Curl_httpsrr_from_ares (httpsrr.c:202)
==450632== by 0x198CF3: async_ares_rr_done (asyn-ares.c:666)
==450632== by 0x488E7E7: ??? (in /usr/lib/x86_64-linux-gnu/libcares.so.2.19.4)
==450632== by 0x488D80B: ??? (in /usr/lib/x86_64-linux-gnu/libcares.so.2.19.4)
==450632== by 0x488DF40: ares_process_fds (in /usr/lib/x86_64-linux-gnu/libcares.so.2.19.4)
==450632== by 0x488DFD0: ares_process_fd (in /usr/lib/x86_64-linux-gnu/libcares.so.2.19.4)
==450632== by 0x199715: Curl_ares_perform (asyn-base.c:160)
==450632==
==450632== 13,424 (512 direct, 12,912 indirect) bytes in 1 blocks are definitely lost in loss record 81 of 81
==450632== at 0x4844818: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==450632== by 0x488B13C: ares_malloc_zero (in /usr/lib/x86_64-linux-gnu/libcares.so.2.19.4)
==450632== by 0x488A7D6: ares_init_options (in /usr/lib/x86_64-linux-gnu/libcares.so.2.19.4)
==450632== by 0x198151: async_ares_init (asyn-ares.c:174)
==450632== by 0x1981B2: async_ares_init_lazy (asyn-ares.c:191)
==450632== by 0x198D3D: Curl_async_getaddrinfo (asyn-ares.c:687)
==450632== by 0x1CB5C1: Curl_resolv (hostip.c:891)
==450632== by 0x1CB862: Curl_resolv_timeout (hostip.c:1099)
==450632== by 0x17F29A: resolve_server (url.c:3208)
==450632== by 0x1804A7: create_conn (url.c:3697)
==450632== by 0x180651: Curl_connect (url.c:3765)
==450632== by 0x15F3C4: state_connect (multi.c:2107)
==450632==
==450632== LEAK SUMMARY:
==450632== definitely lost: 584 bytes in 3 blocks
==450632== indirectly lost: 12,912 bytes in 328 blocks
==450632== possibly lost: 0 bytes in 0 blocks
==450632== still reachable: 0 bytes in 0 blocks
==450632== suppressed: 0 bytes in 0 blocks
==450632==
==450632== For lists of detected and suppressed errors, rerun with: -s
==450632== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment