BUG/MAJOR: lua: some function are not yieldable, the forced yield causes errors

The hook function called each nth Lua instructions just
do a yield. Sometimes this yield is not allowed, because
some functions are not compatible.

The Lua-5.3 permits to known if the yield is avalaible with
the function lua_isyieldable().

If the processing is interrupted in non yieldable state,
we try to execute a yield asap. The yield will be may
available at the end of the non-yieldable currently
executed function. So, we require interrupt at the end
of the current function.

But, Lua cannot yield when its returning from a function,
so, we can fix the interrupt hook to 1 instruction,
expecting that the function is finnished.

During this time, the execution timeout is always checked.
1 file changed