Skip to content

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

Merged
dylanahsmith merged 4 commits intomainfrom
valgrind
Oct 21, 2021
Merged

Add test:valgrind rake task and use it in CI#89
dylanahsmith merged 4 commits intomainfrom
valgrind

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

@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)

@dylanahsmith dylanahsmith requested a review from jahfer October 21, 2021 16:27
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