Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src/include/duckdb/core_functions/aggregate/sum_helpers.hpp:59:15: runtime error: signed integer overflow: 9223372036854775807 + 9223372036854775807 cannot be represented in type 'long int' #233

Closed
fuzzerofducks opened this issue Jun 6, 2023 · 1 comment

Comments

@fuzzerofducks
Copy link
Collaborator

Issue found by DuckFuzz (Functions) on git commit hash 57912 using seed 759764102.

To Reproduce

create table all_types as select * exclude(small_enum, medium_enum, large_enum) from test_all_types();
SELECT sum_no_overflow(c1) FROM test_vector_types(CAST(NULL AS BIGINT)) AS test_vector_types(c1);

Error Message

src/include/duckdb/core_functions/aggregate/sum_helpers.hpp:59:15: runtime error: signed integer overflow: 9223372036854775807 + 9223372036854775807 cannot be represented in type 'long int'
@Mytherin
Copy link
Contributor

Mytherin commented Jun 6, 2023

As indicated by the name sum_no_overflow allows overflows on purpose - perhaps we should disallow either users or the fuzzer from generating this function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants