[#18121] [Ruby 1.8.7 - Bug #405] (Open) ssl.rb:31: [BUG] Bus Error — Anonymous <redmine@...>

Issue #405 has been reported by Anonymous.

14 messages 2008/08/04

[#18130] Re: New array methods cycle, choice, shuffle (plus bug in cycle) — Brian Candler <B.Candler@...>

> Seriously though... Array.first is a noun.

10 messages 2008/08/05

[#18319] NEW Command: absolute_path() -- — "C.E. Thornton" <admin@...>

Core,

14 messages 2008/08/16
[#18321] Re: NEW Command: absolute_path() -- — Yukihiro Matsumoto <matz@...> 2008/08/18

Hi,

[#18381] [Bug #496] DRb.start_service(nil) is very slow — Hongli Lai <redmine@...>

Bug #496: DRb.start_service(nil) is very slow

11 messages 2008/08/25

[ruby-core:18050] Re: finalizers in 1.8 no longer run after gc_sweep()

From: Nobuyoshi Nakada <nobu@...>
Date: 2008-08-01 08:59:00 UTC
List: ruby-core #18050
Hi,

At Fri, 1 Aug 2008 16:14:45 +0900,
Eric Hodel wrote in [ruby-core:18045]:
> 
> This was brought up by Roger Pack in [ruby-talk:309757].
> 
> In 1.6, a finalizer would run immediately after the garbage collector  
> collected an object. Now they are no longer run until the process  
> terminates or an explicit GC.start is run:

It is problematic.

> I would expect the finalized line to print before the collected line  
> at all times.  This is no longer true.

But your expectation is based on incorrect assumption.
Finalizers will run at an arbitrary time after the object was
collected and before the program terminates, not soon.


Index: rubysig.h
===================================================================
--- rubysig.h	(revision 18303)
+++ rubysig.h	(working copy)
@@ -80,8 +80,10 @@ void rb_trap_restore_mask _((void));
 RUBY_EXTERN int rb_thread_critical;
 void rb_thread_schedule _((void));
+void rb_gc_finalize_deferred _((void));
 #if defined(HAVE_SETITIMER) || defined(_THREAD_SAFE)
 RUBY_EXTERN int rb_thread_pending;
 # define CHECK_INTS do {\
     if (!(rb_prohibit_interrupt || rb_thread_critical)) {\
+	rb_gc_finalize_deferred();\
         if (rb_thread_pending) rb_thread_schedule();\
 	if (rb_trap_pending) rb_trap_exec();\
@@ -94,4 +96,5 @@ RUBY_EXTERN int rb_thread_tick;
 #define CHECK_INTS do {\
     if (!(rb_prohibit_interrupt || rb_thread_critical)) {\
+	rb_gc_finalize_deferred();\
 	if (rb_thread_tick-- <= 0) {\
 	    rb_thread_tick = THREAD_TICK;\


-- 
Nobu Nakada

In This Thread