Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH 0/4] Fix integer overflow behaviour during VDBE execution
@ 2019-02-20 11:57 Nikita Pettik
  2019-02-20 11:57 ` [tarantool-patches] [PATCH 1/4] sql: raise an error if int is overflowed during math operations Nikita Pettik
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Nikita Pettik @ 2019-02-20 11:57 UTC (permalink / raw)
  To: tarantool-patches; +Cc: v.shpilevoy, Nikita Pettik

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-02-25 11:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-20 11:57 [tarantool-patches] [PATCH 0/4] Fix integer overflow behaviour during VDBE execution Nikita Pettik
2019-02-20 11:57 ` [tarantool-patches] [PATCH 1/4] sql: raise an error if int is overflowed during math operations Nikita Pettik
2019-02-20 11:57 ` [tarantool-patches] [PATCH 2/4] sql: raise an integer overflow error during CAST Nikita Pettik
2019-02-20 11:57 ` [tarantool-patches] [PATCH 3/4] sql: refactor sqlVdbeMsgpackGet() Nikita Pettik
2019-02-20 11:57 ` [tarantool-patches] [PATCH 4/4] sql: raise integer overflow error during msgpack decode Nikita Pettik
2019-02-20 18:25   ` [tarantool-patches] " Konstantin Osipov
2019-02-20 18:39     ` n.pettik
2019-02-20 18:46       ` Konstantin Osipov
2019-02-22 18:30 ` [tarantool-patches] Re: [PATCH 0/4] Fix integer overflow behaviour during VDBE execution Vladislav Shpilevoy
2019-02-25 11:58 ` Kirill Yukhin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox