Hi Lukas! On Mon, Jan 05, 2026 at 11:30:32AM +0100, Lukas Tribus wrote: > Hello, > > On Fri, 2 Jan 2026 at 18:13, Willy Tarreau <[email protected]> wrote: > > > > Hi Mike, > > > > On Fri, Jan 02, 2026 at 03:23:03PM +0000, PR Bot wrote: > > > From 53ceddc6a32ee7e3bde33b26e16a3fcbd44eb0df Mon Sep 17 00:00:00 2001 > > > From: Mike Lothian <[email protected]> > > > Date: Fri, 2 Jan 2026 14:38:10 +0000 > > > Subject: [PATCH] MINOR: hlua: Add support for lua 5.5 > > > > > > --- > > > src/hlua.c | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > > > diff --git a/src/hlua.c b/src/hlua.c > > > index 5109d3c04b33d..c3513cbca27ac 100644 > > > --- a/src/hlua.c > > > +++ b/src/hlua.c > > > @@ -14027,7 +14027,11 @@ lua_State *hlua_init_state(int thread_num) > > > struct prepend_path *pp; > > > > > > /* Init main lua stack. */ > > > +#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 505 > > > + L = lua_newstate(hlua_alloc, &hlua_global_allocator, 0); > > > +#else > > > L = lua_newstate(hlua_alloc, &hlua_global_allocator); > > > +#endif > > > > > > if (!L) { > > > fprintf(stderr, > > > Is it good enough to initialize lua_newstate with 0 seed? > > Before LUA 5.5, this function generated randomness internally. Since > 5.5 it no longer does (requiring a seed), so by initializing it with a > static 0 seed, we probably change some subsequent behavior that used > to be random. > Perhaps luaL_makeseed(0) or a haproxy provided randomness functions > should be used instead of plain 0? > I have no idea how this really affects LUA applications. > > This is the change in LUA: > https://github.com/lua/lua/commit/5a04f1851e0d42b4bcbb0af103490bc964e985aa
Oh, great catch, you're right indeed! Maybe it would be better to pass statistical_prng() in this case, as it looks like the previous RNG was only time-related, hence not critical. Willy

