From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (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 432474696C3 for ; Fri, 17 Apr 2020 23:16:48 +0300 (MSK) From: Nikita Pettik Date: Fri, 17 Apr 2020 23:16:44 +0300 Message-Id: Subject: [Tarantool-patches] [PATCH v2 0/2] Stacked diagnostic area follow-ups List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org Cc: v.shpilevoy@tarantool.org Branch: https://github.com/tarantool/tarantool/tree/np/gh-4887-ref-error-on-prev Issue: https://github.com/tarantool/tarantool/issues/4887 Changes in v2: - modified test so that now it uses weak references to check that gc collected error objects (i.e. there's no memory leaks); - added overflow check in error_ref() so that after 2^32 calls of box.error.last() or error:prev() error object won't contain broken reference counter. Nikita Pettik (2): box/error: don't allow overflow of error ref counter box/error: ref error.prev while accessing it extra/exports | 1 + src/lib/core/diag.c | 21 +++++++++++++ src/lib/core/diag.h | 29 ++++++------------ src/lua/error.c | 3 +- src/lua/error.lua | 13 ++++++++ test/box/error.result | 68 +++++++++++++++++++++++++++++++++++++++++ test/box/error.test.lua | 26 ++++++++++++++++ 7 files changed, 140 insertions(+), 21 deletions(-) -- 2.17.1