Skip to content

Possible infinite recursion in PRINT_OR_APPEND_TO_FILE_OR_STREAM #3028

@embray

Description

@embray

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugIssues describing general bugs, and PRs fixing themkind: bug: crashIssues describing bugs that cause GAP to crash, and PRs fixing them (used for release notes)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions