Merge pull request #107920 from nagy/lua5_3-update

lua5_3: 5.3.5 -> 5.3.6
This commit is contained in:
Pavol Rusnak 2020-12-30 00:29:30 +01:00 committed by GitHub
commit b7acac3315
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 27 deletions

View File

@ -1,22 +0,0 @@
--- a/src/lapi.c
+++ b/src/lapi.c
@@ -1285,14 +1285,14 @@ LUA_API void *lua_upvalueid (lua_State *
LUA_API void lua_upvaluejoin (lua_State *L, int fidx1, int n1,
int fidx2, int n2) {
- LClosure *f1;
- UpVal **up1 = getupvalref(L, fidx1, n1, &f1);
+ UpVal **up1 = getupvalref(L, fidx1, n1, NULL); /* the last parameter not needed */
UpVal **up2 = getupvalref(L, fidx2, n2, NULL);
+ if (*up1 == *up2) return; /* Already joined */
+ (*up2)->refcount++;
+ if (upisopen(*up2)) (*up2)->u.open.touched = 1;
+ luaC_upvalbarrier(L, *up2);
luaC_upvdeccount(L, *up1);
*up1 = *up2;
- (*up1)->refcount++;
- if (upisopen(*up1)) (*up1)->u.open.touched = 1;
- luaC_upvalbarrier(L, *up1);
}

View File

@ -29,12 +29,12 @@ in rec {
}); });
lua5_3 = callPackage ./interpreter.nix { lua5_3 = callPackage ./interpreter.nix {
sourceVersion = { major = "5"; minor = "3"; patch = "5"; }; sourceVersion = { major = "5"; minor = "3"; patch = "6"; };
hash = "0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac"; hash = "0q3d8qhd7p0b7a4mh9g7fxqksqfs6mr1nav74vq26qvkp2dxcpzw";
patches = patches =
lib.optionals stdenv.isDarwin [ ./5.2.darwin.patch ] ++ [ lib.optionals stdenv.isDarwin [ ./5.2.darwin.patch ];
./CVE-2019-6706.patch
];
postConfigure = lib.optionalString (!stdenv.isDarwin) '' postConfigure = lib.optionalString (!stdenv.isDarwin) ''
cat ${./lua-5.3-dso.make} >> src/Makefile cat ${./lua-5.3-dso.make} >> src/Makefile
sed -e 's/ALL_T *= */& $(LUA_SO)/' -i src/Makefile sed -e 's/ALL_T *= */& $(LUA_SO)/' -i src/Makefile