Skip to content
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 potential crash in rbx_binary when serializing default SharedString #363

Merged
merged 7 commits into from
Sep 23, 2023

Conversation

Dekkonot
Copy link
Member

At the moment, when we generate a default for SharedString in rbx_binary, we neglect to add it to the pool of strings that are serialized into an SSTR chunk. This is a problem in of itself, but it also causes our PROP serialization to panic because it directly indexes into a hashmap, assuming this can't happen.

This PR fixes both. We now add the default SharedString to the pool when we generate it, and also emit a proper panic message when a value is not present in the case a bug of this sort crops up again.

Also, I changed a debug log that was spamming the output during serialization because it logged the debug of the entire TypeInfos structure. SharedStringHash now implements Display as well.

@Dekkonot Dekkonot merged commit 9716af3 into rojo-rbx:master Sep 23, 2023
2 checks passed
@Dekkonot Dekkonot deleted the sstr-bug branch July 20, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants