bug-sather
[Top][All Lists]
Advanced

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

STACK_GROWS_DOWN is defd, but stack appears to grow up


From: Fred Kilner
Subject: STACK_GROWS_DOWN is defd, but stack appears to grow up
Date: Thu, 28 Sep 2000 11:41:55 -0700 (PDT)

SUMMARY
-------
Seems to compile fine except fails it's test: 
cd Test; ../Bin/cs test-all.module -debug -main TEST_OBLIG -o test; 
./test>test-output
misc.c 408 func GC_init_inner() setting stackbottom to 0
STACK_GROWS_DOWN is defd, but stack appears to grow up
sp = 0xffbee95c, GC_stackbottom = 0x0 0
misc.c 439 GC_stack_base() returns 0
stack direction 3

ENVIRONMENT
-----------
Sather 1.1  (according to README in main directory)
gcc
gcc version 2.95.2 19991024 (release)
SunOS kilner 5.7 Generic_106541-10 sun4u sparc SUNW,Ultra-5_10

CONTACT INFO
------------
Fred Kilner, address@hidden 510-574-9712

DESCRIPTION
-----------
It always complains about the stack growing the wrong way.
I tried changing the code undefining STACK_GROWS_DOWN but that caused
other problems. I haven't touched this for a while so I forgot the details.
It looks to me like the stack grows down (toward lower address) since it
seems to start at the top of memory.
This code:
#include <stdio.h>
int main()
{
  int a, b, c;
  int long *pointer;
  static int d;
  printf("sizeof(pointer)=%d\n", sizeof(pointer));
  printf("&a=%p  &b=%p,  &c=%p,  &d=%p\n", &a, &b, &c, &d);
  return 0;
}

Has this output:
)./a.out
sizeof(pointer)=4
&a=ffbeecdc  &b=ffbeecd8,  &c=ffbeecd4,  &d=20b78

I tried a few version on the garbage collector since it was listed in the
short buglist.


Please let me know if you know what I should try or change in the code.
Thanks
-Fred




reply via email to

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