[Tarantool-patches] [PATCH luajit 1/2] Fix frame for on-trace out-of-memory error.

Sergey Kaplun skaplun at tarantool.org
Mon Sep 11 11:04:28 MSK 2023


Hi, Maxim!
Thanks for the patch!
LGTM, just two minor nits below.

On 05.09.23, Maxim Kokryashkin wrote:
> Reported by ruidong007.

<snipped>

> diff --git a/test/tarantool-tests/lj-1004-oom-error-frame/testoomframe.c b/test/tarantool-tests/lj-1004-oom-error-frame/testoomframe.c
> new file mode 100644
> index 00000000..a54eac63
> --- /dev/null
> +++ b/test/tarantool-tests/lj-1004-oom-error-frame/testoomframe.c
> @@ -0,0 +1,17 @@
> +#include <lua.h>
> +#include <lauxlib.h>
> +
> +static int allocate_userdata(lua_State *L) {

Nit: Please, start function's block from the new line, i.e:

| {
| 	lua_newuserdata(L, 1);
| 	return 1;
| }

> +	lua_newuserdata(L, 1);
> +	return 1;
> +}
> +
> +static const struct luaL_Reg testoomframe[] = {
> +	{"allocate_userdata", allocate_userdata},
> +	{NULL, NULL}
> +};
> +
> +LUA_API int luaopen_testoomframe(lua_State *L) {

Ditto.

> +	luaL_register(L, "testoomframe", testoomframe);
> +	return 1;
> +}
> -- 
> 2.41.0
> 

-- 
Best regards,
Sergey Kaplun


More information about the Tarantool-patches mailing list