* gc.c (mark_locations_array): avoid core dump with -O3.
[ruby-dev:25424] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d35f410761
commit
db4cb5545b
@ -1,3 +1,8 @@
|
|||||||
|
Fri Jan 7 18:03:35 2005 Tanaka Akira <akr@m17n.org>
|
||||||
|
|
||||||
|
* gc.c (mark_locations_array): avoid core dump with -O3.
|
||||||
|
[ruby-dev:25424]
|
||||||
|
|
||||||
Thu Jan 6 20:29:18 2005 NAKAMURA Usaku <usa@ruby-lang.org>
|
Thu Jan 6 20:29:18 2005 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* ext/zlib/zlib.c (zstream_end): should return value.
|
* ext/zlib/zlib.c (zstream_end): should return value.
|
||||||
|
6
gc.c
6
gc.c
@ -617,9 +617,11 @@ mark_locations_array(x, n)
|
|||||||
register VALUE *x;
|
register VALUE *x;
|
||||||
register long n;
|
register long n;
|
||||||
{
|
{
|
||||||
|
VALUE v;
|
||||||
while (n--) {
|
while (n--) {
|
||||||
if (is_pointer_to_heap((void *)*x)) {
|
v = *x;
|
||||||
gc_mark(*x, 0);
|
if (is_pointer_to_heap((void *)v)) {
|
||||||
|
gc_mark(v, 0);
|
||||||
}
|
}
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user