summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-03-01 23:12:06 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-03-01 23:12:06 +0000
commit492490b857d83b512a84e274f9c38bec46e13e51 (patch)
tree64eb15af4d05399a0a7546ab486aa55c357d7c51
parentde2c6e833e118ae80af44c188ed8c6b6ec10111f (diff)
* gc.c (add_heap): heap_slots may overflow. a patch from Stefan
Weil <weil at mail.berlios.de>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--gc.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a49d5d4393..848a4fa7cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Mar 2 08:02:42 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * gc.c (add_heap): heap_slots may overflow. a patch from Stefan
+ Weil <weil at mail.berlios.de>.
+
Wed Mar 1 00:24:31 2006 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* lib/rdoc/parsers/parse_rb.rb (read_escape): could not handle /\^/.
diff --git a/gc.c b/gc.c
index e5ab3523f3..a77f962fcf 100644
--- a/gc.c
+++ b/gc.c
@@ -363,6 +363,7 @@ add_heap()
if (himem < pend) himem = pend;
heaps_used++;
heap_slots *= 1.8;
+ if (heap_slots <= 0) heap_slots = HEAP_MIN_SLOTS;
while (p < pend) {
p->as.free.flags = 0;