From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id AA3454765E0 for ; Fri, 25 Dec 2020 12:37:30 +0300 (MSK) Date: Fri, 25 Dec 2020 12:37:24 +0300 From: Igor Munkin Message-ID: <20201225093724.GE5396@tarantool.org> References: <0adaa12ef5be0efc1d9c79ab746b8149c252d661.1608142899.git.skaplun@tarantool.org> <20201221092415.GT5396@tarantool.org> <20201224064656.GH9101@root> <4216B30D-84B1-4A46-8DD7-C1A51587D7FF@tarantool.org> <20201224212037.GM9101@root> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20201224212037.GM9101@root> Subject: Re: [Tarantool-patches] [PATCH luajit v1 03/11] profile: introduce profiler writing module List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Sergey, On 25.12.20, Sergey Kaplun wrote: > On 24.12.20, Sergey Ostanevich wrote: > > > > +void lj_wbuf_init(struct lj_wbuf *buf, lj_wbuf_writer writer, void *ctx, > > + uint8_t *mem, size_t size) > > +{ > > + lua_assert(size >= LEB128_U64_MAXSIZE); > > > > Is it meaningful to allocate just 10bytes? > > No, but at least we should check it. We need at least 10bytes buffer to > write huge addresses leb128-encoded. Again, this is a *general purpose write buffer*, so I agree with Sergos, that this assert looks odd here. > > > -- > Best regards, > Sergey Kaplun -- Best regards, IM