LukasKava / Minishell

0 stars 0 forks source link

log of crash #67

Closed Gotr-byte closed 1 year ago

Gotr-byte commented 1 year ago

piotr@piotr-Lenovo-G50-80:~/code/minivv7$ ./minishell BiebianOS> ./minishell ____CHUNK LIST____ full listC: indentifier: 20: ./minishell ARGUMENTS: [./minishell]

BiebianOS> exit 0 ____CHUNK LIST_____ full listC: indentifier: 21: (null) ARGUMENTS: [exit] [0]

exit BiebianOS> echo $? ____CHUNK LIST_____ full listC: indentifier: 21: (null) ARGUMENTS: [echo] [0]

0 BiebianOS> ./minishell ____CHUNK LIST_____ full listC: indentifier: 20: ./minishell ARGUMENTS: [./minishell]

BiebianOS> exit +0 ____CHUNK LIST_____ full listC: indentifier: 21: (null) ARGUMENTS: [exit] [+0]

exit BiebianOS> echo $? ____CHUNK LIST_____ full listC: indentifier: 21: (null) ARGUMENTS: [echo] [0]

0 BiebianOS> cd ~ ____CHUNK LIST_____ full listC: indentifier: 21: (null) ARGUMENTS: [cd] [~]

BiebianOS> pwd ____CHUNK LIST_____ full listC: indentifier: 21: (null) ARGUMENTS: [pwd]

/home/piotr BiebianOS> cd .. ____CHUNK LIST_____ full listC: indentifier: 21: (null) ARGUMENTS: [cd] [..]

BiebianOS> cd ~ ____CHUNK LIST_____ full listC: indentifier: 21: (null) ARGUMENTS: [cd] [~]

================================================================= ==85372==ERROR: AddressSanitizer: attempting double-free on 0x602000000910 in thread T0:

0 0x7f3941d34517 in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:127

#1 0x55f31ca275c7 in cd_possible src/builtins/cd.c:74
#2 0x55f31ca27834 in builtins_cd src/builtins/cd.c:111
#3 0x55f31ca2ed5c in cd_handle src/execute/builtin_handles.c:38
#4 0x55f31ca2c394 in no_fork_handle src/execute/new_fork.c:35
#5 0x55f31ca2c938 in built_in_handler src/execute/new_fork.c:74
#6 0x55f31ca2ff2b in pipe_fork src/execute/execution.c:62
#7 0x55f31ca2cb89 in execute src/execute/new_fork.c:90
#8 0x55f31ca18cee in parsing_and_execution src/parsing/main.c:94
#9 0x55f31ca19004 in main src/parsing/main.c:121
#10 0x7f3941a2dd8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#11 0x7f3941a2de3f in __libc_start_main_impl ../csu/libc-start.c:392
#12 0x55f31ca18624 in _start (/home/piotr/code/mini_vv7/minishell+0x4624)

0x602000000910 is located 0 bytes inside of 13-byte region [0x602000000910,0x60200000091d) freed by thread T0 here:

0 0x7f3941d34517 in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:127

#1 0x55f31ca275e2 in cd_possible src/builtins/cd.c:77
#2 0x55f31ca27834 in builtins_cd src/builtins/cd.c:111
#3 0x55f31ca2ed5c in cd_handle src/execute/builtin_handles.c:38
#4 0x55f31ca2c394 in no_fork_handle src/execute/new_fork.c:35
#5 0x55f31ca2c938 in built_in_handler src/execute/new_fork.c:74
#6 0x55f31ca2ff2b in pipe_fork src/execute/execution.c:62
#7 0x55f31ca2cb89 in execute src/execute/new_fork.c:90
#8 0x55f31ca18cee in parsing_and_execution src/parsing/main.c:94
#9 0x55f31ca19004 in main src/parsing/main.c:121
#10 0x7f3941a2dd8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

previously allocated by thread T0 here:

0 0x7f3941d34867 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145

#1 0x55f31ca305bd in ft_calloc (/home/piotr/code/mini_vv7/minishell+0x1c5bd)
#2 0x55f31ca2308f in ft_strtrim_f src/parsing/expansions_utils.c:29
#3 0x55f31ca26581 in actions src/builtins/builtins_utils.c:65
#4 0x55f31ca266f7 in create_e_list src/builtins/builtins_utils.c:88
#5 0x55f31ca187ce in initialize_hive src/parsing/main.c:60
#6 0x55f31ca18ec1 in main src/parsing/main.c:111
#7 0x7f3941a2dd8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

SUMMARY: AddressSanitizer: double-free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:127 in __interceptor_free ==85372==ABORTING

Gotr-byte commented 1 year ago

Redundant Issue - closing.