[Tarantool-patches] [PATCH luajit] Fix reporting of an error during error handling.

Sergey Bronnikov sergeyb at tarantool.org
Tue Mar 10 17:21:33 MSK 2026


Hi, Sergey!

On 3/4/26 17:31, Sergey Kaplun wrote:


<snipped>

>>> +-- OOM in the error handler.
>>> +coroutine.wrap(function()
>>> +  local function errmem() local _ = {} end
>>> +  allocinject.enable_null_alloc()
>>> +  local st, msg = xpcall(error, errmem)
>>> +  allocinject.disable()
>>> +test:ok(not st, 'OOM incorrect status')
>>> +  -- Prevent preallocated error message.
>>> +test:ok(msg:match('error in ' .. 'error handling'),
>>> +          'OOM incorrect errmsg: ' .. msg)
>>> +end)()
>>> +
>>> +-- STKOV in the error handler.
>> Why abbreviation is used? May be "stack overflow"? Feel free to ignore.
> This is done to be consistent witht the OOM abbreviation above.
> If you don't insist, I would leave them as is.
Ok, let's leave as is. LGTM
>
>>> +coroutine.wrap(function()
>>> +  local function stkov() stkov() end
>>> +  local st, msg = xpcall(error, stkov)
>>> +test:ok(not st, 'STKOV incorrect status')
>>> +  -- Prevent preallocated error message.
>>> +test:ok(msg:match('error in ' .. 'error handling'),
>>> +          'STKOV incorrect errmsg: ' .. msg)
>>> +end)()
>>> +
>>> +test:done(true)
> <snipped>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20260310/857faed4/attachment.htm>


More information about the Tarantool-patches mailing list