-
Notifications
You must be signed in to change notification settings - Fork 13
Description
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.