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 for GC of Ruby map frames. #6533

Merged
merged 1 commit into from
Aug 22, 2019
Merged

Conversation

haberman
Copy link
Member

We were creating a map decoding frame when starting the map,
but clearing the GC slot when finishing each map entry. This
means that the decoding frame could be collected in the meantime.

Hopefully this will fix #6532 (needs to be tested/verified).

I have not verified that this fixes anything yet, but it does seem to correct a correctness error in the previous code.

We were creating a map decoding frame when starting the *map*,
but clearing the GC slot when finishing each *map entry*.  This
means that the decoding frame could be collected in the meantime.
@TeBoring
Copy link
Contributor

The existing gc test only tests map with one key/value pair. Can we add more key/value pair into the test?
https://github.com/protocolbuffers/protobuf/blob/master/ruby/tests/gc_test.rb#L39

@TeBoring TeBoring merged commit 780b050 into protocolbuffers:master Aug 22, 2019
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.

Ruby concurrent map decoding sporadically has empty results
4 participants