1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 00:18:23 +02:00
Commit Graph

1738 Commits

Author SHA1 Message Date
Gabriel Caruso d0ee2a8254 Add is_countable function
RFC: https://wiki.php.net/rfc/is-countable
2018-03-11 16:41:16 +01:00
Bob Weinand 827dff310b Merge branch 'PHP-7.2' 2018-03-10 15:29:21 +01:00
Bob Weinand cfd0979be5 Merge branch 'PHP-7.1' into PHP-7.2 2018-03-10 15:21:16 +01:00
Bob Weinand 9c6df8a238 Fix bug #76074 (opcache corrupts variable in for-loop) 2018-03-10 15:20:45 +01:00
Dmitry Stogov dcbac8ade6 Fixed use-after-free. 2018-03-07 10:21:51 +03:00
Dmitry Stogov 44e1d2f8a9 Merge branch 'PHP-7.2'
* PHP-7.2:
  Replaced usafe reference from SHM to process memory with SHM to SHM reference.
2018-03-06 03:00:46 +03:00
Dmitry Stogov 020a02ef9d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Replaced usafe reference from SHM to process memory with SHM to SHM reference.
2018-03-06 02:47:01 +03:00
Dmitry Stogov 50949c9332 Replaced usafe reference from SHM to process memory with SHM to SHM reference. 2018-03-06 02:43:26 +03:00
Dmitry Stogov 47f5f87826 Merge branch 'PHP-7.2'
* PHP-7.2:
  Don't keep HashTable.pDestructor in SHM and always set it into ZVAL_PTR_DTOR in zval_array_dup(). Keeping pointer to a function in SHM is not safe because of ASLR.
2018-03-06 01:02:31 +03:00
Dmitry Stogov b48d2f6d10 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Don't keep HashTable.pDestructor in SHM and always set it into ZVAL_PTR_DTOR in zval_array_dup(). Keeping pointer to a function in SHM is not safe because of ASLR.
2018-03-06 01:00:14 +03:00
Dmitry Stogov b711a96acb Don't keep HashTable.pDestructor in SHM and always set it into ZVAL_PTR_DTOR in zval_array_dup().
Keeping pointer to a function in SHM is not safe because of ASLR.
2018-03-06 00:56:16 +03:00
Dmitry Stogov d740024e35 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed invalid destructor
2018-03-06 00:47:05 +03:00
Dmitry Stogov b7ebf90221 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed invalid destructor
2018-03-06 00:46:40 +03:00
Dmitry Stogov a83581e223 Fixed invalid destructor 2018-03-06 00:46:19 +03:00
Dmitry Stogov d9d30a7f38 AST is not COPYABLE anymore and its reference-counter doesn't have to be initialized by 2. 2018-03-06 00:30:25 +03:00
Dmitry Stogov 84a0423e05 Set and keep HASH_FLAG_STATIC_KEYS for all HashTables stored in SHM (or file cache). 2018-03-06 00:00:13 +03:00
Dmitry Stogov d76061d5c1 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed invalid destructor
2018-03-05 23:38:15 +03:00
Dmitry Stogov 53baf6fa1d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed invalid destructor
2018-03-05 23:33:53 +03:00
Dmitry Stogov 87553b0730 Fixed invalid destructor 2018-03-05 23:33:08 +03:00
Anatol Belski cf84e5a529 Merge branch 'PHP-7.2'
* PHP-7.2:
  Include username into the file cache path
