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
Trying to run here-doc in minshell causes it to crash. The issue is in parsing, namely - when trying to print error with data from token_stream which is null at that point (after multiple recursive calls).
Logs from core file and gdb:
#0 0x0000572872e87e65 in ft_parse (shell_data=0x57287477c2a0, production=0x5728747bc7e0 "", parent=0x5728747bc5a0, token_stream=0x0) at src/parser/parser.c:83
#1 0x0000572872e87efd in ft_parse (shell_data=0x57287477c2a0, production=0x5728747bb8c0 "", parent=0x5728747bc5a0, token_stream=0x5728747a2970) at src/parser/parser.c:94
#2 0x0000572872e87efd in ft_parse (shell_data=0x57287477c2a0, production=0x5728747bb550 "", parent=0x57287477cf90, token_stream=0x5728747a2970) at src/parser/parser.c:94
#3 0x0000572872e87efd in ft_parse (shell_data=0x57287477c2a0, production=0x5728747a28a0 "", parent=0x57287477cf90, token_stream=0x5728747a2970) at src/parser/parser.c:94
#4 0x0000572872e87efd in ft_parse (shell_data=0x57287477c2a0, production=0x5728747babe0 "", parent=0x57287477cf90, token_stream=0x5728747a2970) at src/parser/parser.c:94
#5 0x0000572872e86b91 in main (ac=1, av=0x7ffe312811f8, envp=0x7ffe31281208) at src/main.c:31
(gdb) info locals
alternative = 0x0
symbol = 0x5728747bc7e0 ""
Trying to run here-doc in minshell causes it to crash. The issue is in parsing, namely - when trying to print error with data from
token_stream
which is null at that point (after multiple recursive calls).Logs from core file and gdb:
Tried to change check for
null
in this function:It didn't fixed the problem, but prevented MS from crashing.
The text was updated successfully, but these errors were encountered: