-
-
Notifications
You must be signed in to change notification settings - Fork 290
Infinite recursion #85
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
Comments
...until proper updates are done. See pyparsing/pyparsing#85.
...until proper updates are done. See pyparsing/pyparsing#85.
...until proper updates are done. See pyparsing/pyparsing#85.
...until proper updates are done. See pyparsing/pyparsing#85.
My initial theory is that our custom operatorPrecedence facility creates a cycle in Forward, but I haven't had time to confirm that. We probably need to move to the provided For now, I've released python-dice 2.4.1 which pins pyparsing to <2.4.0. |
I downloaded python-dice and looked at the the custom |
Please check latest update of pyparsing.py to see if this addresses or at least mitigates this issue. |
I assume by latest update you mean 0ca1706. |
Thanks - I'll keep looking at this, it's the last major bug I want to fix before pushing out 2.4.1 |
I tested this latest change against my own copy of python-dice and it looks like things are fixed. I also think you can remove your disabling of trim_arity, since the TypeError masking behavior was resolved in 2.1.8 - August, 2016. |
I can confirm that it seems to be fixed with c5c4ca6. |
Fixed in 2.4.1, released today |
There is currently an issue with infinite recursion that occurs with the latest version of python-dice (v2.4.0), using Python 3.7 and pyparsing 2.4.0, which does not occur when using pyparsing 2.3.1.
Simply executing
dice.roll('6')
will immediately cause the program to start using up all available memory, potentially causing the system to freeze.If a keyboard interrupt is used to stop the execution, the traceback looks like this:
The relevant expression can be seen at https://github.com/borntyping/python-dice/blob/v2.4.0/dice/grammar.py.
I believe this is due to the change in ed2f5ec (#71).
Edit: I've now tested this and the issue does not occur when this change is reverted.
cc @calebj
The text was updated successfully, but these errors were encountered: