Skip to content

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

Merged
dylanahsmith merged 4 commits into
mainfrom
valgrind
Oct 21, 2021
Merged

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

Conversation

@dylanahsmith

Copy link
Copy Markdown
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

Comment thread Rakefile Outdated
@dylanahsmith

Copy link
Copy Markdown
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

@jahfer jahfer left a comment

Copy link
Copy Markdown
Contributor

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