-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch taken from Debian. Refresh patches Signed-off-by: Rosen Penev <[email protected]> (cherry picked from commit 78b0106)
- Loading branch information
Showing
8 changed files
with
48 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ Including it allows multiple lua versions to coexist. | |
Signed-off-by: Rafał Miłecki <[email protected]> | ||
--- | ||
|
||
diff --git a/Makefile b/Makefile | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -41,10 +41,10 @@ RANLIB= ranlib | ||
|
@@ -42,7 +41,7 @@ rename to doc/luac5.1.1 | |
diff --git a/src/Makefile b/src/Makefile | ||
--- a/src/Makefile | ||
+++ b/src/Makefile | ||
@@ -29,10 +29,10 @@ CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ | ||
@@ -29,10 +29,10 @@ CORE_O= lapi.o lcode.o ldebug.o ldo.o ld | ||
LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \ | ||
lstrlib.o loadlib.o linit.o | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
From: Enrico Tassi <[email protected]> | ||
Date: Tue, 26 Aug 2014 16:20:55 +0200 | ||
Subject: Fix stack overflow in vararg functions | ||
|
||
--- | ||
src/ldo.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
--- a/src/ldo.c | ||
+++ b/src/ldo.c | ||
@@ -274,7 +274,7 @@ int luaD_precall (lua_State *L, StkId fu | ||
CallInfo *ci; | ||
StkId st, base; | ||
Proto *p = cl->p; | ||
- luaD_checkstack(L, p->maxstacksize); | ||
+ luaD_checkstack(L, p->maxstacksize + p->numparams); | ||
func = restorestack(L, funcr); | ||
if (!p->is_vararg) { /* no varargs? */ | ||
base = func + 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ Including it allows multiple lua versions to coexist. | |
Signed-off-by: Rafał Miłecki <[email protected]> | ||
--- | ||
|
||
diff --git a/Makefile b/Makefile | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -41,10 +41,10 @@ RANLIB= ranlib | ||
|
@@ -42,7 +41,7 @@ rename to doc/luac5.1.1 | |
diff --git a/src/Makefile b/src/Makefile | ||
--- a/src/Makefile | ||
+++ b/src/Makefile | ||
@@ -29,10 +29,10 @@ CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ | ||
@@ -29,10 +29,10 @@ CORE_O= lapi.o lcode.o ldebug.o ldo.o ld | ||
LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \ | ||
lstrlib.o loadlib.o linit.o | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
From: Enrico Tassi <[email protected]> | ||
Date: Tue, 26 Aug 2014 16:20:55 +0200 | ||
Subject: Fix stack overflow in vararg functions | ||
|
||
--- | ||
src/ldo.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
--- a/src/ldo.c | ||
+++ b/src/ldo.c | ||
@@ -274,7 +274,7 @@ int luaD_precall (lua_State *L, StkId fu | ||
CallInfo *ci; | ||
StkId st, base; | ||
Proto *p = cl->p; | ||
- luaD_checkstack(L, p->maxstacksize); | ||
+ luaD_checkstack(L, p->maxstacksize + p->numparams); | ||
func = restorestack(L, funcr); | ||
if (!p->is_vararg) { /* no varargs? */ | ||
base = func + 1; |