ruby_memcheck 2.1.2 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62852fcef1f92f736c7fb3ac7e32b5246661db102e6177f4c0f0e9ba71ee0fa1
4
- data.tar.gz: 8c6ea3da941069400b99cf73eb0ea6c881d9a2066486c72169a553ff6bf03e00
3
+ metadata.gz: b92b8da7d5b0b160d1478860bb1433d609f2d55d131ac0278405888f4d70cd81
4
+ data.tar.gz: 486f1105d72fd37920366f9185d5d6df8a9c56a78cdbfcfa2998dc1661753875
5
5
  SHA512:
6
- metadata.gz: ed8c72be6f6753a11f778e72fe036d8f0f7f35214b2b8d94cfb39c7ebab99d2cd443e23b2a4fdc0b5e4f22e4b99a87e74292512ee39180bbb8f7d2a78061eaa6
7
- data.tar.gz: dc27d11869a745eb873683337c2fb72ebe9995a7c7f2faef76a7b79018b1e936e0b21a1e488b15997fa9909d4177e83316f0891527ecebdc636f09a8dd661eaa
6
+ metadata.gz: 0da9f77d836712bb76324e3dec684ecd86bd9a566f34361a32789eb1f5f96ddea5a20ef8899f1821bb270964e7247fc0838eea90102562aedd700631e28e750d
7
+ data.tar.gz: 5039e14c28b608777a2ff05a2d66a3d17ec37bde48f5279078262a606330f06c3a65d952934f2eeb733adc395e2a0b94ecf3f794e1cb10c3e1d9637983738dca
@@ -20,7 +20,9 @@ jobs:
20
20
  # - run: sudo apt-get install -y valgrind
21
21
  # We cannot use Valgrind from apt because we need at least Valgrind 3.20.0
22
22
  # to support DWARF 5
23
- - run: sudo apt-get install -y libc6-dbg
23
+ - run: |
24
+ sudo apt-get update
25
+ sudo apt-get install -y libc6-dbg
24
26
  - name: Install Valgrind from source
25
27
  run: |
26
28
  wget https://sourceware.org/pub/valgrind/valgrind-3.21.0.tar.bz2
data/.gitignore CHANGED
@@ -10,3 +10,4 @@ Gemfile.lock
10
10
  /tmp/
11
11
 
12
12
  *.so
13
+ .DS_Store
data/README.md CHANGED
@@ -153,6 +153,7 @@ If you want to override any of the default configurations you can call `RubyMemc
153
153
 
154
154
  `RubyMemcheck::Configuration` accepts a variety of keyword arguments. Here are all the arguments:
155
155
 
156
+ - `binary_name`: Optional. The name of the only binary to report errors for. Use this if there is too much noise caused by other binaries.
156
157
  - `ruby`: Optional. The command to run to invoke Ruby. Defaults to the Ruby that is currently being used.
157
158
  - `valgrind`: Optional. The command to run to invoke Valgrind. Defaults to the string `"valgrind"`.
158
159
  - `valgrind_options`: Optional. Array of options to pass into Valgrind. This is only present as an escape hatch, so avoid using it. This may be deprecated or removed in future versions.
@@ -31,6 +31,7 @@ module RubyMemcheck
31
31
  /\Arb_yield/,
32
32
  ].freeze
33
33
 
34
+ attr_reader :binary_name
34
35
  attr_reader :ruby
35
36
  attr_reader :valgrind
36
37
  attr_reader :valgrind_options
@@ -57,8 +58,7 @@ module RubyMemcheck
57
58
  output_io: $stderr,
58
59
  filter_all_errors: false
59
60
  )
60
- warn("ruby_memcheck: binary_name is no longer required for configuration") if binary_name
61
-
61
+ @binary_name = binary_name
62
62
  @ruby = ruby
63
63
  @valgrind = valgrind
64
64
  @valgrind_options = valgrind_options
@@ -42,9 +42,19 @@ module RubyMemcheck
42
42
  @loaded_binaries = loaded_features.keep_if do |feat|
43
43
  # Keep only binaries (ignore Ruby files).
44
44
  File.extname(feat) == ".so"
45
- end.freeze
45
+ end
46
+
47
+ if configuration.binary_name
48
+ @loaded_binaries.keep_if do |feat|
49
+ File.basename(feat, ".*") == configuration.binary_name
50
+ end
51
+
52
+ if @loaded_binaries.empty?
53
+ raise "The Ruby program executed never loaded a binary called `#{configuration.binary_name}`"
54
+ end
55
+ end
46
56
 
47
- @loaded_binaries
57
+ @loaded_binaries.freeze
48
58
  end
49
59
 
50
60
  def valgrind_xml_files
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyMemcheck
4
- VERSION = "2.1.2"
4
+ VERSION = "2.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_memcheck
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Zhu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-23 00:00:00.000000000 Z
11
+ date: 2023-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  - !ruby/object:Gem::Version
175
175
  version: '0'
176
176
  requirements: []
177
- rubygems_version: 3.5.0.dev
177
+ rubygems_version: 3.4.10
178
178
  signing_key:
179
179
  specification_version: 4
180
180
  summary: Use Valgrind memcheck without going crazy