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

Backport to 2.10.x: #5499: Do not segfault on large histogram() parameters #5503

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

timescale-automation
Copy link

This is an automated backport of #5499: Do not segfault on large histogram() parameters.
The original issue is #5489.
This PR will be merged automatically after all the relevant CI checks pass. If this fix should not be backported, or will be backported manually, just close this PR. You can use the backport branch to add your changes, it won't be modified automatically anymore.

For more details, please see the documentation

Original description

Do not segfault on large histogram() parameters

There is a bug in width_bucket() causing an overflow and subsequent NaN value as a result of dividing with +inf. The NaN value is interpreted as an integer and hence generates an index out of range for the buckets.

This commit fixes this by generating an error rather than segfaulting for bucket indexes that are out of range.

Fixes #5489

There is a bug in `width_bucket()` causing an overflow and subsequent
NaN value as a result of dividing with `+inf`. The NaN value is
interpreted as an integer and hence generates an index out of range for
the buckets.

This commit fixes this by generating an error rather than
segfaulting for bucket indexes that are out of range.

(cherry picked from commit 777c599)
@codecov
Copy link

codecov bot commented Mar 28, 2023

Codecov Report

❗ No coverage uploaded for pull request base (2.10.x@faf84ca). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             2.10.x    #5503   +/-   ##
=========================================
  Coverage          ?   90.67%           
=========================================
  Files             ?      226           
  Lines             ?    52099           
  Branches          ?        0           
=========================================
  Hits              ?    47239           
  Misses            ?     4860           
  Partials          ?        0           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@timescale-automation timescale-automation merged commit 6b84452 into 2.10.x Mar 28, 2023
@timescale-automation timescale-automation deleted the backport/2.10.x/5499 branch March 28, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is-auto-backport PR created by backport automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants