LukasKava / Minishell

0 stars 0 forks source link

log of crash #68

Closed Gotr-byte closed 1 year ago

Gotr-byte commented 1 year ago

BiebianOS> mkdir a ____CHUNK LIST_____ full listC: indentifier: 20: /usr/bin/mkdir ARGUMENTS: [mkdir] [a]

BiebianOS> mkdir a/b ____CHUNK LIST_____ full listC: indentifier: 20: /usr/bin/mkdir ARGUMENTS: [mkdir] [a/b]

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

BiebianOS> rm -r ../../a ____CHUNK LIST_____ full listC: indentifier: 20: /usr/bin/rm ARGUMENTS: [rm] [-r] [../../a]

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

AddressSanitizer:DEADLYSIGNAL

==85973==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x564fa27edce9 bp 0x7ffdc2035170 sp 0x7ffdc2035170 T0) ==85973==The signal is caused by a READ memory access. ==85973==Hint: address points to the zero page.

0 0x564fa27edce9 in ft_strlen (/home/piotr/code/mini_vv7/minishell+0x1cce9)

#1 0x564fa27edb53 in ft_strdup (/home/piotr/code/mini_vv7/minishell+0x1cb53)
#2 0x564fa27e439c in reset_pwd src/builtins/cd.c:55
#3 0x564fa27e463f in cd_possible src/builtins/cd.c:82
#4 0x564fa27e4834 in builtins_cd src/builtins/cd.c:111
#5 0x564fa27ebd5c in cd_handle src/execute/builtin_handles.c:38
#6 0x564fa27e9394 in no_fork_handle src/execute/new_fork.c:35
#7 0x564fa27e9938 in built_in_handler src/execute/new_fork.c:74
#8 0x564fa27ecf2b in pipe_fork src/execute/execution.c:62
#9 0x564fa27e9b89 in execute src/execute/new_fork.c:90
#10 0x564fa27d5cee in parsing_and_execution src/parsing/main.c:94
#11 0x564fa27d6004 in main src/parsing/main.c:121
#12 0x7f73bdd09d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#13 0x7f73bdd09e3f in __libc_start_main_impl ../csu/libc-start.c:392
#14 0x564fa27d5624 in _start (/home/piotr/code/mini_vv7/minishell+0x4624)

AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/home/piotr/code/mini_vv7/minishell+0x1cce9) in ft_strlen ==85973==ABORTING

LukasKava commented 1 year ago

fixed specific leak