From: Mathieu Bouchard Date: 2003-07-15T01:26:43+09:00 Subject: Re: stack problem On Sun, 13 Jul 2003, Mathieu Bouchard wrote: > > On Sat, 12 Jul 2003, Mauricio Fern�ndez wrote: > > You can use Init_stack, see the thread starting at [ruby-talk:74400]. > Thanks. If I understood correctly, I have to use it like this? As an explanation for the code snippet: I want to find the bottom of the stack, to tell Init_stack about it, because it can't find it by itself; i could use (VALUE *)0xBFFFFFFC, but I want to be a bit more system-independant than that... Is there a quicker, systematic way of finding the bottom of the stack? My problem is that ruby_init() doesn't run from the main(), and cannot be made to, because I embed Ruby inside a plugin (.so) for another program. So my program has no main() by itself, and may be initialized as any number of things are on the stack. That number of things used to influence the frequency of crashes I would get (!!!). Over the last months I had come to equating Ruby with unreliability because I didn't know that Ruby couldn't figure out the bottom of the stack. Now it's much better but the fix looks quite a bit weird. ________________________________________________________________ Mathieu Bouchard http://artengine.ca/matju