stack_frames 0.1.1 → 0.1.2

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: c404f9278a85b107921a9ecb3fce96b487843140922499441eaf01f6615955c1
4
- data.tar.gz: daf9693bff25c25e07c0cbf169b04f56e3b716888ae3c501a031e997e275963a
3
+ metadata.gz: 18a74c610d900bb78ed82f751d93c498d8c573f5a95cfc3984597abc504bffa0
4
+ data.tar.gz: ebff4be1938e844e1434e1320be9dba6f04376e4d451354e2245b30d351aacef
5
5
  SHA512:
6
- metadata.gz: c62e52062931e7e5e288a30bfa9524584146e198f2f5f9466f9e9d1fc8ade8cc8d2b2e70c108de426844036f25a3fa516d575fae7f3ba38529c2a463f07823ed
7
- data.tar.gz: ce7b41fd1c8ca4eccba5535ab3efaef3d29e412d7a55bb53fdac3b634354dcf56d5928e4627160d048fedf8a15db39b5f67666a0d7566c00d16de790debd729c
6
+ metadata.gz: 45279be5693b045b5ba53e1461bf92dc1df2db2b9ac4f357d2b6ee81899373287606050de8d72558be1b7cbbb0a141762f5c597c81375421584afcf0ac383e6c
7
+ data.tar.gz: 4620f5ff6607947f6f73e2940562e69101b40093a539ae56e0d7c0b32c2d11515056579d4662570d3bb002da6646b74145f02a6233d6dd758e11bd5de5d672c7
@@ -22,3 +22,14 @@ jobs:
22
22
  ruby-version: ${{ matrix.ruby }}
23
23
  bundler-cache: true
24
24
  - run: bundle exec rake
25
+
26
+ valgrind:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v2
30
+ - uses: ruby/setup-ruby@v1
31
+ with:
32
+ ruby-version: '3.1'
33
+ bundler-cache: true
34
+ - run: sudo apt-get install -y valgrind
35
+ - run: bundle exec rake test:valgrind
@@ -0,0 +1,22 @@
1
+ name: Contributor License Agreement (CLA)
2
+
3
+ on:
4
+ pull_request_target:
5
+ types: [opened, synchronize]
6
+ issue_comment:
7
+ types: [created]
8
+
9
+ jobs:
10
+ cla:
11
+ runs-on: ubuntu-latest
12
+ if: |
13
+ (github.event.issue.pull_request
14
+ && !github.event.issue.pull_request.merged_at
15
+ && contains(github.event.comment.body, 'signed')
16
+ )
17
+ || (github.event.pull_request && !github.event.pull_request.merged)
18
+ steps:
19
+ - uses: Shopify/shopify-cla-action@v1
20
+ with:
21
+ github-token: ${{ secrets.GITHUB_TOKEN }}
22
+ cla-token: ${{ secrets.CLA_TOKEN }}
data/Rakefile CHANGED
@@ -1,6 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rake/testtask"
3
3
  require 'rake/extensiontask'
4
+ require "ruby_memcheck"
5
+
6
+ RubyMemcheck.config(binary_name: "stack_frames")
4
7
 
5
8
  ENV['STACK_FRAMES_DEV'] = '1'
6
9
 
@@ -8,10 +11,14 @@ Rake::ExtensionTask.new("stack_frames") do |ext|
8
11
  ext.lib_dir = 'lib/stack_frames'
9
12
  end
10
13
 
11
- Rake::TestTask.new(test: :compile) do |t|
14
+ test_config = lambda do |t|
12
15
  t.libs << "test"
13
16
  t.libs << "lib"
14
17
  t.test_files = FileList["test/**/*_test.rb"]
15
18
  end
19
+ Rake::TestTask.new(test: :compile, &test_config)
20
+ namespace :test do
21
+ RubyMemcheck::TestTask.new(valgrind: :compile, &test_config)
22
+ end
16
23
 
17
24
  task :default => :test
@@ -14,10 +14,6 @@ static void frame_mark(void *ptr)
14
14
  rb_gc_mark(frame->buffer);
15
15
  }
16
16
 
17
- static void frame_free(void *ptr)
18
- {
19
- }
20
-
21
17
  static size_t frame_memsize(const void *ptr)
22
18
  {
23
19
  return sizeof(frame_t);
@@ -25,7 +21,7 @@ static size_t frame_memsize(const void *ptr)
25
21
 
26
22
  const rb_data_type_t frame_data_type = {
27
23
  "stack_frames_frame",
28
- { frame_mark, frame_free, frame_memsize, },
24
+ { frame_mark, RUBY_DEFAULT_FREE, frame_memsize, },
29
25
  NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
30
26
  };
31
27
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StackFrames
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
data/stack_frames.gemspec CHANGED
@@ -31,4 +31,5 @@ Gem::Specification.new do |spec|
31
31
  spec.add_development_dependency 'rake-compiler', '~> 1.0'
32
32
  spec.add_development_dependency "minitest", "~> 5.0"
33
33
  spec.add_development_dependency "stackprof", "~> 0.2.13"
34
+ spec.add_development_dependency "ruby_memcheck"
34
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stack_frames
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Thacker-Smith
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-04 00:00:00.000000000 Z
11
+ date: 2022-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.2.13
83
+ - !ruby/object:Gem::Dependency
84
+ name: ruby_memcheck
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  description:
84
98
  email:
85
99
  - gems@shopify.com
@@ -88,8 +102,8 @@ extensions:
88
102
  - ext/stack_frames/extconf.rb
89
103
  extra_rdoc_files: []
90
104
  files:
91
- - ".github/probots.yml"
92
105
  - ".github/workflows/ci.yml"
106
+ - ".github/workflows/cla.yml"
93
107
  - ".gitignore"
94
108
  - CODE_OF_CONDUCT.md
95
109
  - CONTRIBUTING.md
@@ -131,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
145
  - !ruby/object:Gem::Version
132
146
  version: '0'
133
147
  requirements: []
134
- rubygems_version: 3.2.20
148
+ rubygems_version: 3.3.3
135
149
  signing_key:
136
150
  specification_version: 4
137
151
  summary: Zero allocation backtraces using MRI's profile frames API
data/.github/probots.yml DELETED
@@ -1,3 +0,0 @@
1
- # .github/probots.yml
2
- enabled:
3
- - cla