General

Profile

davidw (David Welton)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 1 1

Activity

12/19/2019

07:46 PM Ruby Bug #16288: Segmentation fault with finalizers, threads

```
--- a/thread.c
+++ b/thread.c
@@ -682,7 +682,7 @@ thread_do_start(rb_thread_t *th)
else {
args_ptr = RARRAY_CONST_PTR(args);
}
-
+ rb_funcallv(NULL, idInspect, 0, 0);
th->valu...
davidw (David Welton)

12/10/2019

01:16 AM Ruby Bug #16288: Segmentation fault with finalizers, threads
I was fiddling around a bit, and trying to understand how things work, for my own edification.
``` diff
diff --git a/eval.c b/eval.c
index 1eeaec56cb..097a105b33 100644
--- a/eval.c
+++ b/eval.c
@@ -238,6 +238,7 @@ ruby_cleanup(...
davidw (David Welton)

11/14/2019

03:45 AM Ruby Bug #16288: Segmentation fault with finalizers, threads
This code pretty reliably produces a segmentation fault on my machine:
```
require 'timeout'
Thread.DEBUG = 1
class Foo
def initialize
ObjectSpace.define_finalizer(self, proc do
Foo.f...
davidw (David Welton)

11/04/2019

09:49 PM Ruby Bug #16288: Segmentation fault with finalizers, threads
```
modified lib/timeout.rb
@@ -94,7 +94,7 @@ def timeout(sec, klass = nil, message = nil) #:yield: +sec+
ensure
if y
y.kill
- y.join # make sure y is dead.
+ # y.join # make sure y...
davidw (David Welton)
05:11 PM Ruby Bug #16288: Segmentation fault with finalizers, threads
mame (Yusuke Endoh) wrote:
> Thank you for the report and the great investigation! I could reproduce the issue by using your example: https://github.com/mainameiz/segfault_app
Thanks for checking in to it.
> ...
Yes, I think ther...
davidw (David Welton)

11/01/2019

04:14 PM Ruby Bug #16288: Segmentation fault with finalizers, threads
A little bit more data:
I added some more debugging statements, and I found that the main thread goes from being marked with the THREAD_KILLED status to THREAD_STOPPED_FOREVER
This appears to happen in thread_join_sleep in thread.c...
davidw (David Welton)

10/31/2019

11:02 PM Ruby Bug #16288 (Closed): Segmentation fault with finalizers, threads
Hi,
This is a tricky one and I am still working on narrowing it down, but I will report what I have so far.
I compiled a version of 2_6_6 from github: ruby 2.6.6p116 (2019-10-02 revision 67825) [x86_64-linux]
I have a minimal Ra...
davidw (David Welton)

12/09/2013

10:32 PM Ruby Bug #4421: [ext/openssl] Fix RSA public key encoding
Hi,
It certainly would have been useful to have the code available in gist https://gist.github.com/2902696 available in some form, because this patch broke backwards compatibility for a system I was working on.
davidw (David Welton)

Also available in: Atom