lua-users home
lua-l archive

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

> On Mon, Apr 16, 2018 at 2:22 PM, Tom Sutcliffe <> wrote:
> > I've been reviewing some of my native code for safety and noticed that
> I've been assuming lua_next() will not raise arbitrary errors.
> Not only can it raise an error, it can also crash.

Practically all functions in the Lua-C API can crash, when called with
invalid arguments. It would be expensive, and often impossible, to check
for that kind of errors. (I believe this happens with most C libraries.)

-- Roberto