gc.c: avoid integer overflow at process exit
This is rather nitpicking but at the moment the process terminates, heap_pages_final_slots overflows.
(lldb) bt
finalize_list(objspace=0x0000000101c09240, zombie=4329149840) + 999 at gc.c:2946 frame #1: 0x000000010026a69e miniruby
rb_gc_call_finalizer_at_exit + 149 at gc.c:3015 frame #3: 0x00000001002272bc miniruby
ruby_cleanup(ex=0) + 4070 at eval.c:238 frame #5: 0x0000000100228785 miniruby
main(argc=2, argv=0x00007fff5fbfdc38) + 124 at main.c:42 frame #7: 0x00007fff9966a5ad libdyld.dylib
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
gc.c: avoid integer overflow at process exit
This is rather nitpicking but at the moment the process terminates,
heap_pages_final_slots overflows.
(lldb) bt
finalize_list(objspace=0x0000000101c09240, zombie=4329149840) + 999 at gc.c:2946 frame #1: 0x000000010026a69e miniruby
rb_objspace_call_finalizer(objspace=0x0000000101c09240) + 7118 at gc.c:3092frame #2: 0x0000000100268ac5 miniruby
rb_gc_call_finalizer_at_exit + 149 at gc.c:3015 frame #3: 0x00000001002272bc miniruby
ruby_finalize_1 + 156 at eval.c:146frame #4: 0x00000001002282b6 miniruby
ruby_cleanup(ex=0) + 4070 at eval.c:238 frame #5: 0x0000000100228785 miniruby
ruby_run_node(n=0x0000000102060ad8) + 85 at eval.c:317frame #6: 0x0000000100000b9c miniruby
main(argc=2, argv=0x00007fff5fbfdc38) + 124 at main.c:42 frame #7: 0x00007fff9966a5ad libdyld.dylib
start + 1frame #8: 0x00007fff9966a5ad libdyld.dylib`start + 1
(lldb) p objspace->heap_pages
(rb_objspace::(anonymous struct)) $0 = {
sorted = 0x0000000101c070b0
allocated_pages = 24
allocatable_pages = 0
sorted_length = 24
range = {
[0] = 0x0000000102020028
[1] = 0x00000001020dbfd0
}
freeable_pages = 0
final_slots = 0
deferred_final = 4329149840
}
(lldb)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e