From: nobu.nokada@... Date: 2004-06-08T13:03:19+09:00 Subject: Re: Segfault on embedded ruby. Hi, At Tue, 8 Jun 2004 12:24:31 +0900, Paul Brannan wrote in [ruby-talk:102734]: > > > int main () > > > { > > > ruby_init (); > > VALUE dummy; > > Init_stack(&dummy); > > > ruby_init_loadpath (); > > > dontCrash("puts 'test'"); > > > ruby_finalize(); > > > } > > ruby_init() calls Init_stack, so why should this be necessary? To adjust the stack boundary. The stack frame inside Init_stack() called from ruby_init() would be placed at lower address than one of dontCrash() , so that `test' in it would be outside the region of GC target. -- Nobu Nakada