diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-10-17 13:09:17 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-10-17 13:09:17 -0300 |
| commit | 6e1aec7a677a9891f2f8ca57e039d9984fdc69bc (patch) | |
| tree | d9e1bf698cbbaebfdc9d9501ce614c3ce584e8f7 | |
| parent | 6055a039b57b405adc268672caeb682ef2a551ee (diff) | |
| download | lua-6e1aec7a677a9891f2f8ca57e039d9984fdc69bc.tar.gz lua-6e1aec7a677a9891f2f8ca57e039d9984fdc69bc.tar.bz2 lua-6e1aec7a677a9891f2f8ca57e039d9984fdc69bc.zip | |
Larger C-stack limits for new threads
New threads were being created with very small C-stack limits.
This is not a problem for coroutines, because 'lua_resume' sets
a new limit, but not all threads are coroutines.
| -rw-r--r-- | lstate.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -286,7 +286,6 @@ static void preinit_thread (lua_State *L, global_State *g) { | |||
| 286 | L->stacksize = 0; | 286 | L->stacksize = 0; |
| 287 | L->twups = L; /* thread has no upvalues */ | 287 | L->twups = L; /* thread has no upvalues */ |
| 288 | L->errorJmp = NULL; | 288 | L->errorJmp = NULL; |
| 289 | L->nCcalls = CSTACKTHREAD; | ||
| 290 | L->hook = NULL; | 289 | L->hook = NULL; |
| 291 | L->hookmask = 0; | 290 | L->hookmask = 0; |
| 292 | L->basehookcount = 0; | 291 | L->basehookcount = 0; |
| @@ -327,6 +326,7 @@ LUA_API lua_State *lua_newthread (lua_State *L) { | |||
| 327 | setthvalue2s(L, L->top, L1); | 326 | setthvalue2s(L, L->top, L1); |
| 328 | api_incr_top(L); | 327 | api_incr_top(L); |
| 329 | preinit_thread(L1, g); | 328 | preinit_thread(L1, g); |
| 329 | L1->nCcalls = getCcalls(L); | ||
| 330 | L1->hookmask = L->hookmask; | 330 | L1->hookmask = L->hookmask; |
| 331 | L1->basehookcount = L->basehookcount; | 331 | L1->basehookcount = L->basehookcount; |
| 332 | L1->hook = L->hook; | 332 | L1->hook = L->hook; |
