Seems to only happen with bash 4.4. Reproduce with something like the below. Sometimes I have to run this a few times in a row to trigger the issue but usually just once is sufficient.
kill -INT -$$ & while $(:); do $(:); done
Once triggered, the terminal becomes completely messed up, with output getting mixed in with input, typed characters not all getting echoed back, etc. Itβs a bit hard to explain but hopefully this screencast [1] will demonstrate sufficiently.
My keyboard input is β1234567890β, which produces:
bash-4.4$ 24580bash: 13679: command not found
[1] https://asciinema.org/a/10bbfdgevcku4mdx9yls5uojn
β