[#39954] Fwd: [ruby-cvs:33451] Ruby:r26235 (trunk): * trace.h: new file. wraps tracing mechanisms. — SASADA Koichi <ko1@...>

 ささだです.

16 messages 2010/01/04
[#39957] Re: Fwd: [ruby-cvs:33451] Ruby:r26235 (trunk): * trace.h: new file. wraps tracing mechanisms. — Yugui <yugui@...> 2010/01/04

2010/1/4 SASADA Koichi <[email protected]>:

[#39959] Re: Fwd: [ruby-cvs:33451] Ruby:r26235 (trunk): * trace.h: new file. wraps tracing mechanisms. — SASADA Koichi <ko1@...> 2010/01/04

 ささだです.

[#39975] [Feature #2571] 文字列のハミング距離 — Kenta Murata <redmine@...>

Feature #2571: 文字列のハミング距離

14 messages 2010/01/07

[#39978] "require 'logge'" fails on ruby 1.8.7 from http://github.com/shyouhei/ruby — MOROHASHI Kyosuke <moronatural@...>

諸橋です。

7 messages 2010/01/07
[#39981] [Backport:1.8.7] Re: "require 'logge'" fails on ruby 1.8.7 from http://github.com/shyouhei/ruby — Urabe Shyouhei <shyouhei@...> 2010/01/07

卜部です。

[#40004] [Bug:trunk] require_relative depends on current directory — Yusuke ENDOH <mame@...>

遠藤です。

13 messages 2010/01/09

[#40074] [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — Takahiro Kambe <redmine@...>

Bug #2603: NetBSD 5.0以降でpthreadの処理に由来する不具合

29 messages 2010/01/14
[#40086] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — f-miura@... (MIURA, Fumiaki) 2010/01/14

NTTレゾナントの三浦です。不完全なpatchを書いてすみません。

[#40088] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — Takahiro Kambe <taca@...> 2010/01/14

こんばんは。

[#40091] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — KOSAKI Motohiro <kosaki.motohiro@...> 2010/01/15

kosakiです

[#40092] Re: [Bug #2603] NetBSD 5.0以降でpthreadの処理に由来する不具合 — Takahiro Kambe <taca@...> 2010/01/15

こんにちは。

[#40077] [Bug #2604] test_dsa_sign_verify() in test/openssl/test_ec.rb failes — Takahiro Kambe <redmine@...>

Bug #2604: test_dsa_sign_verify() in test/openssl/test_ec.rb failes

11 messages 2010/01/14

[#40153] [Bug:trunk] three bugs of Matrix::Scalar — Yusuke ENDOH <mame@...>

連投すみません。

19 messages 2010/01/25
[#40184] Re: [Bug:trunk] three bugs of Matrix::Scalar — keiju@... (石塚圭樹) 2010/01/27

けいじゅ@いしつかです.

[#40189] Re: [Bug:trunk] three bugs of Matrix::Scalar — Yusuke ENDOH <mame@...> 2010/01/27

遠藤です。

[#40191] Re: [Bug:trunk] three bugs of Matrix::Scalar — keiju@... (石塚圭樹) 2010/01/27

けいじゅ@いしつかです.

[#40224] Re: [Bug:trunk] three bugs of Matrix::Scalar — Yukihiro Matsumoto <matz@...> 2010/01/28

まつもと ゆきひろです

[#40162] [Bug #2658] rubyspec: Ruby character strings interpolates the return value of Object#inspect, without ivars, if Object#to_s does not return a String instance ERROR — Yusuke Endoh <redmine@...>

Bug #2658: rubyspec: Ruby character strings interpolates the return value of Object#inspect, without ivars, if Object#to_s does not return a String instance ERROR

8 messages 2010/01/26
[#40163] Re: [Bug #2658] rubyspec: Ruby character strings interpolates the return value of Object#inspect, without ivars, if Object#to_s does not return a String instance ERROR — Tanaka Akira <akr@...> 2010/01/26

2010年1月26日20:39 Yusuke Endoh <[email protected]>:

[#40168] [Bug #2662] BigDecimal#ceil, etc. should not return Integer — Yusuke Endoh <redmine@...>

Bug #2662: BigDecimal#ceil, etc. should not return Integer

10 messages 2010/01/26

[#40200] [Feature #2673] the length for an enumerator generated by Array#permutation and Array#combination — Kenta Murata <redmine@...>

Feature #2673: the length for an enumerator generated by Array#permutation and Array#combination

14 messages 2010/01/28

[#40221] [Bug:trunk] rubyspec: SimpleDelegator when frozen creates a frozen clone ERROR — Yusuke ENDOH <mame@...>

まつもとさん、または lib/delegator.rb についてわかる誰か

13 messages 2010/01/28

[#40265] MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...>

手元の Ubuntu 9.10 の環境で Ruby 1.9.2 を make test-all すると

38 messages 2010/01/30
[#40326] Re: MonitorMixin::ConditionVariable#wait timeout — Shugo Maeda <shugo@...> 2010/02/05

前田です。

[#41155] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/05

前田さん、akr さん

[#41157] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/05

2010年5月5日9:32 Yusuke ENDOH <[email protected]>:

[#41158] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/05

遠藤です。

[#41159] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/05

2010年5月5日11:46 Yusuke ENDOH <[email protected]>:

[#41160] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/05

遠藤です。

[#41182] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/06

2010年5月5日13:22 Yusuke ENDOH <[email protected]>:

[#41183] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/06

遠藤です。

[#41186] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/06

2010年5月6日19:58 Yusuke ENDOH <[email protected]>:

[#41205] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/06

遠藤です。

[#41207] Re: MonitorMixin::ConditionVariable#wait timeout — KOSAKI Motohiro <kosaki.motohiro@...> 2010/05/06

2010年5月6日23:08 Yusuke ENDOH <[email protected]>:

[#41208] Re: MonitorMixin::ConditionVariable#wait timeout — Tanaka Akira <akr@...> 2010/05/06

2010年5月6日23:15 KOSAKI Motohiro <[email protected]>:

[#41245] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/10

遠藤です。

[#41252] Re: MonitorMixin::ConditionVariable#wait timeout — KOSAKI Motohiro <kosaki.motohiro@...> 2010/05/10

kosakiです

[#41255] Re: MonitorMixin::ConditionVariable#wait timeout — Yusuke ENDOH <mame@...> 2010/05/10

遠藤です。

[#41256] Re: MonitorMixin::ConditionVariable#wait timeout — Masaya TARUI <tarui@...> 2010/05/10

樽家です。

[#40269] [Feature #2695] Supported Platforms — Kazuhiro NISHIYAMA <redmine@...>

Feature #2695: Supported Platforms

17 messages 2010/01/31
[#40760] [Feature #2695] Supported Platforms — Yusuke Endoh <redmine@...> 2010/03/25

チケット #2695 が更新されました。 (by Yusuke Endoh)

[ruby-dev:40121] [Bug:trunk] cannot resume Fiber from forked process

From: Yusuke ENDOH <mame@...>
Date: 2010-01-21 14:10:07 UTC
List: ruby-dev #40121
遠藤です。

fork の子プロセスから元プロセスの Fiber が呼べません。

  $ ./ruby -e '
  f = Fiber.new { }
  fork { f.resume }
  Process.waitpid
  '
  -e:3:in `resume': fiber called across trap (FiberError)
          from -e:3:in `block in <main>'
          from -e:3:in `fork'
          from -e:3:in `<main>'

そういう仕様ならそういう仕様で別に構わないのですが、fiber
called across *trap* という例外メッセージはおかしい気がします。

ちなみに、trap をまたがって Fiber を呼ぶことは可能なようです。

  $ ./ruby -e '
  f = Fiber.new { p :ok }
  trap(:USR1) { f.resume }
  Process.kill :USR1, $$
  sleep 0.2
  '
  :ok

  $ ./ruby -e '
  f = nil
  trap(:USR1) { f = Fiber.new { p :ok } }
  Process.kill :USR1, $$
  sleep 0.2
  f.resume
  '
  :ok

このチェックはもう必要ないのではないでしょうか。反対がなければ
コミットしようと思います。

diff --git a/cont.c b/cont.c
index a77f35e..932b10e 100644
--- a/cont.c
+++ b/cont.c
@@ -388,7 +388,6 @@ cont_restore_1(rb_context_t *cont)
     th->state = sth->state;
     th->status = sth->status;
     th->tag = sth->tag;
-    th->trap_tag = sth->trap_tag;
     th->errinfo = sth->errinfo;
     th->first_proc = sth->first_proc;

@@ -621,9 +620,6 @@ rb_cont_call(int argc, VALUE *argv, VALUE contval)
     if (cont->saved_thread.self != th->self) {
 	rb_raise(rb_eRuntimeError, "continuation called across threads");
     }
-    if (cont->saved_thread.trap_tag != th->trap_tag) {
-	rb_raise(rb_eRuntimeError, "continuation called across trap");
-    }
     if (cont->saved_thread.fiber) {
 	rb_fiber_t *fcont;
 	GetFiberPtr(cont->saved_thread.fiber, fcont);
@@ -940,9 +936,6 @@ fiber_switch(VALUE fibval, int argc, VALUE *argv,
int is_resume)
     if (cont->saved_thread.self != th->self) {
 	rb_raise(rb_eFiberError, "fiber called across threads");
     }
-    else if (cont->saved_thread.trap_tag != th->trap_tag) {
-	rb_raise(rb_eFiberError, "fiber called across trap");
-    }
     else if (fib->status == TERMINATED) {
 	value = rb_exc_new2(rb_eFiberError, "dead fiber called");
 	if (th->fiber != fibval) rb_exc_raise(value);
diff --git a/eval.c b/eval.c
index c5a72dc..aa01d81 100644
--- a/eval.c
+++ b/eval.c
@@ -677,19 +677,14 @@ rb_protect(VALUE (* proc) (VALUE), VALUE data,
int * state)
     int status;
     rb_thread_t *th = GET_THREAD();
     rb_control_frame_t *cfp = th->cfp;
-    struct rb_vm_trap_tag trap_tag;
     rb_jmpbuf_t org_jmpbuf;

-    trap_tag.prev = th->trap_tag;
-
     PUSH_TAG();
-    th->trap_tag = &trap_tag;
     MEMCPY(&org_jmpbuf, &(th)->root_jmpbuf, rb_jmpbuf_t, 1);
     if ((status = EXEC_TAG()) == 0) {
 	SAVE_ROOT_JMPBUF(th, result = (*proc) (data));
     }
     MEMCPY(&(th)->root_jmpbuf, &org_jmpbuf, rb_jmpbuf_t, 1);
-    th->trap_tag = trap_tag.prev;
     POP_TAG();

     if (state) {
diff --git a/vm_core.h b/vm_core.h
index b9b584a..b781765 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -347,10 +347,6 @@ struct rb_vm_tag {
     struct rb_vm_tag *prev;
 };

-struct rb_vm_trap_tag {
-    struct rb_vm_trap_tag *prev;
-};
-
 #define RUBY_VM_VALUE_CACHE_SIZE 0x1000
 #define USE_VALUE_CACHE 0

@@ -414,7 +410,6 @@ typedef struct rb_thread_struct
     int transition_for_lock;

     struct rb_vm_tag *tag;
-    struct rb_vm_trap_tag *trap_tag;

     int parse_in_eval;
     int mild_compile_error;

-- 
Yusuke ENDOH <[email protected]>

In This Thread

Prev Next