From: Lorien Dunn Date: 2002-09-12T08:50:04+09:00 Subject: Re: Bug in Ruby Ext to C or it is me ? I bet you have compiled with stack-frame-pointer ommision turned on. This is done with -fomit-frame-pointer in gcc, and is the default with MSVC when you choose the "Maximise Speed" optimisation. Frame-pointer ommision does not work with ruby exceptions or threads. Lorien Dunn On Wed, 11 Sep 2002 00:14:13 +0900 weilljc@club-internet.fr (JCW) wrote: > Compile this, link it with ruby lib, execute with a small > ruby program like this one : > > puts "Hello World from main Ruby Thread" > > And explain why there is a core dump ! > > -- jc > > > #include > #include > > static VALUE request_thread (void * data) > { > while (1) { > printf ("thread begin\n"); > sleep(1); > printf("Thread end\n"); > rb_thread_schedule(); > } > return Qtrue; > } > > int main (int argc, char * argv[]) > { > ruby_init(); > ruby_options(argc, argv); > rb_thread_create (request_thread, NULL); > > ruby_run(); > > return 0; > }