diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-07 09:08:19 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-07 09:08:19 +0000 |
commit | b9f527fd6d2b7bafc10afa32458257242096794e (patch) | |
tree | 143e443cdd72d23cb106197166fe40388306a992 /gc.c | |
parent | 32d3f688ec3490035daba780a1e03f1310a3c43e (diff) |
* gc.c (mark_locations_array): avoid core dump with -O3.
[ruby-dev:25424]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -619,9 +619,11 @@ mark_locations_array(x, n) register VALUE *x; register long n; { + VALUE v; while (n--) { - if (is_pointer_to_heap((void *)*x)) { - gc_mark(*x, 0); + v = *x; + if (is_pointer_to_heap((void *)v)) { + gc_mark(v, 0); } x++; } |