-
Notifications
You must be signed in to change notification settings - Fork 8k
ZPP Failure on Overflow #835
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
Zend/zend_API.c
Outdated
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.
bwoebi pointed out that I should check for (double)(ZEND_LONG_MAX + 1) on 32-bit as (double)(ZEND_LONG_MAX + 0.5) wouldn't truncate. I should probably #if this.
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.
Since we do overflow checks in a bunch of places, maybe we should have a macro? ZEND_DOUBLE_FITS_LONG(double)?
44f3e15 to
d5afeef
Compare
|
The RFC was accepted, so I'll probably merge this in sometime soon |
WIP patch for this RFC: https://wiki.php.net/rfc/zpp_fail_on_overflow