lua-users home
lua-l archive

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


> $ ./lua
> Lua 5.3.0  Copyright (C) 1994-2015 Lua.org, PUC-Rio
> > t ={}; for i = 1, 4096 do t[i] = i end; f=io.lines("/dev/null", table.unpack(t));
> lua: lapi.c:534: lua_pushcclosure: Assertion `(n <= (0x7f * 2 + 1)) &&
> "upvalue index too large"' failed.
> Aborted (core dumped)
> 
> 
> Assertions must be turned on to see this bug.

With some luck, we can see it without assertions:

  > t ={}; for i = 1, 253 do t[i] = 1 end
  > io.lines("lua.h", table.unpack(t))()
  Segmentation fault (core dumped)

-- Roberto