-
Notifications
You must be signed in to change notification settings - Fork 8k
Fix more segfaults in range function #1690
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
Conversation
0841683 to
ed49a2a
Compare
ed49a2a to
b9abcd4
Compare
|
@tpunt, good catch! So you think there's really no chance to fix the pre-condition? As adding one more condition to the loop which can have many iterations doesn't look nice. I haven't look deep, but there should be a way to have a formula like for highest/lowest value to double check, just for the case. Thanks. |
|
I've refactored the patch so that the range of values are calculated from the array size calculation (rather than checking the intermediary Thanks, |
|
Dups with #1677 ? |
|
Ok thx for details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so __calc_size dosen't need to go out of scope anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. I'll rectify that now (as well as in PR #1677).
|
@tpunt can we merge them please? It is the same function, so it'll be easier for having an overview. Thanks. |
|
I mean merge two PRs into one :) Thanks. |
|
Ok, I'll merge them now and submit a new PR. |
|
Superseded by PR #1695. |
The segfaults are caused by precision loss of large longs being converted to doubles when the
stepparameter is a double. The for loops continue infinitely since thestepbeing added/subtracted upon each iteration is too small to be represented accurately as a double.The segfaults can be reproduced with:
This fixes Bug #71197