summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-05 16:01:53 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-05 16:01:53 +0000
commit8afd99d671f0aeb4ba8caa2d368b99806ecace6a (patch)
tree608bbe319a63f267e97ddaf9e4dc8bf110aadd93 /gc.c
parentddc2b83b3b0f65e41a462b387fe5b2ac0175ffa7 (diff)
* string.c (rb_str_locktmp): check STR_TMPLOCK flag before
locking. [ruby-dev:24727] * gc.c (gc_mark): stricter GC stack check. * string.c (str_gsub): should have removed rb_str_unlocktmp(str). [ruby-dev:24708] * string.c (str_gsub): string modify check no longer based on tmplock. [ruby-dev:24706] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index 912d2ca..b00c170 100644
--- a/gc.c
+++ b/gc.c
@@ -706,7 +706,7 @@ gc_mark(ptr, lev)
if (obj->as.basic.flags & FL_MARK) return; /* already marked */
obj->as.basic.flags |= FL_MARK;
- if (lev > GC_LEVEL_MAX) {
+ if (lev > GC_LEVEL_MAX || (lev == 0 && ruby_stack_check())) {
if (!mark_stack_overflow) {
if (mark_stack_ptr - mark_stack < MARK_STACK_MAX) {
*mark_stack_ptr = ptr;