From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id BD31828043 for ; Fri, 22 Feb 2019 13:30:55 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kk68igHPnm2U for ; Fri, 22 Feb 2019 13:30:55 -0500 (EST) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 76B4D261F4 for ; Fri, 22 Feb 2019 13:30:55 -0500 (EST) Subject: [tarantool-patches] Re: [PATCH 0/4] Fix integer overflow behaviour during VDBE execution References: From: Vladislav Shpilevoy Message-ID: <1492eae1-cf35-2488-29d6-29d8ed73ea79@tarantool.org> Date: Fri, 22 Feb 2019 21:30:52 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org, Nikita Pettik , Kirill Yukhin LGTM. On 20/02/2019 14:57, Nikita Pettik wrote: > Branch: https://github.com/tarantool/tarantool/tree/np/gh-3735-integer-overflow > Issue: https://github.com/tarantool/tarantool/issues/3735 > > Current patch-set fixes integer overflow behaviour during VDBE > execution. Originally, SQLite acts quite misleading in such > situations: intead of raising error, it simply treats overflowed > integers as floating point numbers. Lets fix it everywhere it is > possible (math and CAST operators, validate decoded msgpack). > > Nikita Pettik (4): > sql: raise an error if int is overflowed during math operations > sql: raise an integer overflow error during CAST > sql: refactor sqlVdbeMsgpackGet() > sql: raise integer overflow error during msgpack decode > > src/box/sql/vdbe.c | 21 ++++-- > src/box/sql/vdbeInt.h | 13 +++- > src/box/sql/vdbeaux.c | 132 ++++++++++++++++++------------------- > src/box/sql/vdbemem.c | 8 ++- > test/sql/integer-overflow.result | 76 +++++++++++++++++++++ > test/sql/integer-overflow.test.lua | 34 ++++++++++ > 6 files changed, 205 insertions(+), 79 deletions(-) > create mode 100644 test/sql/integer-overflow.result > create mode 100644 test/sql/integer-overflow.test.lua > > -- > 2.15.1 > >