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

ZPP Failure on Overflow #835

merged 23 commits into from Dec 13, 2014


4 participants

hikari-no-yume commented Sep 22, 2014

if (zend_isnan(d)) {
return "long";
if (d > ZEND_LONG_MAX || d < ZEND_LONG_MIN) {

This comment has been minimized.


hikari-no-yume Sep 22, 2014


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.

This comment has been minimized.


hikari-no-yume Oct 5, 2014


Since we do overflow checks in a bunch of places, maybe we should have a macro? ZEND_DOUBLE_FITS_LONG(double)?

@hikari-no-yume hikari-no-yume changed the title from ZPP Fail on Overflow to ZPP Failure on Overflow Sep 23, 2014

@smalyshev smalyshev added the RFC label Nov 18, 2014


This comment has been minimized.


hikari-no-yume commented Dec 12, 2014

The RFC was accepted, so I'll probably merge this in sometime soon

@php-pulls php-pulls merged commit d5afeef into php:master Dec 13, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment