memprof 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/elf.c +7 -2
- data/ext/extconf.rb +8 -0
- data/memprof.gemspec +1 -1
- 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)) ==
|
101
|
-
|
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