[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.4 bug with coroutines
- From: Andrew Gierth <andrew@...>
- Date: Sun, 01 Nov 2020 23:54:40 +0000
>>>>> "Edoardo" == Edoardo <edoardo762@gmail.com> writes:
Edoardo> I tried using debug.setcstacklimit when I first encountered
Edoardo> this issue, but regardless of the value I set (in the whole
Edoardo> range, from 100 to 39999) it always ends up with a stack
Edoardo> overflow in the coroutine.
The problem is that you're not passing the "from" parameter when
resuming the coroutine.
5.4 only allows a minimal C stack limit when you do this (the purpose of
the "from" parameter is to propagate the existing C stack depth counter
from the current state to the new one). This seems to be the opposite of
5.3's behavior which is to assume the whole stack depth is available if
from is null.
--
Andrew.