[#82706] [Ruby trunk Bug#13851] getting "can't modify string; temporarily locked" on non-frozen instances — cardoso_tiago@...
Issue #13851 has been updated by chucke (Tiago Cardoso).
3 messages
2017/09/07
[#82853] [Ruby trunk Bug#13916] Race condition when sending a signal to a new fork — russell.davis@...
Issue #13916 has been reported by russelldavis (Russell Davis).
3 messages
2017/09/19
[#82892] [Ruby trunk Bug#13921] buffered read_nonblock doesn't work as expected using SSLSocket — cardoso_tiago@...
Issue #13921 has been updated by chucke (Tiago Cardoso).
3 messages
2017/09/20
[ruby-core:82925] Re: [Ruby trunk Bug#13887] test/ruby/test_io.rb may get stuck with FIBER_USE_NATIVE=0 on Linux
From:
Eric Wong <normalperson@...>
Date:
2017-09-21 22:15:19 UTC
List:
ruby-core #82925
s.wanabe@gmail.com wrote:
> But I believe it is never correct.
> (`(char*)` cast is ugly, I want change `cont->machine.stack_src` but not `th->machine.stack_start`, ruby should change the behaviour only when `FIBER_USE_NATIVE == 0`, and so on.)
I guess replacing "char *" with "uintptr_t" is appropriate for
pointer arithmetic:
```
diff --git a/thread_pthread.c b/thread_pthread.c
index 96723d4b17..9f9959e095 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -841,8 +841,9 @@ native_thread_init_stack(rb_thread_t *th)
size_t size;
if (get_stack(&start, &size) == 0) {
- th->ec.machine.stack_start = start;
- th->ec.machine.stack_maxsize = size;
+ uintptr_t diff = (uintptr_t)start - (uintptr_t)&curr;
+ th->ec.machine.stack_start = &curr;
+ th->ec.machine.stack_maxsize = size - diff;
}
#elif defined get_stack_of
if (!th->ec.machine.stack_maxsize) {
```
The above works for me as far as test_io.rb goes, but my Thriber
patch for [Feature #13618] still segfaults with
FIBER_USE_NATIVE==0, so I guess that is a separate bug I need
to fix...
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>