If a stream that is being used to print errors cannot be opened (e.g. an error elsewhere prevents streams from being closed properly) this can result in an infinite recursion when reporting that error.
The specific problem is in the error handling logic here:
|
i = OpenOutputStream(destination); |
If an ErrorQuit (for example) occurs elsewhere, and the stream assigned to ERROR_OUTPUT cannot be opened for whatever reason, this results in another call to ErrorQuit with the same broken stream assigned and so on. Perhaps this should do something else: Try to open *errout* as a last resort, Panic(), etc.
If a stream that is being used to print errors cannot be opened (e.g. an error elsewhere prevents streams from being closed properly) this can result in an infinite recursion when reporting that error.
The specific problem is in the error handling logic here:
gap/src/streams.c
Line 799 in efd3626
If an
ErrorQuit(for example) occurs elsewhere, and the stream assigned toERROR_OUTPUTcannot be opened for whatever reason, this results in another call toErrorQuitwith the same broken stream assigned and so on. Perhaps this should do something else: Try to open*errout*as a last resort,Panic(), etc.