From: Mathieu Bouchard Date: 2001-01-10T15:09:45+09:00 Subject: [ruby-talk:8985] Re: 1.6.2 on Dec Alpha > > Here it is: > > gcc -v > > Reading specs from /usr/lib/gcc-lib/armv4l-unknown-linux-gnu/2.95.1/specs > > gcc version 2.95.1 19990816 (release) > I don't know what changed, but it may be worth you upgrading. > "GCC 2.95.2 is the current release and we are currently working on GCC > 2.95.3, a maintainance update. GCC 2.96 and 2.97 are development snapshots > leading towards GCC 3.0 which we hope to release by the end of Q1 2001." > to quote from: > http://gcc.gnu.org/index.html Well I am not the owner of that machine and I really would hate to upgrade a compiler just for that. > It may be useful for the developers if you express these to these as > patches, (using gnu diff: > $ diff -u oldfile newfile > for those wondering how.:-)) It "works" now. Here is the whole patch. I first wrote debugging statements; then commented out some #define code and hardcoded in some behaviours (that may or may not be slightly wrong); and finally I commented out the debugging statements. eval.diff: --- ../ruby-1.6.2.orig/eval.c Mon Dec 25 01:28:56 2000 +++ eval.c Wed Jan 10 01:02:24 2001 @@ -4074,6 +4074,7 @@ #else # if defined(__GNUC__) && !defined(__alpha__) && !defined(__APPLE__) VALUE *stack_end = __builtin_frame_address(0); + printf("*** %p\n",__builtin_frame_address(0)); # else VALUE *stack_end = alloca(1); # endif @@ -4205,6 +4206,15 @@ if ((++tick & 0xff) == 0) { CHECK_INTS; /* better than nothing */ if (stack_length(0) > STACK_LEVEL_MAX) { + +/* + printf( + "too deep: stack_length(0)=%d, STACK_LEVEL_MAX=%d\n", + stack_length(0),STACK_LEVEL_MAX); + //abort(); + signal(11,SIG_DFL);raise(11); +*/ + rb_raise(rb_eSysStackError, "stack level too deep"); } } gc.diff: --- ../ruby-1.6.2.orig/gc.c Thu Dec 21 22:21:56 2000 +++ gc.c Wed Jan 10 01:00:28 2001 @@ -919,6 +919,7 @@ struct gc_list *list; struct FRAME * volatile frame; /* gcc 2.7.2.3 -O2 bug?? */ jmp_buf save_regs_gc_mark; +/* #ifdef C_ALLOCA VALUE stack_end; alloca(0); @@ -931,6 +932,10 @@ # endif # define STACK_END (stack_end) #endif +*/ + + VALUE *stack_end = alloca(1); + #define STACK_END (stack_end) if (dont_gc || during_gc) { if (!freelist || malloc_memories > GC_MALLOC_LIMIT) { @@ -1001,17 +1006,22 @@ Init_stack(addr) VALUE *addr; { +/* #if defined(__human68k__) extern void *_SEND; rb_gc_stack_start = _SEND; #elif defined(__GNUC__) && !defined(__alpha__) && !defined(__APPLE__) rb_gc_stack_start = __builtin_frame_address(2); #else +*/ VALUE start; if (!addr) addr = &start; rb_gc_stack_start = addr; +/* printf("***Init_stack: %p\n", rb_gc_stack_start); */ +/* #endif +*/ } void matju