[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ruby



In message <[🔎] E14W0eu-0001BA-00@kings-cross.london.uk.eu.org>
          Philip Blundell <philb@gnu.org> wrote:

> ./mkconfig.rb:44: stack level too deep (SystemStackError)
> 	from ./mkconfig.rb:29:in `foreach'
> 	from ./mkconfig.rb:29
> make[1]: *** [rbconfig.rb] Error 1
> make[1]: Leaving directory `/home/buildd/build/ruby-1.6.2/build-tree/ruby-1.6.2'

Looks like it's trying to find the stack for garbage collection in
eval.c:

------


#ifdef DJGPP
static int STACK_LEVEL_MAX = 65535;
#else
#ifdef __human68k__
extern int _stacksize;
# define STACK_LEVEL_MAX (_stacksize - 4096)
#else
#ifdef HAVE_GETRLIMIT
static int STACK_LEVEL_MAX = 655300;
#else
# define STACK_LEVEL_MAX 655300
#endif
#endif
#endif


extern VALUE *rb_gc_stack_start;
static int
stack_length(p)
    VALUE **p;
{
#ifdef C_ALLOCA
    VALUE stack_end;
    alloca(0);
# define STACK_END (&stack_end)
#else
# if defined(__GNUC__) && !defined(__alpha__) && !defined(__APPLE__)
    VALUE *stack_end = __builtin_frame_address(0);
# else
    VALUE *stack_end = alloca(1);
# endif
# define STACK_END (stack_end)
#endif
    if (p) *p = STACK_END;

#ifdef sparc
    return rb_gc_stack_start - STACK_END + 0x80;
#else
    return (STACK_END < rb_gc_stack_start) ? rb_gc_stack_start - STACK_END
	                                   : STACK_END - rb_gc_stack_start;
#endif
}


----


This function returns 157797885, and goes wrong against a check to
STACK_LEVEL_MAX which causes this error.   I don't know enough about
ARM Linux memory handling to suggest a fix.

Peter



-- 
------------------------------------------------------------------------
 Peter Naulls - peter@erble.freeserve.co.uk
 Homepage - http://free.prohosting.com/~chocky/
 Java for RISC OS and ARM - http://www.java.riscos.org.uk/
 Debian Linux on RiscPCs - http://www.erble.freeserve.co.uk/
------------------------------------------------------------------------



Reply to: