1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Make the sum() function less precise and slower in order to avoid

harmless signed integer overflow UBSAN warnings from OSS-Fuzz.

FossilOrigin-Name: 1be0646a2c352dbf03d2af87fd48b6f9edfd68666790ac6863144ac95f3e0621
This commit is contained in:
drh
2023-06-30 11:51:36 +00:00
parent 2ddfa6a360
commit 60f41362cf
5 changed files with 26 additions and 15 deletions

View File

@ -910,7 +910,7 @@ if {[working_64bit_int]} {
(SELECT 9223372036854775807 AS x UNION ALL
SELECT -10 AS x);
}
} {0 9223372036854775797}
} {1 {integer overflow}}
do_test func-18.17 {
catchsql {
SELECT sum(x) FROM
@ -1557,8 +1557,8 @@ do_catchsql_test func-37.110 {
SELECT sum(x) FROM c;
} {1 {integer overflow}}
do_catchsql_test func-37.120 {
WITH c(x) AS (VALUES(9223372036854775807),(100),(-101))
WITH c(x) AS (VALUES(9223372036854775807),(10000),(-10010))
SELECT sum(x) FROM c;
} {0 9223372036854775806}
} {1 {integer overflow}}
finish_test