Skip to content

MDEV-28374 UBSAN signed integer overflow PROCEDURE ANALYSE#5038

Merged
grooverdan merged 2 commits into
MariaDB:10.11from
grooverdan:MDEV-28374
May 12, 2026
Merged

MDEV-28374 UBSAN signed integer overflow PROCEDURE ANALYSE#5038
grooverdan merged 2 commits into
MariaDB:10.11from
grooverdan:MDEV-28374

Conversation

@grooverdan
Copy link
Copy Markdown
Member

PROCEDURE ANALYSE returns a Std (Standard deviation) which involves the sum of squares, which can exceed the longlong datatypes.

Emit a ER_DATA_OVERFLOW warning when encountering types that overflow the values for the Std output.

Adjust the sum_sqr value to double to acocunt that its only used in a double context and precision isn't required.

@grooverdan grooverdan requested a review from abarkov May 4, 2026 04:19
@grooverdan grooverdan added the MariaDB Foundation Pull requests created by MariaDB Foundation label May 4, 2026
@grooverdan grooverdan force-pushed the MDEV-28374 branch 3 times, most recently from 5bc7f18 to 8dc6453 Compare May 4, 2026 07:05
@grooverdan grooverdan changed the title 3MDEV-28374 UBSAN signed integer overflow PROCEDURE ANALYSE MDEV-28374 UBSAN signed integer overflow PROCEDURE ANALYSE May 8, 2026
PROCEDURE ANALYSE returns a Std (Standard deviation) which involves the
sum of squares, which can exceed the longlong datatypes.

Adjust the sum_sqr and sum value to double to acocunt that its only used
in a double context and precision isn't required.

Reviewed by: Alexander Barkov
Copy link
Copy Markdown
Contributor

@abarkov abarkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch is OK to push.

@grooverdan grooverdan enabled auto-merge (rebase) May 12, 2026 05:00
@grooverdan grooverdan merged commit 6eda0af into MariaDB:10.11 May 12, 2026
16 of 18 checks passed
@grooverdan grooverdan deleted the MDEV-28374 branch May 12, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MariaDB Foundation Pull requests created by MariaDB Foundation

Development

Successfully merging this pull request may close these issues.

2 participants