ruby_memcheck 2.1.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +3 -1
- data/.gitignore +1 -0
- data/README.md +1 -0
- data/lib/ruby_memcheck/configuration.rb +2 -2
- data/lib/ruby_memcheck/test_task_reporter.rb +12 -2
- data/lib/ruby_memcheck/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b92b8da7d5b0b160d1478860bb1433d609f2d55d131ac0278405888f4d70cd81
|
4
|
+
data.tar.gz: 486f1105d72fd37920366f9185d5d6df8a9c56a78cdbfcfa2998dc1661753875
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0da9f77d836712bb76324e3dec684ecd86bd9a566f34361a32789eb1f5f96ddea5a20ef8899f1821bb270964e7247fc0838eea90102562aedd700631e28e750d
|
7
|
+
data.tar.gz: 5039e14c28b608777a2ff05a2d66a3d17ec37bde48f5279078262a606330f06c3a65d952934f2eeb733adc395e2a0b94ecf3f794e1cb10c3e1d9637983738dca
|
data/.github/workflows/test.yml
CHANGED
@@ -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:
|
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
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
|
-
|
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
|
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
|
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.
|
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-
|
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.
|
177
|
+
rubygems_version: 3.4.10
|
178
178
|
signing_key:
|
179
179
|
specification_version: 4
|
180
180
|
summary: Use Valgrind memcheck without going crazy
|