-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault after installing a silly method for a synonym attribute #4340
Comments
I suspect this has nothing to do with synonyms; just do InstallMethod(Foo, ..., Foo); and then any call to Foo triggering this "method" will result in infinite recursion and a crash . Of course you can also do with 2, 3, ... operations calling each other in a circle |
As such this seems to be a duplicate of issue #1286 ? Which we closed but the fix was reverted...? |
Ah, interesting, thanks for remembering this @fingolfin. #1286 was fixed in #3221 but unfixed in #3578, because the fix was too expensive. If that's how things are going to stay, then we should close this issue but re-open #1286, and add the 'status: wontfix' label (and perhaps give it a more descriptive title). |
Well, one thing that we definitely could do is to at least catch the "obvious" cases, were someone installs an operation as a method for itself, which is essentially what's happening here, and also in #1286:
While that may not catch all and every potential problem, it seems that at least two people ran into this independently, so even such a limited but fast patch would still be useful. I've now made PR #4349. Unfortunately it triggers for me when loading with the default set of autoloaded packages 😂. Details in that PR. |
In the current
master
andstable-4.11
branches, and in4.11.1
(I believe), I can cause a segfault in the following way:Calling
Wilson(SymmetricGroup(3));
instead on the final line also gives the a segfault.The specific group involved, and indeed even the use of
IsGroup
as the filter rather than some other object, doesn't seem to be important.Obviously I'm not using things correctly – the declaration as a synonym means that the line
InstallMethod(Wilson, [IsGroup], Wilf);
is completely unnecessary. But whatever the case, this shouldn't lead to a crash.This shows that it is most likely the redundant method installation that causes the problem:
Note that doing the method installation the other way round (i.e.
InstallMethod(Wilf, [IsGroup], Wilson);
) also gives the segfault.The text was updated successfully, but these errors were encountered: