Since I wasn't sure if the provided .gz could be trusted, I instead used $(yes | head -n 1000000000) to confirm the SEGV. I can reproduce the SEGV on the master branch (5.3), but cannot reproduce it on the devel branch (5.4). In the devel branch, xmalloc correctly captures the error and terminates the Bash process without SEGV. I have run the same command multiple times, but the behavior was consistent.
master$ ./bash -c 'v=$(yes | head -n 1000000000); echo -e "$v" >/dev/null; echo ok' Segmentation fault (core dumped) ./bash -c 'v=$(yes | head -n 1000000000); echo -e "$v" >/dev/null; echo ok' devel$ ./bash -c 'v=$(yes | head -n 1000000000); echo -e "$v" >/dev/null; echo ok' ./bash: xmalloc: strtrans.c:71: cannot allocate 8000000000 bytes (262144 bytes allocated) -- Koichi
