On Wed, Apr 19, 2023, 10:23 Chet Ramey <chet.ra...@case.edu> wrote: > On 4/18/23 6:15 PM, Grisha Levit wrote: > > $ bash --rcfile <(echo 'complete -C: -I') -i <<<$'; \cA\t' > > bash-5.2$ bash: xmalloc: cannot allocate 18446744073709551615 bytes > > $ bash --rcfile <(echo 'complete -C: -I') -i <<<$';\cA \t' > > bash-5.2$ Segmentation fault: 11 > > > > Thanks for the report. >
One more issue after the fix, the start can end up being further than pcomp_ind bash --rcfile <(echo 'complete -C: -I') -i <<<$' \cA\t' ERROR: AddressSanitizer: heap-buffer-overflow READ of size 1 at 0x0044e7a7d22f thread T0 #0 0x63e8175148 in bind_compfunc_variables pcomplete.c:946:7 #1 0x63e816afb0 in gen_command_matches pcomplete.c:1179:3 #2 0x63e8165358 in gen_compspec_completions pcomplete.c:1389:18 #3 0x63e81700e0 in gen_progcomp_completions pcomplete.c:1539:9 #4 0x63e816eb7c in programmable_completions pcomplete.c:1592:13 #5 0x63e810b4b8 in attempt_shell_completion bashline.c:1745:26