** Check appropriate error for stack overflow ("regular" overflow or ** overflow while handling stack overflow). If 'nCalls' is larger than ** LUAI_MAXCCALLS (which means it is handling a "regular" overflow) but ** smaller than 9/8 of LUAI_MAXCCALLS, does not report an error (to ** allow overflow handling to work) */
| 507 | ** allow overflow handling to work) |
| 508 | */ |
| 509 | static void stackerror(lua_State *L) { |
| 510 | if (L->nCcalls == LUAI_MAXCCALLS) |
| 511 | luaG_runerror(L, "C stack overflow"); |
| 512 | else if (L->nCcalls >= (LUAI_MAXCCALLS + (LUAI_MAXCCALLS >> 3))) |
| 513 | luaD_throw(L, LUA_ERRERR); /* error while handing stack error */ |
| 514 | } |
| 515 | |
| 516 | |
| 517 | /* |
no test coverage detected