lua-users home
lua-l archive

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

> Is there any way to specify a seed when I create a new lua VM ? It's
> very useful for reproduction of bugs .
> If the seed is always random, the order of table iteration would be
> different every time.

Setting the seed is not enough to ensure reproduction of execution: if
your table contains functions or userdata as keys, then the order is
undefined because Lua uses memory addresses to compute key hashes when
keys are functions and userdata.