[tarantool-patches] [PATCH 0/4] Fix integer overflow behaviour during VDBE execution

Nikita Pettik korablev at tarantool.org
Wed Feb 20 14:57:36 MSK 2019

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


More information about the Tarantool-patches mailing list