From: carl To: bug-bash@gnu.org Subject: Segfault when running alias if PROMPT_COMMAND is not empty
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 uname output: Linux carl-pc 6.15.4-arch2-1 #1 SMP PREEMPT_DYNAMIC Fri, 27 Jun 2025 16:35:07 +0000 x86_64 GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 5.3 Patch Level: 0 Release Status: release Description: When alias definition contains the 'unalias' builtin with the alias's name as its argument with a newline anywhere after the builtin invocation, running the alias when PROMPT_COMMAND is not empty causes a segmentation fault. Repeat-By: Start an bash shell, run the following code: ```bash PROMPT_COMMAND=: alias a=$'unalias a\n' a ``` The result is a segmentation fault.