2018-04-17 20:04 GMT+02:00 Viacheslav Usov <firstname.lastname@example.org
> When we read a spec that does not say that, we do not always
> understand that some combinations of input will result in THAT kind of UB;
> for example, I expected a Lua error to be raised by lua_next() when given a
> non-table input (why? perhaps because it had the 'e" error category?). So
> even though it feels like stating the obvious, it helps.
How about this: put the third paragraph of "4 – The Application Program Interface" in technicolor?As in most C libraries, the Lua API functions do not check their arguments for validity or consistency.However, you can change this behavior by compiling Lua with the macro LUA_USE_APICHECK defined.