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

[Ruby] Fix memory leak in MessageClass.encode #9150

Merged

Conversation

peterzhu2118
Copy link
Contributor

If the line above raises an exception, the upb_arena is lost and memory is leaked.

@google-cla
Copy link

google-cla bot commented Oct 25, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Oct 25, 2021
If the line above raises an exception, the upb_arena is lost and memory
is leaked.
@google-cla
Copy link

google-cla bot commented Oct 25, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@peterzhu2118
Copy link
Contributor Author

@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Oct 25, 2021
@peterzhu2118
Copy link
Contributor Author

I checked some of the logs, none of the CI failures seem to be related to the changes in this PR.

@peterzhu2118 peterzhu2118 changed the title Fix memory leak in MessageClass.encode [Ruby] Fix memory leak in MessageClass.encode Oct 26, 2021
@deannagarcia deannagarcia self-requested a review October 26, 2021 20:01
@deannagarcia
Copy link
Member

I agree none of the errors are related, merging now. Thanks for your contribution!

@deannagarcia deannagarcia merged commit 247649c into protocolbuffers:master Oct 26, 2021
@peterzhu2118 peterzhu2118 deleted the pz-message-encode-mem-leak branch October 26, 2021 20:02
@protocolbuffers protocolbuffers deleted a comment from Blue7474 Dec 7, 2021
@protocolbuffers protocolbuffers locked as resolved and limited conversation to collaborators Dec 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants