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 bugs with serializeConfiguration and garbage collection #825

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

dwightguth
Copy link
Collaborator

@dwightguth dwightguth commented Aug 11, 2023

There was a bug in how we were serializing string buffers and strings/byte arrays of length 0. It was assuming that such strings are null terminated when they appear in a string * in the kore heap, but this is not necessarily true. Similarly, it was assuming that a string buffer was null terminated, which is also not true.

It's pretty difficult to write reliable tests for this bug since it relies on garbage collection to pollute the word that gets printed with a word that does not begin with the null byte. This is impossible in our existing test harness for serialization since we don't ever garbage collect anything in those tests. However, we know that the fix works because it fixes the regression in the Booster's integration tests that arose from introducing garbage collection calls to their API usage.

@dwightguth dwightguth merged commit a7da873 into master Aug 11, 2023
6 checks passed
@dwightguth dwightguth deleted the fix_serialize branch August 11, 2023 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants