blob: 26c7d303e6ae082476bfde663eae902f7cfbdfc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
Reverting revision 25539 which causes random segfaults related to
threading.
Reported upstream as http://redmine.ruby-lang.org/issues/show/2558
Index: ruby-1.9.1-p429/thread.c
===================================================================
--- ruby-1.9.1-p429.orig/thread.c
+++ ruby-1.9.1-p429/thread.c
@@ -298,9 +298,6 @@ rb_thread_terminate_all(void)
{
rb_thread_t *th = GET_THREAD(); /* main thread */
rb_vm_t *vm = th->vm;
- VALUE einfo = vm->main_thread->errinfo;
- int state;
-
if (vm->main_thread != th) {
rb_bug("rb_thread_terminate_all: called by child thread (%p, %p)",
(void *)vm->main_thread, (void *)th);
@@ -316,14 +313,13 @@ rb_thread_terminate_all(void)
while (!rb_thread_alone()) {
PUSH_TAG();
- if ((state = EXEC_TAG()) == 0) {
+ if (EXEC_TAG() == 0) {
rb_thread_schedule();
}
- POP_TAG();
- if (state && einfo != vm->main_thread->errinfo &&
- RUBY_VM_SET_INTERRUPT(vm->main_thread)) {
- break;
+ else {
+ /* ignore exception */
}
+ POP_TAG();
}
rb_thread_stop_timer_thread();
}
|