From: Shugo Maeda Date: 2001-09-03T18:12:12+09:00 Subject: [ruby-talk:20758] Re: eruby 0.9.6 doesn't work with ruby 1.7.1 Hi, At Mon, 03 Sep 2001 17:25:30 +0900, Shugo Maeda wrote: > > |compiler and f are auto variables, so they should be protected > > |against Ruby's conservative GC... but they seem not to be > > |protected on Ruby 1.7. Why? > matz > > > > Because compiler and f are NOT used after the GC point. So that they > > do not protect the objects. Put volatile before the variables. > > f is used after the GC point, and volatile can't protect f.... I found that &f was greater than rb_gc_stack_start. That's why f was not protected. Please apply this patch to eruby_main.c. Could you add Init_stack() to intern.h or ruby.h? > matz I think Init_stack() is necessary for ruby-embedded applications. --- eruby_main.c 2001/08/06 09:42:47 1.28 +++ eruby_main.c 2001/09/03 08:51:13 @@ -527,7 +527,9 @@ int state; char *out; int nout; + void Init_stack _((void*)); + Init_stack(&code); code = eruby_load(eruby_filename, 0, &state); if (state && !rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) { error_print(state, eruby_mode, code); Shugo