aboutsummaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-07-10 14:35:12 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-07-10 14:35:12 -0300
commitb1daa069bac27055f17753e85dca6aa256efef6f (patch)
tree83436ef2e542699f36e347d6c4939173b0f22b89 /ldebug.c
parent4dff277255e3785b76b6b52fe2a98592e6cbc834 (diff)
downloadlua-b1daa069bac27055f17753e85dca6aa256efef6f.tar.gz
lua-b1daa069bac27055f17753e85dca6aa256efef6f.tar.bz2
lua-b1daa069bac27055f17753e85dca6aa256efef6f.zip
bug: Lua does not check GC when creating error messages
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ldebug.c b/ldebug.c
index b83b2f89..fbb3839d 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 2.128 2017/06/29 15:06:44 roberto Exp roberto $ 2** $Id: ldebug.c,v 2.129 2017/07/07 16:34:32 roberto Exp roberto $
3** Debug Interface 3** Debug Interface
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -735,6 +735,7 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
735 CallInfo *ci = L->ci; 735 CallInfo *ci = L->ci;
736 const char *msg; 736 const char *msg;
737 va_list argp; 737 va_list argp;
738 luaC_checkGC(L); /* error message uses memory */
738 va_start(argp, fmt); 739 va_start(argp, fmt);
739 msg = luaO_pushvfstring(L, fmt, argp); /* format message */ 740 msg = luaO_pushvfstring(L, fmt, argp); /* format message */
740 va_end(argp); 741 va_end(argp);