2018-03-05 15:22:11 +01:00
Anatol Belski 54212dfbf9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Include username into the file cache path
2018-03-05 15:21:31 +01:00
Anatol Belski 27a603e811 Include username into the file cache path 2018-03-05 15:16:55 +01:00
Dmitry Stogov f32b7dbc43 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed "opcache.file_cache_fallback" mode.
2018-03-05 16:21:20 +03:00
Dmitry Stogov a8fbb15311 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed "opcache.file_cache_fallback" mode.
2018-03-05 16:15:38 +03:00
Dmitry Stogov 350082ed71 Fixed "opcache.file_cache_fallback" mode.
It's not safe to change value of ZCG(accel_directives).file_cache_only, becuse it might be altered by INI subsystem.
Use global variable instead.
2018-03-05 16:01:43 +03:00
Dmitry Stogov 6f483dc94c Use macros to update specific parts of GC_TYPE_INFO() (direct assignments to GC_TYPE(), GC_FLAGS() and GC_INFO() are prohibited) 2018-02-28 00:52:12 +03:00
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Nikita Popov df1439241a Simplify code
If operator overloading is ignored tmp will be 0 and we can still
use |=. No need to separate this into two cases.
2018-02-19 21:38:10 +01:00
Anatol Belski 20934d9e18 Reduce struct size by 8 bytes on 64-bit 2018-02-19 14:02:30 +01:00
Dmitry Stogov a02a126d54 Allow optional ignorance of operator overlaoding. Optimizer takes into account possibility of operator overloading at default optimization level, but ignores this possibility at "unsafe" level (opcache.optimization_level=-1). 2018-02-19 12:21:43 +03:00
Nikita Popov 48c0662876 Merge branch 'PHP-7.2' 2018-02-18 17:43:08 +01:00
Nikita Popov 500632ac13 Fix pfsockopen() func info 2018-02-18 17:42:12 +01:00
Nikita Popov c0abab5fca Fix ZEND_SL range inference
This is a bit tricker than right shifts because shifting in the
sign bit flips the sign. The computed bounds are not tight.
2018-02-18 17:42:12 +01:00
Nikita Popov 202989edf8 Fix ZEND_SR range inference
Handle out-of-range RHS correctly.
2018-02-18 17:42:12 +01:00
Nikita Popov 40ff001381 Fix constant() func info
Since PHP 5.6 this can also be an array.
2018-02-18 17:42:11 +01:00
Nikita Popov c404b27135 Fix pg_pconnect() func info 2018-02-18 16:22:17 +01:00
Nikita Popov 1b54a62fcf Fix gettext func infos 2018-02-18 16:22:16 +01:00
Nikita Popov 705dc3f049 Fix DCE test
Without the type hint the previous optimization no longer applied,
as the result could be an (overloaded) object, which might have
caused dtor effect reordering.
2018-02-18 15:37:10 +01:00
Nikita Popov a5fa7555dd More mysqli func info fixes
Mainly changing resource returns to objects
2018-02-18 15:34:16 +01:00
Nikita Popov 85597e2932 Merge branch 'PHP-7.2' 2018-02-18 15:34:04 +01:00
Nikita Popov ae837db8cf Handle overloaded GMP operators in type inference 2018-02-18 15:33:30 +01:00
Nikita Popov 39974dd65d Disable negative range inference
The negative range inference implementation does not work correctly,
and it's not clear right now how it can be fixed. As such, disable
it entirely for now.
2018-02-18 15:33:28 +01:00
Nikita Popov b889ff309b Fix lcfirst() + ucfirst() func info
These may return the original string
2018-02-17 23:22:44 +01:00
Nikita Popov ea1a51f71b Fix bcpowmod() func_info
Returns false on error
2018-02-17 23:22:44 +01:00
Nikita Popov 9c4783cbd3 Fix error_get_last() func info 2018-02-17 23:22:44 +01:00
Nikita Popov d59c45d112 Fix mysqli_connect() func info
This function returns an object, not a resource...
2018-02-17 23:22:44 +01:00
Nikita Popov 50def51d19 Fix bcscale() function info
Master only: This function now returns the old scale.
2018-02-17 23:22:43 +01:00
Nikita Popov 2cd40b3aed Merge branch 'PHP-7.2' 2018-02-17 23:21:31 +01:00
Nikita Popov 846e8a3ec9 Fix COUNT range inference
count() on objects may return a negative number :(
2018-02-17 23:18:30 +01:00
Nikita Popov fa7c23ba27 Fix hash_init() and hash_copy() func info
These functions were switched to use objects instead of resources.
2018-02-17 23:18:29 +01:00