mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-27 03:45:11 +00:00
Merged patch series by Tomasz Grabiec: UBSAN complains in debug mode when the counter value overflows: counters.hh:184:16: runtime error: signed integer overflow: 1 + 9223372036854775807 cannot be represented in type 'long int' Aborting on shard 0. Overflow is supposed to be supported. Let's silence it by using casts. Fixes #7330. Tests: - build/debug/test/tools/cql_repl --input test/cql/counters_test.cql Tomasz Grabiec (2): counters: Avoid signed integer overflow test: cql: counters: Add tests reproducing signed integer overflow in debug mode counters.hh | 2 +- test/cql/counters_test.cql | 9 ++++++++ test/cql/counters_test.result | 48 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-)