memprof 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/ext/elf.c +7 -2
  2. data/ext/extconf.rb +8 -0
  3. data/memprof.gemspec +1 -1
  4. metadata +1 -1
data/ext/elf.c CHANGED
@@ -97,10 +97,15 @@ bin_init()
97
97
  text_segment_len = shdr.sh_size;
98
98
  } else if (shdr.sh_type == SHT_SYMTAB) {
99
99
  symtab_shdr = shdr;
100
- if ((symtab_data = elf_getdata(scn,symtab_data)) == 0 || symtab_data->d_size == 0) {
101
- return;
100
+ if ((symtab_data = elf_getdata(scn,symtab_data)) == NULL || symtab_data->d_size == 0) {
101
+ errx(EX_DATAERR, "ruby has a broken symbol table. Is it stripped? "
102
+ "memprof only works on binaries that are not stripped!\n", filename);
102
103
  }
103
104
  }
104
105
  }
106
+
107
+ if (!symtab_data) {
108
+ errx(EX_DATAERR, "binary is stripped. memprof only works on binaries that are not stripped!", filename);
109
+ }
105
110
  }
106
111
  #endif
data/ext/extconf.rb CHANGED
@@ -1,3 +1,11 @@
1
+ if RUBY_VERSION >= "1.9"
2
+ STDERR.puts "\n\n"
3
+ STDERR.puts "***************************************************************************************"
4
+ STDERR.puts "************************** ruby 1.9 is not supported (yet) =( *************************"
5
+ STDERR.puts "***************************************************************************************"
6
+ exit(1)
7
+ end
8
+
1
9
  require 'mkmf'
2
10
 
3
11
  def add_define(name)
data/memprof.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'memprof'
3
- s.version = '0.1.1'
3
+ s.version = '0.1.2'
4
4
  s.date = '2009-12-10'
5
5
  s.summary = 'Ruby Memory Profiler'
6
6
  s.description = "Ruby memory profiler similar to bleak_house, but without patches to the Ruby VM"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memprof
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
  - Joe Damato