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

Add test:valgrind rake task and use it in CI #89

Merged
merged 4 commits into from
Oct 21, 2021
Merged

Add test:valgrind rake task and use it in CI #89

merged 4 commits into from
Oct 21, 2021

Conversation

dylanahsmith
Copy link
Contributor

To help with detecting memory leaks, I've added a test:valgrind rake task and used it in CI.

  • bin/fmt was successfully run

Rakefile Outdated Show resolved Hide resolved
@dylanahsmith
Copy link
Contributor Author

Looks like Rotoscope.new has a leak, but the underlying leak is in ruby's rb_tracepoint_new. Specifically, it uses RUBY_TYPED_NEVER_FREE as its data free function, even though the data itself is dynamically allocated through TypedData_Make_Struct ​(https://github.com/ruby/ruby/blob/v3_0_2/vm_trace.c#L733)

Copy link
Contributor

@jahfer jahfer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find on the leak!

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.

3 participants