Closed carlosrocha-dev closed 1 year ago
Log do valgrind: coder (bug/204-bug-white-space-quotes) ~/42_minishell$ make v make -C libft make[1]: Entering directory '/home/coder/42_minishell/libft' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/home/coder/42_minishell/libft' valgrind --trace-children=yes --track-fds=yes --track-origins=yes --suppressions=readline.supp --leak-check=full --show-leak-kinds=all --quiet ./minishell minishell: > echo "teste . . . afsdfasdf " ==2285== Invalid write of size 1 ==2285== at 0x406E13: token_analysis (token_analysis.c:142) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b37571 is 0 bytes after a block of size 1 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x407F75: ft_calloc (in /home/coder/42_minishell/minishell) ==2285== by 0x406CE0: token_analysis (token_analysis.c:109) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid write of size 1 ==2285== at 0x406DA1: token_analysis (token_analysis.c:123) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b37574 is 3 bytes after a block of size 1 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x407F75: ft_calloc (in /home/coder/42_minishell/minishell) ==2285== by 0x406CE0: token_analysis (token_analysis.c:109) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid read of size 1 ==2285== at 0x408457: ft_strlen (in /home/coder/42_minishell/minishell) ==2285== by 0x406DAD: token_analysis (token_analysis.c:124) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b37571 is 0 bytes after a block of size 1 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x407F75: ft_calloc (in /home/coder/42_minishell/minishell) ==2285== by 0x406CE0: token_analysis (token_analysis.c:109) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid read of size 1 ==2285== at 0x408457: ft_strlen (in /home/coder/42_minishell/minishell) ==2285== by 0x4082CC: ft_strdup (in /home/coder/42_minishell/minishell) ==2285== by 0x406DC0: token_analysis (token_analysis.c:127) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b37571 is 0 bytes after a block of size 1 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x407F75: ft_calloc (in /home/coder/42_minishell/minishell) ==2285== by 0x406CE0: token_analysis (token_analysis.c:109) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid read of size 1 ==2285== at 0x408306: ft_strdup (in /home/coder/42_minishell/minishell) ==2285== by 0x406DC0: token_analysis (token_analysis.c:127) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b37571 is 0 bytes after a block of size 1 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x407F75: ft_calloc (in /home/coder/42_minishell/minishell) ==2285== by 0x406CE0: token_analysis (token_analysis.c:109) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid read of size 1 ==2285== at 0x408318: ft_strdup (in /home/coder/42_minishell/minishell) ==2285== by 0x406DC0: token_analysis (token_analysis.c:127) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b37571 is 0 bytes after a block of size 1 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x407F75: ft_calloc (in /home/coder/42_minishell/minishell) ==2285== by 0x406CE0: token_analysis (token_analysis.c:109) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid write of size 1 ==2285== at 0x406E35: token_analysis (token_analysis.c:147) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b3758e is 14 bytes after a block of size 16 in arena "client" ==2285== ==2285== Invalid read of size 1 ==2285== at 0x408457: ft_strlen (in /home/coder/42_minishell/minishell) ==2285== by 0x4082CC: ft_strdup (in /home/coder/42_minishell/minishell) ==2285== by 0x406E41: token_analysis (token_analysis.c:149) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b37571 is 0 bytes after a block of size 1 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x407F75: ft_calloc (in /home/coder/42_minishell/minishell) ==2285== by 0x406CE0: token_analysis (token_analysis.c:109) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid read of size 1 ==2285== at 0x408306: ft_strdup (in /home/coder/42_minishell/minishell) ==2285== by 0x406E41: token_analysis (token_analysis.c:149) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b37571 is 0 bytes after a block of size 1 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x407F75: ft_calloc (in /home/coder/42_minishell/minishell) ==2285== by 0x406CE0: token_analysis (token_analysis.c:109) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid read of size 1 ==2285== at 0x408318: ft_strdup (in /home/coder/42_minishell/minishell) ==2285== by 0x406E41: token_analysis (token_analysis.c:149) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b37571 is 0 bytes after a block of size 1 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x407F75: ft_calloc (in /home/coder/42_minishell/minishell) ==2285== by 0x406CE0: token_analysis (token_analysis.c:109) ==2285== by 0x401476: minishell (main.c:52) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid write of size 1 ==2285== at 0x4064DC: parse_values_args (interpreter.c:76) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b38062 is 0 bytes after a block of size 2 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x406402: parse_values_args (interpreter.c:57) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid write of size 1 ==2285== at 0x40646A: parse_values_args (interpreter.c:66) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b38064 is 2 bytes after a block of size 2 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x406402: parse_values_args (interpreter.c:57) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid read of size 1 ==2285== at 0x408457: ft_strlen (in /home/coder/42_minishell/minishell) ==2285== by 0x4082CC: ft_strdup (in /home/coder/42_minishell/minishell) ==2285== by 0x4064FE: parse_values_args (interpreter.c:81) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b38062 is 0 bytes after a block of size 2 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x406402: parse_values_args (interpreter.c:57) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid read of size 1 ==2285== at 0x408306: ft_strdup (in /home/coder/42_minishell/minishell) ==2285== by 0x4064FE: parse_values_args (interpreter.c:81) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b38062 is 0 bytes after a block of size 2 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x406402: parse_values_args (interpreter.c:57) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid read of size 1 ==2285== at 0x408318: ft_strdup (in /home/coder/42_minishell/minishell) ==2285== by 0x4064FE: parse_values_args (interpreter.c:81) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b38062 is 0 bytes after a block of size 2 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x406402: parse_values_args (interpreter.c:57) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid write of size 1 ==2285== at 0x40659A: parse_values_args (interpreter.c:92) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b38062 is 0 bytes after a block of size 2 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x406402: parse_values_args (interpreter.c:57) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid write of size 1 ==2285== at 0x4065BC: parse_values_args (interpreter.c:97) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b3807c is 12 bytes after a block of size 16 in arena "client" ==2285== ==2285== Invalid read of size 1 ==2285== at 0x408457: ft_strlen (in /home/coder/42_minishell/minishell) ==2285== by 0x4082CC: ft_strdup (in /home/coder/42_minishell/minishell) ==2285== by 0x4065C8: parse_values_args (interpreter.c:98) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b38062 is 0 bytes after a block of size 2 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x406402: parse_values_args (interpreter.c:57) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid read of size 1 ==2285== at 0x408306: ft_strdup (in /home/coder/42_minishell/minishell) ==2285== by 0x4065C8: parse_values_args (interpreter.c:98) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b38062 is 0 bytes after a block of size 2 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x406402: parse_values_args (interpreter.c:57) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid read of size 1 ==2285== at 0x408318: ft_strdup (in /home/coder/42_minishell/minishell) ==2285== by 0x4065C8: parse_values_args (interpreter.c:98) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b38062 is 0 bytes after a block of size 2 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x406402: parse_values_args (interpreter.c:57) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid write of size 8 ==2285== at 0x4065E9: parse_values_args (interpreter.c:100) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b380c0 is 0 bytes after a block of size 16 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x406410: parse_values_args (interpreter.c:58) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== ==2285== Invalid read of size 8 ==2285== at 0x401642: count_arr (utils.c:22) ==2285== by 0x406617: parse_values_args (interpreter.c:106) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285== Address 0x4b380c0 is 0 bytes after a block of size 16 alloc'd ==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==2285== by 0x406410: parse_values_args (interpreter.c:58) ==2285== by 0x4068F4: init_interpreter (interpreter.c:155) ==2285== by 0x40240B: run_commands (nodes.c:48) ==2285== by 0x4024DA: run_node (nodes.c:69) ==2285== by 0x4022EC: execute_cmd (commands.c:90) ==2285== by 0x4014B6: minishell (main.c:61) ==2285== by 0x4015E6: main (main.c:87) ==2285==
[parse_values_args] - word: 'echo'
[parse_values_args] - new_word: 'echo'
[parse_values_args] - word: 'teste . . . afsdfasdf '
[parse_values_args] - word[1][5]: ' '
[parse_values_args] - word[1][7]: ' '
[parse_values_args] - word[1][9]: ' '
[parse_values_args] - word[1][11]: ' ' [parse_values_args] - word[1][12]: ' ' [parse_values_args] - word[1][13]: ' ' [parse_values_args] - word[1][14]: ' '
[parse_values_args] - word[1][24]: ' '
[parse_values_args] - word[1][25]: ' '
[parse_values_args] - word[1][26]: ' '
[parse_values_args] - word[1][27]: ' '
[parse_values_args] - new_word: 'teste . . . afsdfasdf '
==2285== Invalid read of size 8
==2285== at 0x406646: parse_values_args (interpreter.c:108)
==2285== by 0x4068F4: init_interpreter (interpreter.c:155)
==2285== by 0x40240B: run_commands (nodes.c:48)
==2285== by 0x4024DA: run_node (nodes.c:69)
==2285== by 0x4022EC: execute_cmd (commands.c:90)
==2285== by 0x4014B6: minishell (main.c:61)
==2285== by 0x4015E6: main (main.c:87)
==2285== Address 0x4b380c0 is 0 bytes after a block of size 16 alloc'd
==2285== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==2285== by 0x406410: parse_values_args (interpreter.c:58)
==2285== by 0x4068F4: init_interpreter (interpreter.c:155)
==2285== by 0x40240B: run_commands (nodes.c:48)
==2285== by 0x4024DA: run_node (nodes.c:69)
==2285== by 0x4022EC: execute_cmd (commands.c:90)
==2285== by 0x4014B6: minishell (main.c:61)
==2285== by 0x4015E6: main (main.c:87)
==2285==
teste . . . afsdfasdf
==2322== FILE DESCRIPTORS: 3 open at exit.
==2322== Open file descriptor 2: /dev/pts/0
==2322==