-
Notifications
You must be signed in to change notification settings - Fork 91
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
Fix for issue #407: Prevent crashes due to unbounded growth. #721
Fix for issue #407: Prevent crashes due to unbounded growth. #721
Conversation
…ble setting for max number of iotas on the stack, default is 2048 iotas.
Special thanks to @walksanatora for helping me learn the repo |
shouldn't this use the limit at https://github.com/FallingColors/HexMod/blob/main/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexIotaTypes.java#L26? |
I believe this is a different enough scenario, as the bug in question is about a spell which continually adds to a list whereas the constants you reference seem to be more related to trying to limit the max size of a spell before it is cast. |
I believe the MAX_SERIALIZATION_TOTAL limit is commonly known as iota limit or serialization limit, which.... limits hexes in much the same way as this pull in practice, so I feel like treating this limit as an extension of that is reasonable. |
Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingVM.kt
Outdated
Show resolved
Hide resolved
Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingVM.kt
Outdated
Show resolved
Hide resolved
Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingVM.kt
Outdated
Show resolved
Hide resolved
Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingVM.kt
Outdated
Show resolved
Hide resolved
Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5
Outdated
Show resolved
Hide resolved
Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexConfig.java
Outdated
Show resolved
Hide resolved
Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5
Outdated
Show resolved
Hide resolved
….json5 Co-authored-by: [object Object] <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. It would be nice if the error message showed the pattern that caused it, but I'll do that myself later. Thanks for the PR!
Prevent crashes due to unbounded growth of a few items.
Fixes #407.