Skip to content

ErrorInner override is broken in GAP 4.10 #77

@fingolfin

Description

@fingolfin

This package replaces ErrorInner with a modified function.

As part of ErrorInner, PRINT_CURRENT_STATEMENT is called. But that went from taking 1 argument in GAP <= 4.9 to taking two arguments in GAP >= 4.10. As a result, if an error is triggered which prints a backtrace, an infinite recursion of Error calls ensues, which (depending on your system) either results in a "recursion depth exceeded" error, or a plain segfault.

The fix for GAP 4.10 is clear, just add the second argument to the call. If you want to write code that works in GAP 4.9 and 4.10, you could check NumberArgumentsFunction(PRINT_CURRENT_STATEMENT) and adapt the call accordingly.

Of course even better would be if ErrorInner was not replaced... As far as I can tell, the only change is to replace "*errout*" by GAP_ERROR_STREAM, which would be trivial to apply to GAP, with BindGlobal("GAP_ERROR_STREAM", "*errout*"); in there; then you'd just have to re-bind GAP_ERROR_STREAM in your package.

CC @alex-konovalov

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAll bugs should have this label, even if they have a more specific onebug: unexpected errorA computation runs into an error loop when it should not have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions