lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>>>>> "Sergey" == Sergey Zakharchenko <doublef.mobile@gmail.com> writes:

 Sergey> I know you're tired of my messages, but behold the ultimate
 Sergey> test case for this particular (no longer sure it's one and the
 Sergey> same bug throughout this thread):

See if this fixes both of them:

--- src/lparser.c.orig  2020-06-13 19:57:47.428734000 +0100
+++ src/lparser.c       2020-06-13 19:58:08.039573000 +0100
@@ -1977,6 +1977,7 @@
   sethvalue2s(L, L->top, lexstate.h);  /* anchor it */
   luaD_inctop(L);
   funcstate.f = cl->p = luaF_newproto(L);
+  luaC_objbarrier(L, cl, cl->p);
   funcstate.f->source = luaS_new(L, name);  /* create and anchor TString */
   luaC_objbarrier(L, funcstate.f, funcstate.f->source);
   lexstate.buff = buff;


-- 
Andrew.