lua-users home
lua-l archive

Re: Lua 5.4.0-rc5 segfault in low memory conditions

[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.

AltStyle によって変換されたページ (->オリジナル) /