[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 答复: [ 5.4 work2 ] Stack overflow causes crash
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sat, 22 Dec 2018 18:00:56 -0200
> Roberto, what stack size does Lua 5.3+ VM expect?
> This information is essential for correct building Lua on Windows.
This is highly experimental, but we usually think the other way around:
what is the maximum value for LUAI_MAXCCALLS in a particular environment.
The only way to really know is by testing. Any porting of Lua to a new
environment can define this constant to an appropriate value that avoids
stack overflows.
I may be wrong, but I think none of those experiments reported here
with an official release of Lua created a C stack overflow. Anyway,
we probably could write a small test script that explores different
kinds of C stack overflows (coroutine recursion, gsub recursion, etc.)
as a way to validate LUAI_MAXCCALLS for a particular environment.
Of course, we can crash almost any C program given a sufficiently small
stack...
-- Roberto
- References:
- [ 5.4 work2 ] Stack overflow causes crash, actboy168
- Re: [ 5.4 work2 ] Stack overflow causes crash, Jonathan Goble
- 答复: [ 5.4 work2 ] Stack overflow causes crash, actboy168
- Re: 答复: [ 5.4 work2 ] Stack overflow causes crash, Roberto Ierusalimschy
- Re: 答复: [ 5.4 work2 ] Stack overflow causes crash, Andrew Gierth
- Re: 答复: [ 5.4 work2 ] Stack overflow causes crash, Roberto Ierusalimschy
- Re: 答复: [ 5.4 work2 ] Stack overflow causes crash, Andrew Gierth
- Re: 答复: [ 5.4 work2 ] Stack overflow causes crash, Egor Skriptunoff
- Re: 答复: [ 5.4 work2 ] Stack overflow causes crash, Andrew Gierth
- Re: 答复: [ 5.4 work2 ] Stack overflow causes crash, Egor Skriptunoff