[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Can lua_next() error?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 16 Apr 2018 13:04:52 -0300
> On Mon, Apr 16, 2018 at 2:22 PM, Tom Sutcliffe <firstname.lastname@example.org> 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.)