Skip to content

Commit

Permalink
devel/rubygem-ruby_memcheck: Add rubygem-ruby_memcheck 2.1.1
Browse files Browse the repository at this point in the history
ruby_memcheck provides a sane way to use Valgrind's memcheck on your native
extension gem.

Valgrind's memcheck is a great tool to find and debug memory issues (e.g. memory
leak, use-after-free, etc.). However, it doesn't work well on Ruby because Ruby
does not free all of the memory it allocates during shutdown. This results in
Valgrind reporting thousands (or more) false positives, making it very difficult
for Valgrind to actually be useful. This gem solves the problem by using
heuristics to filter out false positives.
  • Loading branch information
sunpoet committed Aug 21, 2023
1 parent f39da65 commit c5a3c98
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions devel/Makefile
Expand Up @@ -7281,6 +7281,7 @@
SUBDIR += rubygem-ruby2_keywords
SUBDIR += rubygem-ruby2ruby
SUBDIR += rubygem-ruby_dep
SUBDIR += rubygem-ruby_memcheck
SUBDIR += rubygem-ruby_parser
SUBDIR += rubygem-rubygems-mirror
SUBDIR += rubygem-rubygems-tasks
Expand Down
22 changes: 22 additions & 0 deletions devel/rubygem-ruby_memcheck/Makefile
@@ -0,0 +1,22 @@
PORTNAME= ruby_memcheck
PORTVERSION= 2.1.1
CATEGORIES= devel rubygems
MASTER_SITES= RG

MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Use Valgrind memcheck without going crazy
WWW= https://github.com/Shopify/ruby_memcheck

LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.txt

RUN_DEPENDS= rubygem-nokogiri>=0:textproc/rubygem-nokogiri \
valgrind>=3.20.0,1:devel/valgrind

USES= gem

NO_ARCH= yes

PLIST_FILES= bin/ruby_memcheck

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions devel/rubygem-ruby_memcheck/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1692211625
SHA256 (rubygem/ruby_memcheck-2.1.1.gem) = 83ddcbdd2517f096d632969969d12827915921624aa57d936be200d0bc18ed45
SIZE (rubygem/ruby_memcheck-2.1.1.gem) = 15360
9 changes: 9 additions & 0 deletions devel/rubygem-ruby_memcheck/pkg-descr
@@ -0,0 +1,9 @@
ruby_memcheck provides a sane way to use Valgrind's memcheck on your native
extension gem.

Valgrind's memcheck is a great tool to find and debug memory issues (e.g. memory
leak, use-after-free, etc.). However, it doesn't work well on Ruby because Ruby
does not free all of the memory it allocates during shutdown. This results in
Valgrind reporting thousands (or more) false positives, making it very difficult
for Valgrind to actually be useful. This gem solves the problem by using
heuristics to filter out false positives.

0 comments on commit c5a3c98

Please sign in to comment.