which language / platform doesn't have a fixed

2019-07-29 11:39发布

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.

3条回答
唯我独甜
2楼-- · 2019-07-29 11:49

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...

查看更多
我命由我不由天
3楼-- · 2019-07-29 11:56

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

查看更多
孤傲高冷的网名
4楼-- · 2019-07-29 12:02

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.

查看更多
登录 后发表回答