*zsh* handles the "out of memory" scenario gracefully now
The *zsh* shell allocates memory while printing the `out of memory` fatal error message. Previously, if the printing routine failed to allocate memory, it triggered an infinite recursion. Consequently, the *zsh* process terminated unexpectedly due to a stack overflow. With this update, the infinite recursion no longer appears in this scenario. As a result, after printing the fatal error message, *zsh* now terminates gracefully in case it runs out of memory.
+++ This bug was initially created as a clone of Bug #1300958 +++
--- Additional comment from Kamil Dudka on 2016-01-25 14:56 CET ---
Created attachment #1118021 [details]
I have attached a universal reproducer script. It is not completely reliable because dynamic linker and pthread run-time may run out of memory sooner than zsh itself in some cases. Nevertheless, I am able to trigger the infinite recursion with upstream git HEAD if I create a statically linked executable.
--- Additional comment from Kamil Dudka on 2016-01-25 16:22:58 CET ---
--- Additional comment from Kamil Dudka on 2016-01-27 09:25:40 CET ---
--- Additional comment from Kamil Dudka on 2016-01-27 10:08:07 CET ---
fixed in zsh-5.2-4.fc24
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.