Closed Asmod4n closed 9 years ago
This happens on OS X and Linux with the latest mruby.
I happen SEGV too, on Linux.
which script do you trying?
original code ? or your modified ?
Not modified,
But doesn't matter, as soon as you access a queue inside a thread mruby crashes.
Von einem mobilen Gerät gesendet
Am 07.09.2015 um 10:05 schrieb mattn notifications@github.com:
original code ? or your modified ?
— Reply to this email directly or view it on GitHub.
Well, I can't reproduce it on windows. I'll try to reproduce on linux.
this hotfix and run queue.rb is success.
diff --git a/src/mrb_thread.c b/src/mrb_thread.c
index f01abf7..1d0fcc0 100644
--- a/src/mrb_thread.c
+++ b/src/mrb_thread.c
@@ -287,14 +287,6 @@ migrate_simple_value(mrb_state *mrb, mrb_value v, mrb_state *mrb2) {
migrate_simple_iv(mrb, v, mrb2, nv);
break;
case MRB_TT_DATA:
- {
- if (!mrb_immediate_p(v)) {
- struct RBasic *p;
- p = mrb_obj_alloc(mrb2, mrb_type(v), mrb_obj_class(mrb, v));
- nv = mrb_obj_value(p);
- break;
- }
- }
if (!is_safe_migratable_datatype(DATA_TYPE(v)))
mrb_raise(mrb, E_TYPE_ERROR, "cannot migrate object");
nv = v;
mrb_immediate_p(v) is needed? this condition always FALSE. because MRB_TT_DATA is not immediate.
Seams to work so far, thanks :)
This happens when you try to access a Queue created outside of a thread