[#84867] [Ruby trunk Bug#14357] thread_safe tests suite segfaults — v.ondruch@...

Issue #14357 has been reported by vo.x (Vit Ondruch).

11 messages 2018/01/15

[#84980] [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — hsbt@...

Issue #13618 has been updated by hsbt (Hiroshi SHIBATA).

10 messages 2018/01/23
[#85012] Re: [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — Eric Wong <normalperson@...> 2018/01/23

hsbt@ruby-lang.org wrote:

[ruby-core:85241] Re: [Ruby trunk Bug#14421] super_method segfaults when called on a re-bound Method

From: Eric Wong <normalperson@...>
Date: 2018-01-30 00:51:37 UTC
List: ruby-core #85241
andy@rusterholz.org wrote:
> Note: the above failing code correctly returns nil on a coworker's machine
> running `ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin17]`.

Thanks for simple test case, I guess the following patch is correct:
(sorry, I don't use "bind" or "super_method" at all, so maybe
there's other problems but "make exam" passes for me)

```
--- a/proc.c
+++ b/proc.c
@@ -2725,6 +2725,7 @@ method_super_method(VALUE method)
 
     TypedData_Get_Struct(method, struct METHOD, &method_data_type, data);
     iclass = data->iclass;
+    if (!iclass) return Qnil;
     super_class = RCLASS_SUPER(RCLASS_ORIGIN(iclass));
     mid = data->me->called_id;
     if (!super_class) return Qnil;
```

Full patch + test:
https://80x24.org/spew/20180130004626.17796-1-e@80x24.org/raw

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next