Mail Archives: djgpp/1997/06/07/06:50:47
Peter Monks wrote:
>
> In article <33973FC7 DOT 67A6 AT cs DOT iastate DOT edu>, Gary Leavens <leavens AT cs DOT iastate DOT edu> wrote:
> >What happens is that when I run C++ programs with the gc interface,
> >I get messages like:
> >
> > Abort!
> > STACK_GROWS_DOWN is defd, but stack appears to grow up
> > sp = 0x198f48, GC_stackbottom = 0xc0174
> > stack direction = 3
>
> I had the same problem with C programs that use the Boehm-Demers-Weiser gc.
> The problem seems to be that the stack for a DJGPP program is not necessarily
> located at the same place in memory each time the program is run, which is an
> assumption the default gc makes.
>
> The gc documentation describes a way to get around this, though. Look in
> readme.dj and config.h for details.
>
> Basically, you have to declare a dummy local variable in your main function,
> and then point GC_stackbottom at it. After doing this, I had no problems with
> the garbage collector's basic functionality.
Thanks for the help. I tried this, but unfortunately it still doesn't
work.
Now I get messages that are slightly different, but still of the same
kind...
Abort!
STACK_GROWS_DOWN is defd, but stack appears to grow up
sp = 0xfffacf48, GC_stackbottom = 0xc0b74
stack direction = 3
Perhaps the problem is that sp is wrapping around to negative numbers?
I'm not sure. Any help would be appreciated.
Gary Leavens
- Raw text -