Question

does some language or platform not have a fixed size of stack and therefore not easy to overflow? I remember using C on UNIX, the stack was difficult to overflow while back in the days of Win 3.1, the stack was very easy to overflow.

Was it helpful?

Solution

If by "stack" you mean any old stack, most languages do-- Java has a stack class limited only by memory. More likely you mean the call stack, in which case the biggest example I can think of is Stackless Python, which, to my understanding, uses a pure-python memory-limited stack (like Java's) as the call stack for Python code, rather than using C's call stack.

OTHER TIPS

this is a question of the practical vs the theoretical. the stack of a lisp interpreter is limited only by available memory

in scheme and other languages that implement tail recursion, a tail recursive function would have an infinite stack

Mac Systems 6, 7, and 8 had call stacks that could grow without artificial limit.

It also has no guaranteed way to detect a stack--heap collision, and could get you into all kinds of trouble that way...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top