Re: [PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h

2012-07-08 Thread Nuno Lopes
Ok. I don 't have a MSVC setup handy. Can you please test if replacing that line with 'idx = 0 - idx;' fixes the warnings for you? Seems to do the trick. Is 0- same as - for unsigned on all compilers (I know common sense says it should be but when compilers are concerned it's better to be sure

Re: [PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h

2012-07-06 Thread Stas Malyshev
Hi! Ok. I don 't have a MSVC setup handy. Can you please test if replacing that line with 'idx = 0 - idx;' fixes the warnings for you? Seems to do the trick. Is 0- same as - for unsigned on all compilers (I know common sense says it should be but when compilers are concerned it's better to be

Re: [PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h

2012-07-04 Thread Stas Malyshev
Hi! Commit:91ce8041a3e85594e81466a528f8d55cdc164c1f Author:Nuno Lopes nlop...@php.net Mon, 2 Jul 2012 01:31:40 -0400 Parents: be4053cea0462c9de5396641f4e4fa2f56f5a675 Branches: PHP-5.4 Link:

Re: [PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h

2012-07-04 Thread Nuno Lopes
Hi! Commit:91ce8041a3e85594e81466a528f8d55cdc164c1f Author:Nuno Lopes nlop...@php.net Mon, 2 Jul 2012 01:31:40 -0400 Parents: be4053cea0462c9de5396641f4e4fa2f56f5a675 Branches: PHP-5.4 Link:

Re: [PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h

2012-07-02 Thread Stas Malyshev
Hi! Could you please explain this commit? idx is ulong, why this change improves anything? Commit:91ce8041a3e85594e81466a528f8d55cdc164c1f Author:Nuno Lopes nlop...@php.net Mon, 2 Jul 2012 01:31:40 -0400 Parents: be4053cea0462c9de5396641f4e4fa2f56f5a675 Branches: PHP-5.4

Re: [PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h

2012-07-02 Thread Nuno Lopes
In that code path, it's possible that idx == LONG_MAX+1. Casting that value to a signed long is undefined behavior (since it overflows), which means that the compiler can do bad things with that. With this patch we will basically do the same operation, but over an unsigned long, thus avoiding

[PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h

2012-07-01 Thread Nuno Lopes
Commit:f2bf98a589b63ea6e604036eb6ab02aba5fce5ef Author:Nuno Lopes nlop...@php.net Mon, 2 Jul 2012 01:31:40 -0400 Parents: 8d81a03e434e5476c4c7832b8bcafcaa31fb474e Branches: master Link:

[PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h

2012-07-01 Thread Nuno Lopes
Commit:d80ff391899f7aead3b9b9c6c084adba8a8203ba Author:Nuno Lopes nlop...@php.net Mon, 2 Jul 2012 01:31:40 -0400 Parents: 250393f92523fffe643df06a1de2101fd50a327e Branches: PHP-5.3 Link:

[PHP-CVS] com php-src: fix (signed) integer overflow (part of bug #52550: Zend/zend_hash.h

2012-07-01 Thread Nuno Lopes
Commit:91ce8041a3e85594e81466a528f8d55cdc164c1f Author:Nuno Lopes nlop...@php.net Mon, 2 Jul 2012 01:31:40 -0400 Parents: be4053cea0462c9de5396641f4e4fa2f56f5a675 Branches: PHP-5.4 Link: