42-Lyon-Projects / minishell-revamp

0 stars 1 forks source link

[BUG] Leak #47

Closed LuyNagda closed 9 months ago

LuyNagda commented 9 months ago
image

root@6691fa2149fc:/project# valgrind --leak-check=full --suppressions=supp.supp --show-leak-kinds=all ./minishell ==2256== Memcheck, a memory error detector ==2256== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==2256== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info ==2256== Command: ./minishell ==2256== ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ^C ➜ minishell : ls Makefile build dependencies includes minishell sources supp.supp ==2256== Invalid free() / delete / delete[] / realloc() ==2256== at 0x4867AD0: free (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==2256== by 0x10B42F: env_map_replace (env_setter.c:75) ==2256== by 0x10C193: exec_cmd (exec_pipex.c:118) ==2256== by 0x10BAC7: ft_dispatch_command (exec_dispatcher.c:77) ==2256== by 0x109317: tokenize_and_run (main.c:57) ==2256== by 0x1093F3: ft_shell_loop (main.c:85) ==2256== by 0x1094B7: main (main.c:105) ==2256== Address 0x1128e0 is in a r-x mapped file /project/minishell segment ==2256== ➜ minishell : ^C

LuyNagda commented 9 months ago
image

I dont know if this is because of the docker env or this really happens, can you please check and let me know

vSKAH commented 9 months ago

Invalid free is fixed in commit c5569afc4be02d3a75f1b06921a6a3a1b92d733d