[Tarantool-patches] [PATCH luajit] Fix reporting of an error during error handling.
Sergey Kaplun
skaplun at tarantool.org
Wed Mar 4 17:31:48 MSK 2026
Hi, Sergey!
Thanks for the review!
See my answer below.
On 04.03.26, Sergey Bronnikov wrote:
> Hi, Sergey!
>
> thanks for the patch! LGTM with minor comments below.
>
> Sergey
>
> On 3/2/26 11:23, Sergey Kaplun wrote:
> > From: Mike Pall <mike>
> >
> > Reported by Sergey Kaplun.
> >
> > (cherry picked from commit 54a162688ed25902122077149df9b456bc5a763e)
> >
<snipped>
> > +-- OOM on the creation of ERRERR message.
> > +coroutine.wrap(function()
> > + allocinject.enable_null_alloc()
> > + local st, msg = xpcall(error, error)
> > + allocinject.disable()
> > +test:ok(not st, 'OOM ERRERR incorrect status')
> > + -- Prevent preallocated error message.
> > +test:ok(msg:match('error in ' .. 'error handling'),
> > + 'OOM ERRERR incorrect errmsg: ' .. msg)
> > +end)()
> > +
> > +-- 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.
> > +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>
--
Best regards,
Sergey Kaplun
More information about the Tarantool-patches
mailing list