[go: up one dir, main page]

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

Getting ??? for every source leak #108

Open
Gillian-Delvigne opened this issue May 21, 2024 · 4 comments
Open

Getting ??? for every source leak #108

Gillian-Delvigne opened this issue May 21, 2024 · 4 comments

Comments

@Gillian-Delvigne
Copy link

Context

I'm running macOS Catalina (Version 10.15.7). I recently downloaded the latest version of Valgrind, and now I see "???" for every source of leak. The previous version worked perfectly yesterday. Here are some logs:

==81957== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==81957== Using Valgrind-3.23.0.GIT-lbmacos-93191c15fd-20240210 and LibVEX; rerun with -h for copyright info
==81957== Command: ./minishell
==81957== Parent PID: 80698
==81957== 
--81957-- 
--81957-- Valgrind options:
--81957--    --leak-check=full
--81957--    --show-leak-kinds=all
--81957--    --track-origins=yes
--81957--    --track-fds=yes
--81957--    --verbose
--81957--    --keep-debuginfo=yes
--81957--    --suppressions=readline.supp
--81957--    --log-file=valgrind-out.txt
--81957-- Output from sysctl({CTL_KERN,KERN_VERSION}):
--81957--   Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64
--81957-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand-rdseed
--81957-- Page sizes: currently 4096, max supported 4096
--81957-- Valgrind library directory: /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind
--81957-- /usr/lib/dyld (rx at 0x100020000, rw at 0x1000b2000)
--81957--    reading syms   from primary file (5 2729)
--81957-- Scheduler: using generic scheduler lock implementation.
--81957-- Reading suppressions file: readline.supp
--81957-- Reading suppressions file: /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/default.supp
==81957== embedded gdbserver: reading from /var/folders/zz/zyxvpxvq6csfxvn_n000jrr4004f61/T//vgdb-pipe-from-vgdb-to-81957-by-gdelvign-on-???
==81957== embedded gdbserver: writing to   /var/folders/zz/zyxvpxvq6csfxvn_n000jrr4004f61/T//vgdb-pipe-to-vgdb-from-81957-by-gdelvign-on-???
==81957== embedded gdbserver: shared mem   /var/folders/zz/zyxvpxvq6csfxvn_n000jrr4004f61/T//vgdb-pipe-shared-mem-vgdb-81957-by-gdelvign-on-???
==81957== 
==81957== TO CONTROL THIS PROCESS USING vgdb (which you probably
==81957== don't want to do, unless you know exactly what you're doing,
==81957== or are doing some strange experiment):
==81957==   /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/../../bin/vgdb --pid=81957 ...command...
==81957== 
==81957== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==81957==   /path/to/gdb ./minishell
==81957== and then give GDB the following command
==81957==   target remote | /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/../../bin/vgdb --pid=81957
==81957== --pid is optional if only one valgrind process is running
==81957== 
--81957-- REDIR: 0x1000721c0 (dyld:strcmp) redirected to 0x2580598a7 (???)
--81957-- REDIR: 0x10006c494 (dyld:arc4random) redirected to 0x258059945 (???)
--81957-- REDIR: 0x1000715a0 (dyld:strlen) redirected to 0x258059876 (???)
--81957-- REDIR: 0x1000724c0 (dyld:strcpy) redirected to 0x2580598c3 (???)
--81957-- REDIR: 0x10006f63a (dyld:strcat) redirected to 0x258059887 (???)
--81957-- REDIR: 0x10007139a (dyld:strlcat) redirected to 0x2580598e0 (???)
--81957-- /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/vgpreload_core-amd64-darwin.so (rx at 0x100125000, rw at 0x100129000)
--81957--    reading syms   from primary file (3 53)
--81957--    dSYM= /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/vgpreload_core-amd64-darwin.so.dSYM/Contents/Resources/DWARF/vgpreload_core-amd64-darwin.so
--81957-- /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/vgpreload_memcheck-amd64-darwin.so (rx at 0x100131000, rw at 0x10013d000)
--81957--    reading syms   from primary file (138 63)
--81957--    dSYM= /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/vgpreload_memcheck-amd64-darwin.so.dSYM/Contents/Resources/DWARF/vgpreload_memcheck-amd64-darwin.so
--81957-- /Users/gdelvign/.brew/Cellar/readline/8.2.10/lib/libreadline.8.2.dylib (rx at 0x100149000, rw at 0x100171000)
--81957--    reading syms   from primary file (735 345)
--81957--    dSYM= /Users/gdelvign/.brew/Cellar/readline/8.2.10/lib/libreadline.8.2.dylib.dSYM/Contents/Resources/DWARF/libreadline.8.2.dylib
--81957-- /usr/lib/libSystem.B.dylib (rx at 0x10018d000, rw at 0x10018f000)
--81957--    reading syms   from primary file (29 8)
--81957-- /usr/lib/libncurses.5.4.dylib (rx at 0x100197000, rw at 0x1001c7000)
--81957--    reading syms   from primary file (613 1)
--81957-- /usr/lib/system/libcache.dylib (rx at 0x1001db000, rw at 0x1001e1000)
--81957--    reading syms   from primary file (32 29)
--81957-- /usr/lib/system/libcommonCrypto.dylib (rx at 0x1001e8000, rw at 0x1001f4000)
--81957--    reading syms   from primary file (241 173)
--81957-- /usr/lib/system/libcompiler_rt.dylib (rx at 0x100204000, rw at 0x10020c000)
--81957--    reading syms   from primary file (505 8)
--81957-- /usr/lib/system/libcopyfile.dylib (rx at 0x10021c000, rw at 0x100226000)
--81957--    reading syms   from primary file (11 38)
--81957-- /usr/lib/system/libcorecrypto.dylib (rx at 0x10022e000, rw at 0x1002c1000)
--81957--    reading syms   from primary file (586 846)
--81957-- /usr/lib/system/libdispatch.dylib (rx at 0x1002e1000, rw at 0x100322000)
--81957--    reading syms   from primary file (328 1607)
--81957-- /usr/lib/system/libdyld.dylib (rx at 0x10035f000, rw at 0x100396000)
--81957--    reading syms   from primary file (119 1467)
--81957-- /usr/lib/system/libkeymgr.dylib (rx at 0x1003bf000, rw at 0x1003c0000)
--81957--    reading syms   from primary file (11 2)
--81957-- /usr/lib/system/libmacho.dylib (rx at 0x1003cf000, rw at 0x1003d5000)
--81957--    reading syms   from primary file (105 2)
--81957-- /usr/lib/system/libquarantine.dylib (rx at 0x1003dd000, rw at 0x1003e0000)
--81957--    reading syms   from primary file (88 12)
--81957-- /usr/lib/system/libremovefile.dylib (rx at 0x1003e8000, rw at 0x1003ea000)
--81957--    reading syms   from primary file (12 8)
--81957-- /usr/lib/system/libsystem_asl.dylib (rx at 0x1003f1000, rw at 0x100409000)
--81957--    reading syms   from primary file (219 234)
--81957-- /usr/lib/system/libsystem_blocks.dylib (rx at 0x100419000, rw at 0x10041a000)
--81957--    reading syms   from primary file (21 8)
--81957-- /usr/lib/system/libsystem_c.dylib (rx at 0x100421000, rw at 0x1004a9000)
--81957--    reading syms   from primary file (1346 892)
--81957-- /usr/lib/system/libsystem_configuration.dylib (rx at 0x1004d9000, rw at 0x1004dd000)
--81957--    reading syms   from primary file (36 68)
--81957-- /usr/lib/system/libsystem_coreservices.dylib (rx at 0x1004e6000, rw at 0x1004ea000)
--81957--    reading syms   from primary file (14 47)
--81957-- /usr/lib/system/libsystem_darwin.dylib (rx at 0x1004f2000, rw at 0x1004fb000)
--81957--    reading syms   from primary file (63 562)
--81957-- /usr/lib/system/libsystem_dnssd.dylib (rx at 0x10050a000, rw at 0x100512000)
--81957--    reading syms   from primary file (40 26)
--81957-- /usr/lib/system/libsystem_featureflags.dylib (rx at 0x10051a000, rw at 0x10051c000)
--81957--    reading syms   from primary file (1 12)
--81957-- /usr/lib/system/libsystem_info.dylib (rx at 0x100523000, rw at 0x100571000)
--81957--    reading syms   from primary file (427 714)
--81957-- /usr/lib/system/libsystem_m.dylib (rx at 0x100589000, rw at 0x1005d1000)
--81957--    reading syms   from primary file (811 1)
--81957-- /usr/lib/system/libsystem_malloc.dylib (rx at 0x1005e2000, rw at 0x10060a000)
--81957--    reading syms   from primary file (98 470)
--81957-- /usr/lib/system/libsystem_networkextension.dylib (rx at 0x10061a000, rw at 0x100628000)
--81957--    reading syms   from primary file (118 242)
--81957-- /usr/lib/system/libsystem_notify.dylib (rx at 0x100638000, rw at 0x100642000)
--81957--    reading syms   from primary file (23 1)
--81957-- /usr/lib/system/libsystem_sandbox.dylib (rx at 0x10064a000, rw at 0x10064f000)
--81957--    reading syms   from primary file (112 23)
--81957-- /usr/lib/system/libsystem_secinit.dylib (rx at 0x100658000, rw at 0x10065b000)
--81957--    reading syms   from primary file (5 20)
--81957-- /usr/lib/system/libsystem_kernel.dylib (rx at 0x100662000, rw at 0x10068f000)
--81957--    reading syms   from primary file (1361 230)
--81957-- /usr/lib/system/libsystem_platform.dylib (rx at 0x1006ae000, rw at 0x1006b7000)
--81957--    reading syms   from primary file (168 103)
--81957-- /usr/lib/system/libsystem_pthread.dylib (rx at 0x1006c1000, rw at 0x1006cc000)
--81957--    reading syms   from primary file (189 143)
--81957-- /usr/lib/system/libsystem_symptoms.dylib (rx at 0x1006d9000, rw at 0x1006e1000)
--81957--    reading syms   from primary file (10 86)
--81957-- /usr/lib/system/libsystem_trace.dylib (rx at 0x1006e9000, rw at 0x100700000)
--81957--    reading syms   from primary file (131 274)
--81957-- /usr/lib/system/libunwind.dylib (rx at 0x100711000, rw at 0x100717000)
--81957--    reading syms   from primary file (102 52)
--81957-- /usr/lib/system/libxpc.dylib (rx at 0x100720000, rw at 0x100756000)
--81957--    reading syms   from primary file (627 1467)
--81957-- /usr/lib/libobjc.A.dylib (rx at 0x100784000, rw at 0x1007b8000)
--81957--    reading syms   from primary file (382 771)
--81957-- /usr/lib/libc++abi.dylib (rx at 0x1007dc000, rw at 0x1007f2000)
--81957--    reading syms   from primary file (366 704)
--81957-- /usr/lib/libc++.1.dylib (rx at 0x100810000, rw at 0x100863000)
--81957--    reading syms   from primary file (2088 1160)
--81957-- REDIR: 0x1006af3a0 (libsystem_platform.dylib:_platform_memcmp) redirected to 0x10013944e (_platform_memcmp)
--81957-- REDIR: 0x1006aec00 (libsystem_platform.dylib:_platform_strncmp) redirected to 0x100138dc5 (_platform_strncmp)
--81957-- REDIR: 0x1006ae800 (libsystem_platform.dylib:_platform_strcmp) redirected to 0x100138e3f (_platform_strcmp)
--81957-- REDIR: 0x1005e2ce0 (libsystem_malloc.dylib:malloc) redirected to 0x1001331a0 (malloc)
--81957-- REDIR: 0x1005e4ec1 (libsystem_malloc.dylib:calloc) redirected to 0x1001373ce (calloc)
--81957-- REDIR: 0x1005e4d67 (libsystem_malloc.dylib:realloc) redirected to 0x100137780 (realloc)
--81957-- REDIR: 0x1005e5087 (libsystem_malloc.dylib:malloc_default_zone) redirected to 0x100138442 (malloc_default_zone)
--81957-- REDIR: 0x1005e2d12 (libsystem_malloc.dylib:malloc_zone_malloc) redirected to 0x10013343c (malloc_zone_malloc)
--81957-- REDIR: 0x1005e4ef6 (libsystem_malloc.dylib:malloc_zone_calloc) redirected to 0x1001375ee (malloc_zone_calloc)
--81957-- REDIR: 0x1005e508f (libsystem_malloc.dylib:malloc_zone_from_ptr) redirected to 0x100138483 (malloc_zone_from_ptr)
--81957-- REDIR: 0x1005e39b1 (libsystem_malloc.dylib:free) redirected to 0x100135004 (free)
--81957-- REDIR: 0x1006af300 (libsystem_platform.dylib:_platform_strchr$VARIANT$Haswell) redirected to 0x10013862a (_platform_strchr$VARIANT$Haswell)
--81957-- REDIR: 0x1004780bc (libsystem_c.dylib:strrchr) redirected to 0x1001385c8 (strrchr)
--81957-- REDIR: 0x1006af1a0 (libsystem_platform.dylib:_platform_memchr$VARIANT$Haswell) redirected to 0x100138eb0 (_platform_memchr$VARIANT$Haswell)
==81957== 
==81957== FILE DESCRIPTORS: 7 open (3 std) at exit.
==81957== Open file descriptor 27: /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar
==81957==    <inherited from parent>
==81957== 
==81957== Open file descriptor 25: /Users/gdelvign/Library/Application Support/Code/logs/20240521T093923/ptyhost.log
==81957==    <inherited from parent>
==81957== 
==81957== Open file descriptor 12: /Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/v8_context_snapshot.x86_64.bin
==81957==    <inherited from parent>
==81957== 
==81957== Open file descriptor 3: /Users/gdelvign/Documents/42cursus/minishell/valgrind-out.txt
==81957==    <inherited from parent>
==81957== 
==81957== 
==81957== HEAP SUMMARY:
==81957==     in use at exit: 346,766 bytes in 1,210 blocks
==81957==   total heap usage: 2,488 allocs, 1,278 frees, 400,065 bytes allocated
==81957== 
==81957== Searching for pointers to 1,210 not-freed blocks
==81957== Checked 9,481,824 bytes
==81957== 
==81957== 29 bytes in 1 blocks are definitely lost in loss record 21 of 117
==81957==    at 0x100133215: malloc (in /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/vgpreload_memcheck-amd64-darwin.so)
==81957==    by 0x100009CEA: ??? (in ./minishell)
==81957==    by 0x100009C90: ??? (in ./minishell)
==81957==    by 0x10000964C: ??? (in ./minishell)
==81957==    by 0x10000377D: ??? (in ./minishell)
==81957==    by 0x100002CB2: ??? (in ./minishell)
==81957==    by 0x100005DAA: ??? (in ./minishell)
==81957==    by 0x100005C0A: ??? (in ./minishell)
==81957==    by 0x100002A86: ??? (in ./minishell)
==81957==    by 0x1000028BB: ??? (in ./minishell)
==81957==    by 0x100379CC8: start (in /usr/lib/system/libdyld.dylib)
==81957== 
==81957== 52 bytes in 13 blocks are definitely lost in loss record 33 of 117
==81957==    at 0x100133215: malloc (in /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/vgpreload_memcheck-amd64-darwin.so)
==81957==    by 0x100008288: ??? (in ./minishell)
==81957==    by 0x100005C84: ??? (in ./minishell)
==81957==    by 0x100005BDB: ??? (in ./minishell)
==81957==    by 0x100002A86: ??? (in ./minishell)
==81957==    by 0x1000028BB: ??? (in ./minishell)
==81957==    by 0x100379CC8: start (in /usr/lib/system/libdyld.dylib)
==81957== 
==81957== 55 bytes in 1 blocks are indirectly lost in loss record 34 of 117
==81957==    at 0x100133215: malloc (in /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/vgpreload_memcheck-amd64-darwin.so)
==81957==    by 0x10000AE33: ??? (in ./minishell)
==81957==    by 0x1000096D1: ??? (in ./minishell)
==81957==    by 0x10000377D: ??? (in ./minishell)
==81957==    by 0x100002CB2: ??? (in ./minishell)
==81957==    by 0x100005DAA: ??? (in ./minishell)
==81957==    by 0x100005C0A: ??? (in ./minishell)
==81957==    by 0x100002A86: ??? (in ./minishell)
==81957==    by 0x1000028BB: ??? (in ./minishell)
==81957==    by 0x100379CC8: start (in /usr/lib/system/libdyld.dylib)
==81957== 
==81957== 55 bytes in 1 blocks are definitely lost in loss record 35 of 117
==81957==    at 0x100133215: malloc (in /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/vgpreload_memcheck-amd64-darwin.so)
==81957==    by 0x10000AE33: ??? (in ./minishell)
==81957==    by 0x100009D97: ??? (in ./minishell)
==81957==    by 0x100009659: ??? (in ./minishell)
==81957==    by 0x10000377D: ??? (in ./minishell)
==81957==    by 0x100002CB2: ??? (in ./minishell)
==81957==    by 0x100005DAA: ??? (in ./minishell)
==81957==    by 0x100005C0A: ??? (in ./minishell)
==81957==    by 0x100002A86: ??? (in ./minishell)
==81957==    by 0x1000028BB: ??? (in ./minishell)
==81957==    by 0x100379CC8: start (in /usr/lib/system/libdyld.dylib)
==81957== 
==81957== 96 bytes in 4 blocks are indirectly lost in loss record 45 of 117
==81957==    at 0x100133215: malloc (in /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/vgpreload_memcheck-amd64-darwin.so)
==81957==    by 0x10000974D: ??? (in ./minishell)
==81957==    by 0x100009705: ??? (in ./minishell)
==81957==    by 0x10000377D: ??? (in ./minishell)
==81957==    by 0x100002CB2: ??? (in ./minishell)
==81957==    by 0x100005DAA: ??? (in ./minishell)
==81957==    by 0x100005C0A: ??? (in ./minishell)
==81957==    by 0x100002A86: ??? (in ./minishell)
==81957==    by 0x1000028BB: ??? (in ./minishell)
==81957==    by 0x100379CC8: start (in /usr/lib/system/libdyld.dylib)
==81957== 
==81957== 128 bytes in 2 blocks are indirectly lost in loss record 50 of 117
==81957==    at 0x100133215: malloc (in /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/vgpreload_memcheck-amd64-darwin.so)
==81957==    by 0x10000AE33: ??? (in ./minishell)
==81957==    by 0x100009D97: ??? (in ./minishell)
==81957==    by 0x100009659: ??? (in ./minishell)
==81957==    by 0x10000377D: ??? (in ./minishell)
==81957==    by 0x100002CB2: ??? (in ./minishell)
==81957==    by 0x100005DAA: ??? (in ./minishell)
==81957==    by 0x100005C0A: ??? (in ./minishell)
==81957==    by 0x100002A86: ??? (in ./minishell)
==81957==    by 0x1000028BB: ??? (in ./minishell)
==81957==    by 0x100379CC8: start (in /usr/lib/system/libdyld.dylib)
==81957== 
==81957== 163 bytes in 2 blocks are definitely lost in loss record 52 of 117
==81957==    at 0x100133215: malloc (in /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/vgpreload_memcheck-amd64-darwin.so)
==81957==    by 0x100005AF7: ??? (in ./minishell)
==81957==    by 0x100007DCB: ??? (in ./minishell)
==81957==    by 0x100005B74: ??? (in ./minishell)
==81957==    by 0x100002A60: ??? (in ./minishell)
==81957==    by 0x1000028BB: ??? (in ./minishell)
==81957==    by 0x100379CC8: start (in /usr/lib/system/libdyld.dylib)
==81957== 
==81957== 9,096 bytes in 379 blocks are indirectly lost in loss record 111 of 117
==81957==    at 0x100133215: malloc (in /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/vgpreload_memcheck-amd64-darwin.so)
==81957==    by 0x1000095C5: ??? (in ./minishell)
==81957==    by 0x10000950E: ??? (in ./minishell)
==81957==    by 0x1000036AC: ??? (in ./minishell)
==81957==    by 0x100002CB2: ??? (in ./minishell)
==81957==    by 0x100005DAA: ??? (in ./minishell)
==81957==    by 0x100005C0A: ??? (in ./minishell)
==81957==    by 0x100002A86: ??? (in ./minishell)
==81957==    by 0x1000028BB: ??? (in ./minishell)
==81957==    by 0x100379CC8: start (in /usr/lib/system/libdyld.dylib)
==81957== 
==81957== 12,148 bytes in 376 blocks are indirectly lost in loss record 112 of 117
==81957==    at 0x100133215: malloc (in /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/vgpreload_memcheck-amd64-darwin.so)
==81957==    by 0x10000AE33: ??? (in ./minishell)
==81957==    by 0x100009D97: ??? (in ./minishell)
==81957==    by 0x100009605: ??? (in ./minishell)
==81957==    by 0x10000950E: ??? (in ./minishell)
==81957==    by 0x1000036AC: ??? (in ./minishell)
==81957==    by 0x100002CB2: ??? (in ./minishell)
==81957==    by 0x100005DAA: ??? (in ./minishell)
==81957==    by 0x100005C0A: ??? (in ./minishell)
==81957==    by 0x100002A86: ??? (in ./minishell)
==81957==    by 0x1000028BB: ??? (in ./minishell)
==81957==    by 0x100379CC8: start (in /usr/lib/system/libdyld.dylib)
==81957== 
==81957== 21,739 (216 direct, 21,523 indirect) bytes in 9 blocks are definitely lost in loss record 116 of 117
==81957==    at 0x100133215: malloc (in /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/vgpreload_memcheck-amd64-darwin.so)
==81957==    by 0x1000095C5: ??? (in ./minishell)
==81957==    by 0x10000950E: ??? (in ./minishell)
==81957==    by 0x1000036AC: ??? (in ./minishell)
==81957==    by 0x100002CB2: ??? (in ./minishell)
==81957==    by 0x100005DAA: ??? (in ./minishell)
==81957==    by 0x100005C0A: ??? (in ./minishell)
==81957==    by 0x100002A86: ??? (in ./minishell)
==81957==    by 0x1000028BB: ??? (in ./minishell)
==81957==    by 0x100379CC8: start (in /usr/lib/system/libdyld.dylib)
==81957== 
==81957== LEAK SUMMARY:
==81957==    definitely lost: 515 bytes in 26 blocks
==81957==    indirectly lost: 21,523 bytes in 762 blocks
==81957==      possibly lost: 0 bytes in 0 blocks
==81957==    still reachable: 0 bytes in 0 blocks
==81957==         suppressed: 324,728 bytes in 422 blocks
==81957== 
==81957== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 5 from 5)
--81957-- 
--81957-- used_suppression:     66 ignore_readline_leaks readline.supp:2 suppressed: 306,043 bytes in 223 blocks
--81957-- used_suppression:      4 ignore_rl_history_leaks readline.supp:8 suppressed: 4,695 bytes in 37 blocks
--81957-- used_suppression:      3 OSX1015:dyld-4 /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/default.supp:764 suppressed: 4,152 bytes in 3 blocks
--81957-- used_suppression:      1 OSX1015:Leak02-objc /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/default.supp:825 suppressed: 2,048 bytes in 1 blocks
--81957-- used_suppression:     17 OSX1015:dyld-7 /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/default.supp:794 suppressed: 2,560 bytes in 74 blocks
--81957-- used_suppression:     15 OSX1015:dyld-8 /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/default.supp:804 suppressed: 4,966 bytes in 81 blocks
--81957-- used_suppression:      1 OSX1015:dyld-5 /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/default.supp:774 suppressed: 264 bytes in 3 blocks
--81957-- used_suppression:      1 OSX1015:dyld-2 /Users/gdelvign/.brew/Cellar/valgrind/HEAD-93191c1/libexec/valgrind/default.supp:746
==81957== 
==81957== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 5 from 5)

