[Tarantool-patches] [PATCH luajit 1/3] test: unify helpers for a custom allocator setting

Sergey Kaplun skaplun at tarantool.org
Tue Mar 11 15:38:50 MSK 2025


Hi, Sergey!
Thanks for the review!
Fixed your comments and force-pushed the branch.

On 11.03.25, Sergey Bronnikov wrote:
> Hi, Sergey!
> 
> Thanks for the patch! LGTM with two comments below.
> 
> Feel free to ignore.
> 
> Sergey
> 
> On 10.03.2025 17:51, Sergey Kaplun wrote:
> > This patch merges two Lua C libraries that contain custom Lua allocators
> > with the injection of returning `NULL` into 1 library
> Minor: s/1/a single/

Fixed.

> > <utils/allocinject.c>. The new library contains 2 helpers:
> Minor: s/2/two/

Fixed.

> > * `enable_null_alloc()` -- returns `NULL` on every allocation (not
> >    reallocation).
> > * `enable_null_doubling_realloc()` -- returns `NULL` on every
> >    reallocation that doubles the size of the object. It can be useful for
> >    testing corner cases, like OOM during IR/snapshot buffer reallocation
> >    during trace recording.
> > The original allocator is returned via the `disable()` library function.
> >
> > The unified library helps to avoid code duplication and can be reused
> > for future tests.
> >
> > Needed for tarantool/tarantool#11055
> > ---

<snipped>

-- 
Best regards,
Sergey Kaplun


More information about the Tarantool-patches mailing list