#1148794 bash: segfault when adding to a large string variable

Package:
bash
Source:
bash
Description:
GNU Bourne Again SHell
Submitter:
Wolfgang Zarre
Date:
2026-09-23 21:09:02 UTC
Severity:
normal
#1148794#5
Date:
2026-09-23 21:07:25 UTC
From:
To:
Dear Maintainer,

I discovered this bug while utilising a bash string variable as memory load to
investigate a suspected memory issue in another application.

I then tried to reproduce this bug and had success with the following command line:

$ TESTVAR="A"; for I in {1..32}; do TESTVAR+="$TESTVAR"; done
Segmentation fault


Cheers,
Wolf