Han2-Ro / 42minishell

0 stars 0 forks source link

Segfault in expander/lexer #58

Closed Han2-Ro closed 7 months ago

Han2-Ro commented 7 months ago

When you just enter <space> <enter>, this happens: ms> DEBUG Inputed line:

ERORR Wrong redirect syntax! ==41635== Invalid read of size 4 ==41635== at 0x401E30: expand (expand.c:119) ==41635== by 0x402DD7: ft_lstiter (list_utils.c:118) ==41635== by 0x402AAE: lexer (lexer.c:180) ==41635== by 0x40322D: shell_loop (loop.c:31) ==41635== by 0x403346: main (main.c:24) ==41635== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==41635== ==41635== ==41635== Process terminating with default action of signal 11 (SIGSEGV) ==41635== Access not within mapped region at address 0x0 ==41635== at 0x401E30: expand (expand.c:119) ==41635== by 0x402DD7: ft_lstiter (list_utils.c:118) ==41635== by 0x402AAE: lexer (lexer.c:180) ==41635== by 0x40322D: shell_loop (loop.c:31) ==41635== by 0x403346: main (main.c:24)

Han2-Ro commented 7 months ago

It doesn't segfault anymore.

Han2-Ro commented 7 months ago

Every time there is a space at the end of the line, we get a LEX ERROR