bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: stack overflow while using sml-mode.el


From: Eli Zaretskii
Subject: Re: stack overflow while using sml-mode.el
Date: Tue, 24 Oct 2000 09:25:51 +0200 (IST)

On 24 Oct 2000, Colin Walters wrote:

> I'm running Emacs on a GNU/Linux system.  A bit of digging in the
> glibc sources turned up __libc_stack_end, so I tried:
> 
> (gdb) p $esp - (void *) __libc_stack_end  
> $32 = -163724
> (gdb) 
> 
> Because the stack grows down on ia32, this means it wasn't stack
> overflow, correct?

It looks like __libc_stack_end is the *upper* end of the stack, that
is, it's where the stack begins, not where it ends (since ESP is
*below* __libc_stack_end, and the stack is expand-down on ia32).

There should be another variable which either holds the stack size or
its lower end.  The lower end is where the stack overflows.  If you
have the size, then the lower end is at __libc_stack_end - stack_size.

However, since ESP is only 160KB below the stack base, I'd be
surprised if this is an overflow: I imagine the default stack size is
much more than 160KB, and it probably grows dynamically as the need
arises on GNU/Linux systems.  So no, it certainly doesn't look like a
stack overflow.

Btw, having more than 100KB of stack used up during GC is normal,
according to my measurements.  (I think I saw 140KB in my case.)



reply via email to

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