forked from pool/lua54
Accepting request 821630 from home:gmbr3:Active
- Add bugs.patch, upstream fixes from https://www.lua.org/bugs.html OBS-URL: https://build.opensuse.org/request/show/821630 OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua54?expand=0&rev=5
This commit is contained in:
parent
e6741c1ceb
commit
d728da1881
104
bugs.patch
Normal file
104
bugs.patch
Normal file
@ -0,0 +1,104 @@
|
||||
--- a/src/lgc.c
|
||||
+++ b/src/lgc.c
|
||||
@@ -1140,7 +1140,7 @@ static void finishgencycle (lua_State *L, global_State *g) {
|
||||
static void youngcollection (lua_State *L, global_State *g) {
|
||||
GCObject **psurvival; /* to point to first non-dead survival object */
|
||||
lua_assert(g->gcstate == GCSpropagate);
|
||||
- markold(g, g->survival, g->reallyold);
|
||||
+ markold(g, g->allgc, g->reallyold);
|
||||
markold(g, g->finobj, g->finobjrold);
|
||||
atomic(L);
|
||||
|
||||
--- a/src/ldo.c
|
||||
+++ b/src/ldo.c
|
||||
@@ -466,13 +466,13 @@ void luaD_call (lua_State *L, StkId func, int nresults) {
|
||||
f = fvalue(s2v(func));
|
||||
Cfunc: {
|
||||
int n; /* number of returns */
|
||||
- CallInfo *ci = next_ci(L);
|
||||
+ CallInfo *ci;
|
||||
checkstackp(L, LUA_MINSTACK, func); /* ensure minimum stack size */
|
||||
+ L->ci = ci = next_ci(L);
|
||||
ci->nresults = nresults;
|
||||
ci->callstatus = CIST_C;
|
||||
ci->top = L->top + LUA_MINSTACK;
|
||||
ci->func = func;
|
||||
- L->ci = ci;
|
||||
lua_assert(ci->top <= L->stack_last);
|
||||
if (L->hookmask & LUA_MASKCALL) {
|
||||
int narg = cast_int(L->top - func) - 1;
|
||||
@@ -486,18 +486,18 @@ void luaD_call (lua_State *L, StkId func, int nresults) {
|
||||
break;
|
||||
}
|
||||
case LUA_VLCL: { /* Lua function */
|
||||
- CallInfo *ci = next_ci(L);
|
||||
+ CallInfo *ci;
|
||||
Proto *p = clLvalue(s2v(func))->p;
|
||||
int narg = cast_int(L->top - func) - 1; /* number of real arguments */
|
||||
int nfixparams = p->numparams;
|
||||
int fsize = p->maxstacksize; /* frame size */
|
||||
checkstackp(L, fsize, func);
|
||||
+ L->ci = ci = next_ci(L);
|
||||
ci->nresults = nresults;
|
||||
ci->u.l.savedpc = p->code; /* starting point */
|
||||
ci->callstatus = 0;
|
||||
ci->top = func + 1 + fsize;
|
||||
ci->func = func;
|
||||
- L->ci = ci;
|
||||
for (; narg < nfixparams; narg++)
|
||||
setnilvalue(s2v(L->top++)); /* complete missing arguments */
|
||||
lua_assert(ci->top <= L->stack_last);
|
||||
@@ -674,7 +674,7 @@ LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs,
|
||||
if (from == NULL)
|
||||
L->nCcalls = CSTACKTHREAD;
|
||||
else /* correct 'nCcalls' for this thread */
|
||||
- L->nCcalls = getCcalls(from) + from->nci - L->nci - CSTACKCF;
|
||||
+ L->nCcalls = getCcalls(from) - L->nci - CSTACKCF;
|
||||
if (L->nCcalls <= CSTACKERR)
|
||||
return resume_error(L, "C stack overflow", nargs);
|
||||
luai_userstateresume(L, nargs);
|
||||
--- a/src/lundump.c
|
||||
+++ b/src/lundump.c
|
||||
@@ -205,8 +205,9 @@ static void loadUpvalues (LoadState *S, Proto *f) {
|
||||
n = loadInt(S);
|
||||
f->upvalues = luaM_newvectorchecked(S->L, n, Upvaldesc);
|
||||
f->sizeupvalues = n;
|
||||
- for (i = 0; i < n; i++) {
|
||||
+ for (i = 0; i < n; i++)
|
||||
f->upvalues[i].name = NULL;
|
||||
+ for (i = 0; i < n; i++) {
|
||||
f->upvalues[i].instack = loadByte(S);
|
||||
f->upvalues[i].idx = loadByte(S);
|
||||
f->upvalues[i].kind = loadByte(S);
|
||||
--- a/src/lvm.c
|
||||
+++ b/src/lvm.c
|
||||
@@ -1104,7 +1104,7 @@ void luaV_finishOp (lua_State *L) {
|
||||
|
||||
|
||||
#define checkGC(L,c) \
|
||||
- { luaC_condGC(L, L->top = (c), /* limit of live values */ \
|
||||
+ { luaC_condGC(L, (savepc(L), L->top = (c)), \
|
||||
updatetrap(ci)); \
|
||||
luai_threadyield(L); }
|
||||
|
||||
@@ -1792,8 +1792,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
|
||||
vmbreak;
|
||||
}
|
||||
vmcase(OP_VARARGPREP) {
|
||||
- luaT_adjustvarargs(L, GETARG_A(i), ci, cl->p);
|
||||
- updatetrap(ci);
|
||||
+ ProtectNT(luaT_adjustvarargs(L, GETARG_A(i), ci, cl->p));
|
||||
if (trap) {
|
||||
luaD_hookcall(L, ci);
|
||||
L->oldpc = pc + 1; /* next opcode will be seen as a "new" line */
|
||||
--- a/src/ldo.h
|
||||
+++ b/src/ldo.h
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
/* macro to check stack size and GC */
|
||||
#define checkstackGC(L,fsize) \
|
||||
- luaD_checkstackaux(L, (fsize), (void)0, luaC_checkGC(L))
|
||||
+ luaD_checkstackaux(L, (fsize), luaC_checkGC(L), (void)0)
|
||||
|
||||
|
||||
/* type of protected functions, to be ran by 'runprotected' */
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 18 09:51:00 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
|
||||
|
||||
- Add bugs.patch, upstream fixes from https://www.lua.org/bugs.html
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 18 08:59:50 UTC 2020 - Andreas Schwab <schwab@suse.de>
|
||||
|
||||
|
@ -34,6 +34,8 @@ Patch0: lua-build-system.patch
|
||||
# Fix failing test
|
||||
Patch1: attrib_test.patch
|
||||
Patch2: files_test.patch
|
||||
# PATCH-FIX-UPSTREAM https://www.lua.org/bugs.html
|
||||
Patch3: bugs.patch
|
||||
BuildRequires: libtool
|
||||
BuildRequires: lua-macros
|
||||
BuildRequires: pkgconfig
|
||||
|
Loading…
Reference in New Issue
Block a user