bug-guile
[Top][All Lists]
Advanced

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

Re: Mac PowerBookG4 OS X 10.4.11 (Tiger) guile test results


From: Roger Mc Murtrie
Subject: Re: Mac PowerBookG4 OS X 10.4.11 (Tiger) guile test results
Date: Fri, 11 Jan 2008 10:10:47 +1100

Yuk!    SORRY
I just noticed this is to do with PowerBookG4 although the Subject couldn't be more obvious.
I have been responding with Intel activities!
I'll fire up the PowerBookG4 and have another go>

Roger

On 11/01/2008, at 9:40 AM, Neil Jerram wrote:

Roger Mc Murtrie <address@hidden> writes:

Still fails with 40000:

Yes, but not because of stack overflow.  So the doubling of the stack
size was successful.

sizeof long: 4

As hoped.  The point is that most of the data that Guile puts on the C
stack are pointers or pointer-like.  Hence the size of the stack (for
a given operation) on a 64-bit OS will be almost twice the size on a
32-bit OS.

But the max stack size that Guile allows is the value of the "stack"
debug option multiplied by sizeof(long), and it seems that
sizeof(long) is the same on 64-bit OSs (or at least on yours) as on
32-bit.

I think a good fix would be to replace uses of SCM_STACK_LIMIT by
(SCM_STACK_LIMIT * sizeof(SCM)) / sizeof(SCM_STACKITEM).  (And then
the 20000 -> 40000 change can should be reverted.)  Patch (against
1.8.x CVS) is below.  Opinions?

/Users/Roger/Downloads/guile-1.8.3/srfi/srfi-1.scm:223:1: In procedure
dynamic-link in expression (load-extension "libguile-srfi-srfi-1-v-3"
"scm_init_srfi_1"):
/Users/Roger/Downloads/guile-1.8.3/srfi/srfi-1.scm:223:1: file:
"libguile-srfi-srfi-1-v-3", message: "dlopen(libguile-srfi-srfi-1-
v-3.a, 9): no suitable image found.  Did find:

This problem is just another occurrence of the dlopen issue.

   Neil


Index: libguile/stackchk.h
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/stackchk.h,v
retrieving revision 1.20.2.1
diff -u -r1.20.2.1 stackchk.h
--- libguile/stackchk.h 12 Feb 2006 13:42:51 -0000      1.20.2.1
+++ libguile/stackchk.h 10 Jan 2008 22:37:38 -0000
@@ -37,11 +37,11 @@
# if SCM_STACK_GROWS_UP
#  define SCM_STACK_OVERFLOW_P(s)\
   (SCM_STACK_PTR (s) \
-    > (SCM_I_CURRENT_THREAD->base + SCM_STACK_LIMIT))
+ > (SCM_I_CURRENT_THREAD->base + ((SCM_STACK_LIMIT * sizeof(SCM)) / sizeof(SCM_STACKITEM)))
# else
#  define SCM_STACK_OVERFLOW_P(s)\
   (SCM_STACK_PTR (s) \
-    < (SCM_I_CURRENT_THREAD->base - SCM_STACK_LIMIT))
+ < (SCM_I_CURRENT_THREAD->base - ((SCM_STACK_LIMIT * sizeof(SCM)) / sizeof(SCM_STACKITEM))))
# endif
# define SCM_CHECK_STACK\
    {\






reply via email to

[Prev in Thread] Current Thread [Next in Thread]