From 144f0c682a29f08de9eb296730bf80874e6eccee Mon Sep 17 00:00:00 2001 From: Konstantin Osipov <kostja@tarantool.org> Date: Thu, 5 Jul 2012 17:36:47 +0400 Subject: [PATCH] Fix errinj.test and lua.test failures on Mac OS X. Apple Objective C runtime expects that objects passed to object_setClass are first bzeroed. --- mod/box/box_lua.m | 1 + mod/box/request.m | 1 + 2 files changed, 2 insertions(+) diff --git a/mod/box/box_lua.m b/mod/box/box_lua.m index dbd9e72032..654884f112 100644 --- a/mod/box/box_lua.m +++ b/mod/box/box_lua.m @@ -657,6 +657,7 @@ static const struct luaL_reg lbox_iterator_meta[] = { { size_t sz = class_getInstanceSize(self); id new = palloca(fiber->gc_pool, sz, sizeof(void *)); + memset(new, 0, sz); object_setClass(new, self); return new; } diff --git a/mod/box/request.m b/mod/box/request.m index 942fcf2a28..77de17eadb 100644 --- a/mod/box/request.m +++ b/mod/box/request.m @@ -940,6 +940,7 @@ do_update_ops(struct update_cmd *cmd, struct tuple *new_tuple) { size_t sz = class_getInstanceSize(self); id new = palloca(fiber->gc_pool, sz, sizeof(void *)); + memset(new, 0, sz); object_setClass(new, self); return new; } -- GitLab