From: Ammar Ali Date: 2010-12-07T09:32:12+09:00 Subject: Re: embedding ruby - segfault after initialization when running rb_gc_start?? On Mon, Dec 6, 2010 at 6:47 PM, Marc Weber wrote: > Hi, > > I'm trying to embed Ruby into the Ur web programming language. > > Everything seems to work fine when using rb_gc_disable(). > When not disabling gc it segfaults when requiring 'net/http'. > > Then I tried running gc manually and found out that the crash even > happens after initialization. > > However it only happens when urweb compiles everything. Compiling a > embed ruby into C test case everything is fine. > > What could be causing this? > > valgrind log, initialization code: > http://mawercer.de/~marc/crash.txt > > Any ideas? Could symbol collisions cause this? > The libruby.so file is used. Ruby version is 1.9.2-p0 > > The strange thing is that the segfault only happens when being called > within urweb. Is this a multithreaded environment? If so, it sounds vaguely like the problem discussed in the following issue: http://redmine.ruby-lang.org/issues/show/2294 Regards, Ammar