You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
➜ 42sh git:(master) ✗ valgrind --leak-check=full ./42sh 3>test
==68438== Memcheck, a memory error detector
==68438== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==68438== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==68438== Command: ./42sh
==68438==
--68438-- run: /usr/bin/dsymutil "./42sh"
--68438-- UNKNOWN fcntl 67!
--68438-- UNKNOWN fcntl 67! (repeated 2 times)
➜ 42sh git:(master) ✗ ;;;;;;;;;;;;;;;;;;;;;;;;;
==68438== Invalid write of size 1
==68438== at 0x100001303: print_t2 (btree_print.c:23)
==68438== by 0x100001266: print_t (btree_print.c:59)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== Address 0x10483a4d8 is not stack'd, malloc'd or (recently) free'd
==68438==
==68438==
==68438== Process terminating with default action of signal 11 (SIGSEGV)
==68438== Access not within mapped region at address 0x10483A4D8
==68438== at 0x100001303: print_t2 (btree_print.c:23)
==68438== by 0x100001266: print_t (btree_print.c:59)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== If you believe this happened as a result of a stack
==68438== overflow in your program's main thread (unlikely but
==68438== possible), you can try to increase the size of the
==68438== main thread stack using the --main-stacksize= flag.
==68438== The main thread stack size used in this run was 8388608.
==68438==
==68438== HEAP SUMMARY:
==68438== in use at exit: 141,270 bytes in 851 blocks
==68438== total heap usage: 2,359 allocs, 1,508 frees, 205,203 bytes allocated
==68438==
==68438== 17 bytes in 1 blocks are definitely lost in loss record 11 of 118
==68438== at 0x10003F671: malloc (in /Users/gwojda/.brew/Cellar/valgrind/3.12.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==68438== by 0x100004244: ft_memalloc (ft_memalloc.c:20)
==68438== by 0x100003921: ft_lstnew (ft_lstnew.c:23)
==68438== by 0x100003370: ft_newfd (get_next_line.c:32)
==68438== by 0x100003229: get_next_line (get_next_line.c:74)
==68438== by 0x10001895B: ft_init_history (readline.c:40)
==68438== by 0x100018AD2: readline_init (readline.c:86)
==68438== by 0x100018B84: readline (readline.c:102)
==68438== by 0x1000194EF: interactive_shell (main.c:56)
==68438== by 0x100019802: main (main.c:92)
==68438==
==68438== 40 bytes in 1 blocks are definitely lost in loss record 45 of 118
==68438== at 0x10003F671: malloc (in /Users/gwojda/.brew/Cellar/valgrind/3.12.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==68438== by 0x100014873: token_init (token_init.c:19)
==68438== by 0x100013B75: lexer_lex (lexer_lex.c:51)
==68438== by 0x1000195CD: interactive_shell (main.c:62)
==68438== by 0x100019802: main (main.c:92)
==68438==
==68438== 40 bytes in 1 blocks are definitely lost in loss record 46 of 118
==68438== at 0x10003F671: malloc (in /Users/gwojda/.brew/Cellar/valgrind/3.12.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==68438== by 0x100014873: token_init (token_init.c:19)
==68438== by 0x100013B75: lexer_lex (lexer_lex.c:51)
==68438== by 0x1000141AF: lexer_sep (lexer_sep.c:42)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x100012DEA: lexer_default (lexer_default.c:22)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x1000195CD: interactive_shell (main.c:62)
==68438== by 0x100019802: main (main.c:92)
==68438==
==68438== 40 bytes in 1 blocks are definitely lost in loss record 47 of 118
==68438== at 0x10003F671: malloc (in /Users/gwojda/.brew/Cellar/valgrind/3.12.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==68438== by 0x100014873: token_init (token_init.c:19)
==68438== by 0x100013B75: lexer_lex (lexer_lex.c:51)
==68438== by 0x1000141AF: lexer_sep (lexer_sep.c:42)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x100012DEA: lexer_default (lexer_default.c:22)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x1000141AF: lexer_sep (lexer_sep.c:42)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x100012DEA: lexer_default (lexer_default.c:22)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x1000195CD: interactive_shell (main.c:62)
==68438==
==68438== 880 bytes in 22 blocks are definitely lost in loss record 102 of 118
==68438== at 0x10003F671: malloc (in /Users/gwojda/.brew/Cellar/valgrind/3.12.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==68438== by 0x100014873: token_init (token_init.c:19)
==68438== by 0x100013B75: lexer_lex (lexer_lex.c:51)
==68438== by 0x1000141AF: lexer_sep (lexer_sep.c:42)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x100012DEA: lexer_default (lexer_default.c:22)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x1000141AF: lexer_sep (lexer_sep.c:42)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x100012DEA: lexer_default (lexer_default.c:22)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x1000141AF: lexer_sep (lexer_sep.c:42)
==68438==
==68438== LEAK SUMMARY:
==68438== definitely lost: 1,017 bytes in 26 blocks
==68438== indirectly lost: 0 bytes in 0 blocks
==68438== possibly lost: 0 bytes in 0 blocks
==68438== still reachable: 113,927 bytes in 634 blocks
==68438== suppressed: 26,326 bytes in 191 blocks
==68438== Reachable blocks (those to which a pointer was found) are not shown.
==68438== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==68438==
==68438== For counts of detected and suppressed errors, rerun with: -v
==68438== ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 14 from 14)
[1] 68438 segmentation fault valgrind --leak-check=full ./42sh 3> test
The text was updated successfully, but these errors were encountered:
➜ 42sh git:(master) ✗ valgrind --leak-check=full ./42sh 3>test
==68438== Memcheck, a memory error detector
==68438== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==68438== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==68438== Command: ./42sh
==68438==
--68438-- run: /usr/bin/dsymutil "./42sh"
--68438-- UNKNOWN fcntl 67!
--68438-- UNKNOWN fcntl 67! (repeated 2 times)
➜ 42sh git:(master) ✗ ;;;;;;;;;;;;;;;;;;;;;;;;;
==68438== Invalid write of size 1
==68438== at 0x100001303: print_t2 (btree_print.c:23)
==68438== by 0x100001266: print_t (btree_print.c:59)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== Address 0x10483a4d8 is not stack'd, malloc'd or (recently) free'd
==68438==
==68438==
==68438== Process terminating with default action of signal 11 (SIGSEGV)
==68438== Access not within mapped region at address 0x10483A4D8
==68438== at 0x100001303: print_t2 (btree_print.c:23)
==68438== by 0x100001266: print_t (btree_print.c:59)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== by 0x10000123B: print_t (btree_print.c:56)
==68438== If you believe this happened as a result of a stack
==68438== overflow in your program's main thread (unlikely but
==68438== possible), you can try to increase the size of the
==68438== main thread stack using the --main-stacksize= flag.
==68438== The main thread stack size used in this run was 8388608.
==68438==
==68438== HEAP SUMMARY:
==68438== in use at exit: 141,270 bytes in 851 blocks
==68438== total heap usage: 2,359 allocs, 1,508 frees, 205,203 bytes allocated
==68438==
==68438== 17 bytes in 1 blocks are definitely lost in loss record 11 of 118
==68438== at 0x10003F671: malloc (in /Users/gwojda/.brew/Cellar/valgrind/3.12.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==68438== by 0x100004244: ft_memalloc (ft_memalloc.c:20)
==68438== by 0x100003921: ft_lstnew (ft_lstnew.c:23)
==68438== by 0x100003370: ft_newfd (get_next_line.c:32)
==68438== by 0x100003229: get_next_line (get_next_line.c:74)
==68438== by 0x10001895B: ft_init_history (readline.c:40)
==68438== by 0x100018AD2: readline_init (readline.c:86)
==68438== by 0x100018B84: readline (readline.c:102)
==68438== by 0x1000194EF: interactive_shell (main.c:56)
==68438== by 0x100019802: main (main.c:92)
==68438==
==68438== 40 bytes in 1 blocks are definitely lost in loss record 45 of 118
==68438== at 0x10003F671: malloc (in /Users/gwojda/.brew/Cellar/valgrind/3.12.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==68438== by 0x100014873: token_init (token_init.c:19)
==68438== by 0x100013B75: lexer_lex (lexer_lex.c:51)
==68438== by 0x1000195CD: interactive_shell (main.c:62)
==68438== by 0x100019802: main (main.c:92)
==68438==
==68438== 40 bytes in 1 blocks are definitely lost in loss record 46 of 118
==68438== at 0x10003F671: malloc (in /Users/gwojda/.brew/Cellar/valgrind/3.12.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==68438== by 0x100014873: token_init (token_init.c:19)
==68438== by 0x100013B75: lexer_lex (lexer_lex.c:51)
==68438== by 0x1000141AF: lexer_sep (lexer_sep.c:42)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x100012DEA: lexer_default (lexer_default.c:22)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x1000195CD: interactive_shell (main.c:62)
==68438== by 0x100019802: main (main.c:92)
==68438==
==68438== 40 bytes in 1 blocks are definitely lost in loss record 47 of 118
==68438== at 0x10003F671: malloc (in /Users/gwojda/.brew/Cellar/valgrind/3.12.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==68438== by 0x100014873: token_init (token_init.c:19)
==68438== by 0x100013B75: lexer_lex (lexer_lex.c:51)
==68438== by 0x1000141AF: lexer_sep (lexer_sep.c:42)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x100012DEA: lexer_default (lexer_default.c:22)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x1000141AF: lexer_sep (lexer_sep.c:42)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x100012DEA: lexer_default (lexer_default.c:22)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x1000195CD: interactive_shell (main.c:62)
==68438==
==68438== 880 bytes in 22 blocks are definitely lost in loss record 102 of 118
==68438== at 0x10003F671: malloc (in /Users/gwojda/.brew/Cellar/valgrind/3.12.0/lib/valgrind/vgpreload_memcheck-amd64-darwin.so)
==68438== by 0x100014873: token_init (token_init.c:19)
==68438== by 0x100013B75: lexer_lex (lexer_lex.c:51)
==68438== by 0x1000141AF: lexer_sep (lexer_sep.c:42)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x100012DEA: lexer_default (lexer_default.c:22)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x1000141AF: lexer_sep (lexer_sep.c:42)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x100012DEA: lexer_default (lexer_default.c:22)
==68438== by 0x100013BB1: lexer_lex (lexer_lex.c:54)
==68438== by 0x1000141AF: lexer_sep (lexer_sep.c:42)
==68438==
==68438== LEAK SUMMARY:
==68438== definitely lost: 1,017 bytes in 26 blocks
==68438== indirectly lost: 0 bytes in 0 blocks
==68438== possibly lost: 0 bytes in 0 blocks
==68438== still reachable: 113,927 bytes in 634 blocks
==68438== suppressed: 26,326 bytes in 191 blocks
==68438== Reachable blocks (those to which a pointer was found) are not shown.
==68438== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==68438==
==68438== For counts of detected and suppressed errors, rerun with: -v
==68438== ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 14 from 14)
[1] 68438 segmentation fault valgrind --leak-check=full ./42sh 3> test
The text was updated successfully, but these errors were encountered: