bleak_house 3.7.1 → 4.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.
- data.tar.gz.sig +0 -0
- data/CHANGELOG +2 -0
- data/Manifest +12 -66
- data/README +57 -20
- data/TODO +2 -2
- data/bin/bleak +1 -14
- data/bleak_house.gemspec +10 -16
- data/ext/{bleak_house/logger/build_ruby.rb → build_ruby.rb} +17 -7
- data/ext/build_snapshot.rb +4 -0
- data/ext/{bleak_house/logger/extconf.rb → extconf.rb} +1 -1
- data/ext/snapshot.c +157 -0
- data/ext/{bleak_house/logger/snapshot.h → snapshot.h} +2 -45
- data/lib/bleak_house.rb +5 -5
- data/lib/bleak_house/analyzer.rb +24 -2
- data/lib/bleak_house/hook.rb +25 -0
- data/ruby/bleak_house.patch +358 -0
- data/ruby/configure.patch +242 -0
- data/ruby/gc.patch +116 -0
- data/ruby/ruby-1.8.6-p114.tar.bz2 +0 -0
- data/ruby/valgrind.patch +136 -0
- data/test/benchmark/bench.rb +16 -0
- data/test/unit/test_bleak_house.rb +26 -27
- metadata +22 -86
- metadata.gz.sig +0 -0
- data/ext/bleak_house/logger/build_logger.rb +0 -3
- data/ext/bleak_house/logger/snapshot.c +0 -204
- data/init.rb +0 -3
- data/install.rb +0 -2
- data/lib/bleak_house/analyzer/analyzer.rb +0 -358
- data/lib/bleak_house/logger.rb +0 -2
- data/lib/bleak_house/logger/source.rb +0 -21
- data/lib/bleak_house/rails.rb +0 -6
- data/lib/bleak_house/rails/action_controller.rb +0 -17
- data/lib/bleak_house/rails/bleak_house.rb +0 -62
- data/lib/bleak_house/rails/dispatcher.rb +0 -36
- data/lib/bleak_house/support/core_extensions.rb +0 -61
- data/ruby/gc.c.patch +0 -27
- data/ruby/parse.y.patch +0 -16
- data/ruby/ruby-1.8.6-p110.tar.bz2 +0 -0
- data/test/integration/app/README +0 -203
- data/test/integration/app/Rakefile +0 -10
- data/test/integration/app/app/controllers/application.rb +0 -12
- data/test/integration/app/app/controllers/items_controller.rb +0 -6
- data/test/integration/app/app/helpers/application_helper.rb +0 -3
- data/test/integration/app/app/helpers/items_helper.rb +0 -2
- data/test/integration/app/app/views/items/index.rhtml +0 -2
- data/test/integration/app/config/boot.rb +0 -109
- data/test/integration/app/config/database.yml +0 -19
- data/test/integration/app/config/environment.rb +0 -15
- data/test/integration/app/config/environments/development.rb +0 -18
- data/test/integration/app/config/environments/production.rb +0 -19
- data/test/integration/app/config/environments/test.rb +0 -22
- data/test/integration/app/config/initializers/inflections.rb +0 -10
- data/test/integration/app/config/initializers/mime_types.rb +0 -5
- data/test/integration/app/config/routes.rb +0 -35
- data/test/integration/app/doc/README_FOR_APP +0 -2
- data/test/integration/app/public/404.html +0 -30
- data/test/integration/app/public/422.html +0 -30
- data/test/integration/app/public/500.html +0 -30
- data/test/integration/app/public/dispatch.cgi +0 -10
- data/test/integration/app/public/dispatch.fcgi +0 -24
- data/test/integration/app/public/dispatch.rb +0 -10
- data/test/integration/app/public/favicon.ico +0 -0
- data/test/integration/app/public/images/rails.png +0 -0
- data/test/integration/app/public/javascripts/application.js +0 -2
- data/test/integration/app/public/javascripts/controls.js +0 -963
- data/test/integration/app/public/javascripts/dragdrop.js +0 -972
- data/test/integration/app/public/javascripts/effects.js +0 -1120
- data/test/integration/app/public/javascripts/prototype.js +0 -4225
- data/test/integration/app/public/robots.txt +0 -5
- data/test/integration/app/script/about +0 -3
- data/test/integration/app/script/console +0 -3
- data/test/integration/app/script/destroy +0 -3
- data/test/integration/app/script/generate +0 -3
- data/test/integration/app/script/performance/benchmarker +0 -3
- data/test/integration/app/script/performance/profiler +0 -3
- data/test/integration/app/script/performance/request +0 -3
- data/test/integration/app/script/plugin +0 -3
- data/test/integration/app/script/process/inspector +0 -3
- data/test/integration/app/script/process/reaper +0 -3
- data/test/integration/app/script/process/spawner +0 -3
- data/test/integration/app/script/runner +0 -3
- data/test/integration/app/script/server +0 -3
- data/test/integration/app/test/functional/items_controller_test.rb +0 -8
- data/test/integration/app/test/test_helper.rb +0 -38
- data/test/integration/server_test.rb +0 -93
- data/test/misc/direct.rb +0 -13
@@ -0,0 +1,242 @@
|
|
1
|
+
Index: configure
|
2
|
+
===================================================================
|
3
|
+
--- configure (revision 6446)
|
4
|
+
+++ configure (working copy)
|
5
|
+
@@ -720,6 +720,7 @@
|
6
|
+
ARCHFILE
|
7
|
+
RDOCTARGET
|
8
|
+
XCFLAGS
|
9
|
+
+VALGRIND_CFLAGS
|
10
|
+
XLDFLAGS
|
11
|
+
LIBRUBY_LDSHARED
|
12
|
+
LIBRUBY_DLDFLAGS
|
13
|
+
@@ -1356,6 +1357,7 @@
|
14
|
+
--enable-pthread use pthread library.
|
15
|
+
--disable-fastthread do not use the fastthread mutex
|
16
|
+
--enable-setreuid use setreuid()/setregid() according to need even if obsolete.
|
17
|
+
+ --enable-valgrind use valgrind support
|
18
|
+
--disable-rpath embed run path into extension libraries.
|
19
|
+
--enable-shared build a shared library for Ruby.
|
20
|
+
--enable-install-doc build and install rdoc indexes during install
|
21
|
+
@@ -12988,13 +12990,11 @@
|
22
|
+
cat confdefs.h >>conftest.$ac_ext
|
23
|
+
cat >>conftest.$ac_ext <<_ACEOF
|
24
|
+
/* end confdefs.h. */
|
25
|
+
-#include <sys/types.h> /* for off_t */
|
26
|
+
- #include <stdio.h>
|
27
|
+
+#include <stdio.h>
|
28
|
+
int
|
29
|
+
main ()
|
30
|
+
{
|
31
|
+
-int (*fp) (FILE *, off_t, int) = fseeko;
|
32
|
+
- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
|
33
|
+
+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
|
34
|
+
;
|
35
|
+
return 0;
|
36
|
+
}
|
37
|
+
@@ -13034,13 +13034,11 @@
|
38
|
+
cat >>conftest.$ac_ext <<_ACEOF
|
39
|
+
/* end confdefs.h. */
|
40
|
+
#define _LARGEFILE_SOURCE 1
|
41
|
+
-#include <sys/types.h> /* for off_t */
|
42
|
+
- #include <stdio.h>
|
43
|
+
+#include <stdio.h>
|
44
|
+
int
|
45
|
+
main ()
|
46
|
+
{
|
47
|
+
-int (*fp) (FILE *, off_t, int) = fseeko;
|
48
|
+
- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
|
49
|
+
+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
|
50
|
+
;
|
51
|
+
return 0;
|
52
|
+
}
|
53
|
+
@@ -15768,6 +15766,172 @@
|
54
|
+
fi
|
55
|
+
fi
|
56
|
+
|
57
|
+
+# Check whether --enable-valgrind was given.
|
58
|
+
+if test "${enable_valgrind+set}" = set; then
|
59
|
+
+ enableval=$enable_valgrind; want_valgrind=$enableval
|
60
|
+
+else
|
61
|
+
+ want_valgrind=auto
|
62
|
+
+fi
|
63
|
+
+
|
64
|
+
+
|
65
|
+
+if test x"$want_valgrind" != xno; then
|
66
|
+
+
|
67
|
+
+for ac_header in valgrind/memcheck.h
|
68
|
+
+do
|
69
|
+
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
70
|
+
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
|
71
|
+
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
|
72
|
+
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
|
73
|
+
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
|
74
|
+
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
75
|
+
+fi
|
76
|
+
+ac_res=`eval echo '${'$as_ac_Header'}'`
|
77
|
+
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
|
78
|
+
+echo "${ECHO_T}$ac_res" >&6; }
|
79
|
+
+else
|
80
|
+
+ # Is the header compilable?
|
81
|
+
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
|
82
|
+
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
|
83
|
+
+cat >conftest.$ac_ext <<_ACEOF
|
84
|
+
+/* confdefs.h. */
|
85
|
+
+_ACEOF
|
86
|
+
+cat confdefs.h >>conftest.$ac_ext
|
87
|
+
+cat >>conftest.$ac_ext <<_ACEOF
|
88
|
+
+/* end confdefs.h. */
|
89
|
+
+$ac_includes_default
|
90
|
+
+#include <$ac_header>
|
91
|
+
+_ACEOF
|
92
|
+
+rm -f conftest.$ac_objext
|
93
|
+
+if { (ac_try="$ac_compile"
|
94
|
+
+case "(($ac_try" in
|
95
|
+
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
96
|
+
+ *) ac_try_echo=$ac_try;;
|
97
|
+
+esac
|
98
|
+
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
99
|
+
+ (eval "$ac_compile") 2>conftest.er1
|
100
|
+
+ ac_status=$?
|
101
|
+
+ grep -v '^ *+' conftest.er1 >conftest.err
|
102
|
+
+ rm -f conftest.er1
|
103
|
+
+ cat conftest.err >&5
|
104
|
+
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
105
|
+
+ (exit $ac_status); } && {
|
106
|
+
+ test -z "$ac_c_werror_flag" ||
|
107
|
+
+ test ! -s conftest.err
|
108
|
+
+ } && test -s conftest.$ac_objext; then
|
109
|
+
+ ac_header_compiler=yes
|
110
|
+
+else
|
111
|
+
+ echo "$as_me: failed program was:" >&5
|
112
|
+
+sed 's/^/| /' conftest.$ac_ext >&5
|
113
|
+
+
|
114
|
+
+ ac_header_compiler=no
|
115
|
+
+fi
|
116
|
+
+
|
117
|
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
118
|
+
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
|
119
|
+
+echo "${ECHO_T}$ac_header_compiler" >&6; }
|
120
|
+
+
|
121
|
+
+# Is the header present?
|
122
|
+
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
|
123
|
+
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
|
124
|
+
+cat >conftest.$ac_ext <<_ACEOF
|
125
|
+
+/* confdefs.h. */
|
126
|
+
+_ACEOF
|
127
|
+
+cat confdefs.h >>conftest.$ac_ext
|
128
|
+
+cat >>conftest.$ac_ext <<_ACEOF
|
129
|
+
+/* end confdefs.h. */
|
130
|
+
+#include <$ac_header>
|
131
|
+
+_ACEOF
|
132
|
+
+if { (ac_try="$ac_cpp conftest.$ac_ext"
|
133
|
+
+case "(($ac_try" in
|
134
|
+
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
135
|
+
+ *) ac_try_echo=$ac_try;;
|
136
|
+
+esac
|
137
|
+
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
138
|
+
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
|
139
|
+
+ ac_status=$?
|
140
|
+
+ grep -v '^ *+' conftest.er1 >conftest.err
|
141
|
+
+ rm -f conftest.er1
|
142
|
+
+ cat conftest.err >&5
|
143
|
+
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
144
|
+
+ (exit $ac_status); } >/dev/null && {
|
145
|
+
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
|
146
|
+
+ test ! -s conftest.err
|
147
|
+
+ }; then
|
148
|
+
+ ac_header_preproc=yes
|
149
|
+
+else
|
150
|
+
+ echo "$as_me: failed program was:" >&5
|
151
|
+
+sed 's/^/| /' conftest.$ac_ext >&5
|
152
|
+
+
|
153
|
+
+ ac_header_preproc=no
|
154
|
+
+fi
|
155
|
+
+
|
156
|
+
+rm -f conftest.err conftest.$ac_ext
|
157
|
+
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
|
158
|
+
+echo "${ECHO_T}$ac_header_preproc" >&6; }
|
159
|
+
+
|
160
|
+
+# So? What about this header?
|
161
|
+
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
|
162
|
+
+ yes:no: )
|
163
|
+
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
|
164
|
+
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
165
|
+
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
|
166
|
+
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
|
167
|
+
+ ac_header_preproc=yes
|
168
|
+
+ ;;
|
169
|
+
+ no:yes:* )
|
170
|
+
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
|
171
|
+
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
|
172
|
+
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
|
173
|
+
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
|
174
|
+
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
|
175
|
+
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
|
176
|
+
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
|
177
|
+
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
|
178
|
+
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
|
179
|
+
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
|
180
|
+
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
|
181
|
+
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
|
182
|
+
+
|
183
|
+
+ ;;
|
184
|
+
+esac
|
185
|
+
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
|
186
|
+
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
|
187
|
+
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
|
188
|
+
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
189
|
+
+else
|
190
|
+
+ eval "$as_ac_Header=\$ac_header_preproc"
|
191
|
+
+fi
|
192
|
+
+ac_res=`eval echo '${'$as_ac_Header'}'`
|
193
|
+
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
|
194
|
+
+echo "${ECHO_T}$ac_res" >&6; }
|
195
|
+
+
|
196
|
+
+fi
|
197
|
+
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
|
198
|
+
+ cat >>confdefs.h <<_ACEOF
|
199
|
+
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
200
|
+
+_ACEOF
|
201
|
+
+ have_valgrind=yes
|
202
|
+
+else
|
203
|
+
+ have_valgrind=no
|
204
|
+
+fi
|
205
|
+
+
|
206
|
+
+done
|
207
|
+
+
|
208
|
+
+ if test x"$have_valgrind" = xyes; then
|
209
|
+
+ cat >>confdefs.h <<\_ACEOF
|
210
|
+
+#define HAVE_VALGRIND 1
|
211
|
+
+_ACEOF
|
212
|
+
+
|
213
|
+
+ VALGRIND_CFLAGS="";
|
214
|
+
+ elif test x"$want_valgrind" = xyes -a x"$have_valgrind" = xno; then
|
215
|
+
+ { { echo "$as_me:$LINENO: error: valgrind support requested but valgrind not found" >&5
|
216
|
+
+echo "$as_me: error: valgrind support requested but valgrind not found" >&2;}
|
217
|
+
+ { (exit 1); exit 1; }; }
|
218
|
+
+ else
|
219
|
+
+ VALGRIND_CFLAGS="";
|
220
|
+
+ fi
|
221
|
+
+fi
|
222
|
+
+
|
223
|
+
DEFAULT_KCODE="KCODE_NONE"
|
224
|
+
|
225
|
+
|
226
|
+
@@ -17854,6 +18018,7 @@
|
227
|
+
ARCHFILE!$ARCHFILE$ac_delim
|
228
|
+
RDOCTARGET!$RDOCTARGET$ac_delim
|
229
|
+
XCFLAGS!$XCFLAGS$ac_delim
|
230
|
+
+VALGRIND_CFLAGS!$VALGRIND_CFLAGS$ac_delim
|
231
|
+
XLDFLAGS!$XLDFLAGS$ac_delim
|
232
|
+
LIBRUBY_LDSHARED!$LIBRUBY_LDSHARED$ac_delim
|
233
|
+
LIBRUBY_DLDFLAGS!$LIBRUBY_DLDFLAGS$ac_delim
|
234
|
+
@@ -17887,7 +18052,7 @@
|
235
|
+
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
236
|
+
_ACEOF
|
237
|
+
|
238
|
+
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 42; then
|
239
|
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 43; then
|
240
|
+
break
|
241
|
+
elif $ac_last_try; then
|
242
|
+
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
data/ruby/gc.patch
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
Index: parse.y
|
2
|
+
===================================================================
|
3
|
+
--- parse.y (revision 6446)
|
4
|
+
+++ parse.y (working copy)
|
5
|
+
@@ -6168,6 +6168,11 @@
|
6
|
+
* :wait2, :$>]
|
7
|
+
*/
|
8
|
+
|
9
|
+
+struct st_table *
|
10
|
+
+rb_parse_sym_tbl() {
|
11
|
+
+ return sym_tbl;
|
12
|
+
+}
|
13
|
+
+
|
14
|
+
VALUE
|
15
|
+
rb_sym_all_symbols()
|
16
|
+
{
|
17
|
+
Index: parse.c
|
18
|
+
===================================================================
|
19
|
+
--- parse.c (revision 6446)
|
20
|
+
+++ parse.c (working copy)
|
21
|
+
@@ -11157,6 +11157,11 @@
|
22
|
+
* :wait2, :$>]
|
23
|
+
*/
|
24
|
+
|
25
|
+
+struct st_table *
|
26
|
+
+rb_parse_sym_tbl() {
|
27
|
+
+ return sym_tbl;
|
28
|
+
+}
|
29
|
+
+
|
30
|
+
VALUE
|
31
|
+
rb_sym_all_symbols()
|
32
|
+
{
|
33
|
+
Index: gc.c
|
34
|
+
===================================================================
|
35
|
+
--- gc.c (revision 6446)
|
36
|
+
+++ gc.c (working copy)
|
37
|
+
@@ -260,8 +260,6 @@
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
-#undef GC_DEBUG
|
42
|
+
-
|
43
|
+
void
|
44
|
+
rb_global_variable(var)
|
45
|
+
VALUE *var;
|
46
|
+
@@ -296,10 +294,8 @@
|
47
|
+
struct RVarmap varmap;
|
48
|
+
struct SCOPE scope;
|
49
|
+
} as;
|
50
|
+
-#ifdef GC_DEBUG
|
51
|
+
char *file;
|
52
|
+
int line;
|
53
|
+
-#endif
|
54
|
+
} RVALUE;
|
55
|
+
|
56
|
+
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CYGWIN__)
|
57
|
+
@@ -318,6 +314,22 @@
|
58
|
+
static int heaps_length = 0;
|
59
|
+
static int heaps_used = 0;
|
60
|
+
|
61
|
+
+struct heaps_slot *
|
62
|
+
+rb_gc_heap_slots()
|
63
|
+
+{
|
64
|
+
+ return heaps;
|
65
|
+
+}
|
66
|
+
+
|
67
|
+
+int
|
68
|
+
+rb_gc_heaps_used() {
|
69
|
+
+ return heaps_used;
|
70
|
+
+}
|
71
|
+
+
|
72
|
+
+int
|
73
|
+
+rb_gc_heaps_length() {
|
74
|
+
+ return heaps_length;
|
75
|
+
+}
|
76
|
+
+
|
77
|
+
#define HEAP_MIN_SLOTS 10000
|
78
|
+
static int heap_slots = HEAP_MIN_SLOTS;
|
79
|
+
|
80
|
+
@@ -386,16 +398,19 @@
|
81
|
+
rb_newobj()
|
82
|
+
{
|
83
|
+
VALUE obj;
|
84
|
+
-
|
85
|
+
+
|
86
|
+
if (!freelist) garbage_collect();
|
87
|
+
|
88
|
+
obj = (VALUE)freelist;
|
89
|
+
freelist = freelist->as.free.next;
|
90
|
+
- MEMZERO((void*)obj, RVALUE, 1);
|
91
|
+
-#ifdef GC_DEBUG
|
92
|
+
- RANY(obj)->file = ruby_sourcefile;
|
93
|
+
- RANY(obj)->line = ruby_sourceline;
|
94
|
+
-#endif
|
95
|
+
+
|
96
|
+
+ MEMZERO((void*)obj, RVALUE, 1);
|
97
|
+
+
|
98
|
+
+ if (ruby_current_node && ruby_current_node->nd_file) {
|
99
|
+
+ RANY(obj)->file = ruby_current_node->nd_file;
|
100
|
+
+ RANY(obj)->line = nd_line(ruby_current_node);
|
101
|
+
+ }
|
102
|
+
+
|
103
|
+
return obj;
|
104
|
+
}
|
105
|
+
|
106
|
+
@@ -732,7 +747,10 @@
|
107
|
+
if (rb_special_const_p(ptr)) return; /* special const not marked */
|
108
|
+
if (obj->as.basic.flags == 0) return; /* free cell */
|
109
|
+
if (obj->as.basic.flags & FL_MARK) return; /* already marked */
|
110
|
+
+
|
111
|
+
obj->as.basic.flags |= FL_MARK;
|
112
|
+
+ /* mark our new reference point for sourcefile objects */
|
113
|
+
+ mark_source_filename(RANY(obj)->file);
|
114
|
+
|
115
|
+
if (lev > GC_LEVEL_MAX || (lev == 0 && ruby_stack_check())) {
|
116
|
+
if (!mark_stack_overflow) {
|
Binary file
|
data/ruby/valgrind.patch
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
Index: Makefile.in
|
2
|
+
===================================================================
|
3
|
+
--- Makefile.in (revision 6439)
|
4
|
+
+++ Makefile.in (working copy)
|
5
|
+
@@ -34,7 +34,7 @@
|
6
|
+
|
7
|
+
empty =
|
8
|
+
OUTFLAG = @OUTFLAG@$(empty)
|
9
|
+
-CFLAGS = @CFLAGS@ @XCFLAGS@ @ARCH_FLAG@
|
10
|
+
+CFLAGS = @CFLAGS@ @XCFLAGS@ @ARCH_FLAG@ @VALGRIND_CFLAGS@
|
11
|
+
CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@
|
12
|
+
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
|
13
|
+
EXTLDFLAGS =
|
14
|
+
Index: configure.in
|
15
|
+
===================================================================
|
16
|
+
--- configure.in (revision 6439)
|
17
|
+
+++ configure.in (working copy)
|
18
|
+
@@ -895,6 +895,22 @@
|
19
|
+
fi
|
20
|
+
fi
|
21
|
+
|
22
|
+
+AC_ARG_ENABLE(valgrind,
|
23
|
+
+ [ --enable-valgrind use valgrind support],
|
24
|
+
+ [want_valgrind=$enableval], [want_valgrind=auto])
|
25
|
+
+
|
26
|
+
+if test x"$want_valgrind" != xno; then
|
27
|
+
+ AC_CHECK_HEADERS(valgrind/memcheck.h, have_valgrind=yes, have_valgrind=no)
|
28
|
+
+ if test x"$have_valgrind" = xyes; then
|
29
|
+
+ AC_DEFINE(HAVE_VALGRIND)
|
30
|
+
+ VALGRIND_CFLAGS="";
|
31
|
+
+ elif test x"$want_valgrind" = xyes -a x"$have_valgrind" = xno; then
|
32
|
+
+ AC_MSG_ERROR(valgrind support requested but valgrind not found)
|
33
|
+
+ else
|
34
|
+
+ VALGRIND_CFLAGS="";
|
35
|
+
+ fi
|
36
|
+
+fi
|
37
|
+
+
|
38
|
+
dnl default value for $KANJI
|
39
|
+
DEFAULT_KCODE="KCODE_NONE"
|
40
|
+
|
41
|
+
@@ -1504,6 +1520,7 @@
|
42
|
+
esac
|
43
|
+
|
44
|
+
AC_SUBST(XCFLAGS)dnl
|
45
|
+
+AC_SUBST(VALGRIND_CFLAGS)dnl
|
46
|
+
AC_SUBST(XLDFLAGS)dnl
|
47
|
+
AC_SUBST(LIBRUBY_LDSHARED)
|
48
|
+
AC_SUBST(LIBRUBY_DLDFLAGS)
|
49
|
+
Index: version.h
|
50
|
+
===================================================================
|
51
|
+
--- version.h (revision 6439)
|
52
|
+
+++ version.h (working copy)
|
53
|
+
@@ -2,7 +2,7 @@
|
54
|
+
#define RUBY_RELEASE_DATE "2008-03-03"
|
55
|
+
#define RUBY_VERSION_CODE 186
|
56
|
+
#define RUBY_RELEASE_CODE 20080303
|
57
|
+
-#define RUBY_PATCHLEVEL 114
|
58
|
+
+#define RUBY_PATCHLEVEL 901
|
59
|
+
|
60
|
+
#define RUBY_VERSION_MAJOR 1
|
61
|
+
#define RUBY_VERSION_MINOR 8
|
62
|
+
Index: eval.c
|
63
|
+
===================================================================
|
64
|
+
--- eval.c (revision 6439)
|
65
|
+
+++ eval.c (working copy)
|
66
|
+
@@ -28,6 +28,12 @@
|
67
|
+
#define EXIT_FAILURE 1
|
68
|
+
#endif
|
69
|
+
|
70
|
+
+#ifdef HAVE_VALGRIND
|
71
|
+
+#include <valgrind/memcheck.h>
|
72
|
+
+#else
|
73
|
+
+#define VALGRIND_MAKE_MEM_DEFINED(p, n) /* empty */
|
74
|
+
+#endif
|
75
|
+
+
|
76
|
+
#include <stdio.h>
|
77
|
+
|
78
|
+
#include "st.h"
|
79
|
+
@@ -5225,6 +5231,9 @@
|
80
|
+
int pcall;
|
81
|
+
{
|
82
|
+
ruby_current_node = lhs;
|
83
|
+
+
|
84
|
+
+ VALGRIND_MAKE_MEM_DEFINED(&val, sizeof(val));
|
85
|
+
+
|
86
|
+
if (val == Qundef) {
|
87
|
+
rb_warning("assigning void value");
|
88
|
+
val = Qnil;
|
89
|
+
Index: gc.c
|
90
|
+
===================================================================
|
91
|
+
--- gc.c (revision 6439)
|
92
|
+
+++ gc.c (working copy)
|
93
|
+
@@ -30,6 +30,12 @@
|
94
|
+
#include <sys/resource.h>
|
95
|
+
#endif
|
96
|
+
|
97
|
+
+#ifdef HAVE_VALGRIND
|
98
|
+
+#include <valgrind/memcheck.h>
|
99
|
+
+#else
|
100
|
+
+#define VALGRIND_MAKE_MEM_DEFINED(p, n) /* empty */
|
101
|
+
+#endif
|
102
|
+
+
|
103
|
+
#if defined _WIN32 || defined __CYGWIN__
|
104
|
+
#include <windows.h>
|
105
|
+
#endif
|
106
|
+
@@ -93,6 +99,9 @@
|
107
|
+
{
|
108
|
+
void *mem;
|
109
|
+
|
110
|
+
+ VALGRIND_MAKE_MEM_DEFINED(&malloc_increase, sizeof(malloc_increase));
|
111
|
+
+ VALGRIND_MAKE_MEM_DEFINED(&malloc_limit, sizeof(malloc_limit));
|
112
|
+
+
|
113
|
+
if (size < 0) {
|
114
|
+
rb_raise(rb_eNoMemError, "negative allocation size (or too big)");
|
115
|
+
}
|
116
|
+
@@ -623,6 +632,9 @@
|
117
|
+
register long n;
|
118
|
+
{
|
119
|
+
VALUE v;
|
120
|
+
+
|
121
|
+
+ VALGRIND_MAKE_MEM_DEFINED(x, sizeof(*x) * n);
|
122
|
+
+
|
123
|
+
while (n--) {
|
124
|
+
v = *x;
|
125
|
+
if (is_pointer_to_heap((void *)v)) {
|
126
|
+
@@ -713,7 +725,10 @@
|
127
|
+
{
|
128
|
+
register RVALUE *obj;
|
129
|
+
|
130
|
+
+ VALGRIND_MAKE_MEM_DEFINED(&ptr, sizeof(ptr));
|
131
|
+
obj = RANY(ptr);
|
132
|
+
+ VALGRIND_MAKE_MEM_DEFINED(obj, sizeof(*obj));
|
133
|
+
+
|
134
|
+
if (rb_special_const_p(ptr)) return; /* special const not marked */
|
135
|
+
if (obj->as.basic.flags == 0) return; /* free cell */
|
136
|
+
if (obj->as.basic.flags & FL_MARK) return; /* already marked */
|