What went wrong?

I ran Valgrind with the following flags on my program:

valgrind --leak-check=full \
	 --show-leak-kinds=all \
	 --track-origins=yes \
	 --track-fds=yes \
         --verbose \
         --keep-debuginfo=yes \
         --suppressions=readline.supp \
         --log-file=valgrind-out.txt \
	 ./exec

What did you expect to happen?

I expected Valgrind to show the source of each memory leak instead of displaying "???".

Information

  • macOS architecture (uname -m): x86_64
  • macOS version (sw_vers): 10.15.7
  • Xcode version (xcrun --sdk macosx --show-sdk-version): 11.1

Thank you for your help.

@LouisBrunner
Copy link
Owner

Hi @Gillian-Delvigne,

Did you build your binary using -g?

@Gillian-Delvigne
Copy link
Author
Gillian-Delvigne commented May 21, 2024

Sure !
cc -g -O0

I have found a little workaround. I changed your formula to get a previous (functional) version of your valgrind. I added system "git", "checkout", "d14be1d" if build.head? in the valgrind.rb file and now it is working again. So the d14be1d commit is working.
I'm part of the 42 network and the last version isn't working on any computer. I think this is about our macOS version.

@paulfloyd
Copy link
Contributor
paulfloyd commented May 21, 2024

Do you also get this problem with a trivial example (like Hello World)?

Quite likely an issue with ML_(check_macho_and_get_rw_loads). Linkers like mold have been giving us a hard time on ELF-based systems and the Valgrind code that assumed that ELF means one text segment and one data segment keeps breaking. Now the code is supposed to peek to see how many data segments there are and then trigger debuginfo reading when the text and required number of data segments have been loaded. The macho code is supposed to do the same thing.

I don't know if there is the MACH_HEADER and load_commands with DSC. Also it's quite possible that the fixed-size 4k buffer isn't big enough.

@LouisBrunner
Copy link
Owner

Quite likely an issue with ML_(check_macho_and_get_rw_loads). Linkers like mold have been giving us a hard time on ELF-based systems and the Valgrind code that assumed that ELF means one text segment and one data segment keeps breaking. Now the code is supposed to peek to see how many data segments there are and then trigger debuginfo reading when the text and required number of data segments have been loaded. The macho code is supposed to do the same thing.

Good point @paulfloyd, I had such an issue on arm64 with some read-only segments having the wrong protection (no idea how that's possible) which was messing this up. Hopefully that will be fixed after the merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants