lua_checkstack
function · lua · boundary
- Address
0x6f2f30· 80 bytes, up to0x6f2f7f- Signature
int __fastcall (lua_State *L, int32_t size)- Meaning
- Makes room for size more stack slots, returning 0 when that passes 2048 in use
- Confidence
- verified, proof two
- Finding
- ui/luastate#stack-room-and-run-errors
Finding: Stack room and run errors in ui: the Lua state, its library and C functions
lua_checkstack(L, n) (0x6f2f30) returns 0 when the slots in use, (top − base) / 16, plus n
exceed 2048. Otherwise it grows the stack with luaD_growstack(L, n) when stack_last − top is at
most 16·n bytes, raises the current call's top to top + 16·n when it is lower, and returns 1.
luaG_runerror(L, fmt, ...) (0x6fc870) formats the message with luaO_pushvfstring, passes it
to 0x6fc8a0 and calls luaG_errormsg, which throws. When bit 0 of the current call's +8 is
clear, 0x6fc8a0 pushes %s:%d: %s of the text 0x6f5c40 writes, the number 0x6fbef0 returns
and the message. The census finds 37 calls of 0x6f2f30 and 32 of 0x6fc870.
The derivation is in the doc.
Callers 34
- Script::GetAddOnDependencies glue
- Script::GetRealmCategories glue
- Script::GetScreenResolutions ui
- Script::GetMultisampleFormats ui
- Script::GetGMTicketCategories ui
- Script::GetAddOnDependenciesInGame ui
- Script::GetChatWindowMessages ui
- Script::GetChatWindowChannels ui
- Script::EnumerateServerChannels ui
- Script::GetMapZones ui
- Script::GetBattlefieldInfo ui
- Script::GetBattlefieldScore ui
- Script::GetInboxHeaderInfo ui
- Script::GetPetFoodTypes ui
- Script::GetStablePetFoodTypes ui
- Script::GetAuctionItemInfo ui
- Script::GetAuctionItemSubClasses ui
- Script::GetAuctionInvTypes ui
- Script::GetQuestTimers ui
- Script::GetGossipOptions ui
- Script::GetGossipAvailableQuests ui
- Script::GetGossipActiveQuests ui
- Script::GetActionBarToggles ui
- Script::GetLFGTypes ui
- Script::GetLFGTypeEntries ui
- Script::GetTalentPrereqs ui
- Script::GetCraftSpellFocus ui
- Script::GetTradeSkillTools ui
- luaL_checkstack lua
- FrameScriptSerializeValue ui
- MinigamePushBoard minigame
- Model::GetLight ui
- Frame::GetRegions ui
- Frame::GetChildren ui
Callees 1
- luaD_growstack lua
Calls and jumps by a bare address, from tables/calls.tsv.