Fri Mar 25 08:15:20 2016 UTC ()
Apply second and third patch from http://lua.org/bugs.html.


(mbalmer)
diff -r1.4 -r1.5 src/external/mit/lua/dist/src/lparser.c
diff -r1.11 -r1.12 src/external/mit/lua/dist/src/lstrlib.c

cvs diff -r1.4 -r1.5 src/external/mit/lua/dist/src/lparser.c (expand / switch to context diff)
--- src/external/mit/lua/dist/src/lparser.c 2016/01/28 14:41:39 1.4
+++ src/external/mit/lua/dist/src/lparser.c 2016/03/25 08:15:20 1.5
@@ -1,4 +1,4 @@
-/*	$NetBSD: lparser.c,v 1.4 2016/01/28 14:41:39 lneto Exp $	*/
+/*	$NetBSD: lparser.c,v 1.5 2016/03/25 08:15:20 mbalmer Exp $	*/
 
 /*
 ** Id: lparser.c,v 2.149 2015/11/02 16:09:30 roberto Exp 
@@ -1240,7 +1240,7 @@
   checkrepeated(fs, ll, label);  /* check for repeated labels */
   checknext(ls, TK_DBCOLON);  /* skip double colon */
   /* create new entry for this label */
-  l = newlabelentry(ls, ll, label, line, fs->pc);
+  l = newlabelentry(ls, ll, label, line, luaK_getlabel(fs));
   skipnoopstat(ls);  /* skip other no-op statements */
   if (block_follow(ls, 0)) {  /* label is last no-op statement in the block? */
     /* assume that locals are already out of scope */

cvs diff -r1.11 -r1.12 src/external/mit/lua/dist/src/lstrlib.c (expand / switch to context diff)
--- src/external/mit/lua/dist/src/lstrlib.c 2016/01/28 14:41:39 1.11
+++ src/external/mit/lua/dist/src/lstrlib.c 2016/03/25 08:15:20 1.12
@@ -1,4 +1,4 @@
-/*	$NetBSD: lstrlib.c,v 1.11 2016/01/28 14:41:39 lneto Exp $	*/
+/*	$NetBSD: lstrlib.c,v 1.12 2016/03/25 08:15:20 mbalmer Exp $	*/
 
 /*
 ** Id: lstrlib.c,v 1.239 2015/11/25 16:28:17 roberto Exp 
@@ -692,6 +692,7 @@
 static int gmatch_aux (lua_State *L) {
   GMatchState *gm = (GMatchState *)lua_touserdata(L, lua_upvalueindex(3));
   const char *src;
+  gm->ms.L = L;
   for (src = gm->src; src <= gm->ms.src_end; src++) {
     const char *e;
     reprepstate(&gm->ms);