rfc:range_checks_for_64_bit
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:range_checks_for_64_bit [2015/08/24 15:53] – ab | rfc:range_checks_for_64_bit [2015/08/24 16:14] – ab | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PHP RFC: Range checks for external | + | ====== PHP RFC: Range checks for external |
* Version: 0.9 | * Version: 0.9 | ||
* Date: 2015-08-24 | * Date: 2015-08-24 | ||
Line 36: | Line 36: | ||
#if SIZEOF_INT == SIZEOF_ZEND_LONG | #if SIZEOF_INT == SIZEOF_ZEND_LONG | ||
- | # define | + | # define |
#else | #else | ||
# define ZEND_LONG_UINT_OVFL(zlong) ((zlong) < 0 || (zlong) > (zend_long)UINT_MAX) | # define ZEND_LONG_UINT_OVFL(zlong) ((zlong) < 0 || (zlong) > (zend_long)UINT_MAX) | ||
Line 55: | Line 55: | ||
</ | </ | ||
- | All the macros should be put into a dedicated header, so any extensions can be put there. | + | All the macros should be put into a dedicated header, so any extensions |
==== Proposed ZPP changes ==== | ==== Proposed ZPP changes ==== | ||
Line 150: | Line 150: | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
- | Several new warnings or harder error handling might be introduced with the new range checks. However this should only affect the edge cases where the erorrs | + | Several new warnings or harder error handling might be introduced with the new range checks. However this should only affect the edge cases where the errors |
===== Proposed PHP Version(s) ===== | ===== Proposed PHP Version(s) ===== | ||
Line 178: | Line 178: | ||
===== Future Scope ===== | ===== Future Scope ===== | ||
+ | |||
Having this minimalistic start as a base, the topic of overflows in the mathematical operations can be entered. This topic is not handled by this RFC. | Having this minimalistic start as a base, the topic of overflows in the mathematical operations can be entered. This topic is not handled by this RFC. | ||
+ | |||
+ | Also, some good patterns for other cases can be added later by need. Like compare int vs size_t, or compare variables with different sizes. | ||
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== |
rfc/range_checks_for_64_bit.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1