fix 64 bit crash on large gamedata files#2173
Merged
psychonic merged 1 commit intoalliedmodders:masterfrom Jun 9, 2024
Merged
Conversation
Member
|
I think what you're seeing there happens when a read chunk starts exactly on a double quote. Increasing the buffer size would paper over it for your specific input file only. I think the correct fix is to keep the previous character in a variable for the escape character check, rather than attempting to read backwards from the pointer. The other easy option would be overlapping the reads. |
307dccc to
e70a459
Compare
Member
|
It looks like unrelated updates to amtl and sourcepawn submodules found their way in here. Is this intentional? |
Contributor
Author
|
no it's not intentional. I had to shuffle a lot of stuff around since my pull requests needed to make 64 bit not crash aren't getting merged and I have to update amtl and sourcemod as well. |
psychonic
approved these changes
Jun 9, 2024
Member
|
Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As explained here, there was a crash here caused by parsing a large gamedata file on 64 bits (it doesn't crash on 32 bits). It was fixed by changing the line endings from windows to linux.
#2172
Increasing a buffer size fixes the issue so the line ending change isn't needed. I suspect there's probably some pointer math error that is avoided when the buffer is large enough.