Commit Graph

105664 Commits

Author SHA1 Message Date
Nikita Popov
b72b1a4e4d Add zend_object_alloc() API
Using ecalloc() to create objects is expensive, because the
dynamic-size memset() is unreasonably slow. Make sure we only
zero the main object structure with known size, as the properties
are intialized separately anyway.

Technically we do not need to zero the embedded zend_object
structure either, but as long as the memset argument is constant,
a couple more bytes don't really matter.
2017-11-25 17:12:37 +01:00
Nikita Popov
8795893f4f Make sure string property/class const values are interned
This was done for user-definde class constant values, however this
is also important for properties and internal classes.
2017-11-25 17:12:37 +01:00
Kalle Sommer Nielsen
c5767db441 We don't check for Windows in the win32/ directory, as files here are only compiled on Windows anyway 2017-11-25 00:54:16 +01:00
Kalle Sommer Nielsen
ffbe801226 PCRE is always available, PHP can't be built without it anyway so these checks makes no sense anymore 2017-11-25 00:40:13 +01:00
Nikita Popov
828d8e635b Fix ZEND_VM_SPEC=0 build 2017-11-24 23:06:01 +01:00
Nikita Popov
6b258197e8 Fix zend_fetch_dimension_const()
Pass IS_TMP_VAR instead of IS_CONST as operand type, as IS_CONST
requires additional guarantees that are not necessarily
satisfied by the caller.
2017-11-24 21:24:13 +01:00
Nikita Popov
9215be76a6 Fix C++ build failure due to format macros
PRIi64 etc. may not be available without this macro definition, on
pre-C++11 compilers. At least I think that's the issue.
2017-11-24 19:02:59 +01:00
dcarlier
287a2b0184 fix constant defined undefined behavior warning 2017-11-24 19:01:46 +01:00
Xinchen Hui
a84c7050fd Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #75556 (Invalid opcode 138/1/1)
2017-11-25 00:54:28 +08:00
Xinchen Hui
c412b8b384 Fixed bug #75556 (Invalid opcode 138/1/1) 2017-11-25 00:54:15 +08:00
Dmitry Stogov
ec2dde0c0b Introduced zend_hash_find_ex() that may avoid unnecessary hash value check. 2017-11-24 14:01:19 +03:00
Dmitry Stogov
ed7f396721 Avoid second hash value check 2017-11-24 12:03:59 +03:00
Dmitry Stogov
33b094479b TYPE_CHECK instruction changed. Now it keeps in extended_value a type mask.
This makes check for "boolean" cheaper and allows check combination e.g. (is_string($a) || is_null($a))
2017-11-23 15:58:34 +03:00
Dmitry Stogov
d5dd27987f Don't mix TYPE and TYPE_INFO 2017-11-23 13:45:21 +03:00
Dmitry Stogov
8349268fa0 Delayed unlikely checks for uninitialized variables 2017-11-23 13:18:52 +03:00
Remi Collet
3adbe476b2 Merge branch 'PHP-7.2'
* PHP-7.2:
  add 7.1 NEW entries
2017-11-23 11:09:06 +01:00
Remi Collet
0dbb327d70 add 7.1 NEW entries 2017-11-23 11:08:53 +01:00
Nikita Popov
d21c902841 Fix cp950 pua check
One set of parenthesis was missing, causing a legitimate compiler
warnings. In the end it doesn't actually matter, because it just
ends up doing an unnecessary check in the w > 0 case.

This fixes the logic and moves it out into a separate functions,
to be a bit more readable.
2017-11-22 23:47:18 +01:00
Anton Artamonov
1dfcd1af9a Fixed bug #70469
Don't generate an E_ERROR if we've already thrown an exception.
This interacts badly with error_get_last() checks.
2017-11-22 23:15:46 +01:00
Colin O'Dell
201930106d Add test for negative lengths in mb_strcut() 2017-11-22 22:47:55 +01:00
Colin O'Dell
830d87b86e Add tests for mb_language() 2017-11-22 22:47:55 +01:00
Dmitry Stogov
10d2a5c09d Merge branch 'PHP-7.2'
* PHP-7.2:
  typo
2017-11-22 16:31:23 +03:00
Dmitry Stogov
2a6a1fd22c typo 2017-11-22 16:30:57 +03:00
Dmitry Stogov
6780c74619 Allowed modification of VM stack page size. Exported few functions. Green light for Fibers/Coroutines. 2017-11-22 15:36:09 +03:00
Anatol Belski
e69fa2865f Eliminate cast 2017-11-22 12:50:50 +01:00
Morva Kristóf
ed0a58d0ae Enable JSON1 for bundled libsqlite 2017-11-22 12:00:13 +01:00
Pedro Magalhães
179ed6e43d
63911: Compare opcodes of the op_array to determine different functions 2017-11-22 05:35:24 +00:00
krakjoe
f3545165b2
Merge branch 'PHP-7.2'
* PHP-7.2:
  Check for binary_location allocation failure
2017-11-22 04:49:52 +00:00
krakjoe
ae810d785c
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Check for binary_location allocation failure
2017-11-22 04:49:43 +00:00
krakjoe
fee6c812c4
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Check for binary_location allocation failure
2017-11-22 04:49:34 +00:00
Sebastian Ramadan
7e0feb8856
Check for binary_location allocation failure 2017-11-22 04:49:04 +00:00
krakjoe
192a77787c
Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix bug #75409
2017-11-22 04:33:23 +00:00
krakjoe
1362c849e8
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #75409
2017-11-22 04:32:42 +00:00
krakjoe
5a7459a082
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #75409
2017-11-22 04:30:59 +00:00
Scott
269d160159
Fix bug #75409 2017-11-22 04:26:54 +00:00
Sebastian Ramadan
7d5691cd69 Fix some printf() specifier usages
Use PRIu32 when printing uint32_t.
Fix some %u/%d confusions.
Add some casts where types are not standardized.
2017-11-21 22:50:27 +01:00
Anatol Belski
1415f27d01 Merge branch 'PHP-7.2'
* PHP-7.2:
  [ci skip] update NEWS
  [ci skip] update NEWS
  [ci skip] update NEWS
2017-11-21 22:25:50 +01:00
Anatol Belski
62e96c2b6f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] update NEWS
  [ci skip] update NEWS
2017-11-21 22:24:54 +01:00
Anatol Belski
9988f05628 [ci skip] update NEWS 2017-11-21 22:24:32 +01:00
Anatol Belski
3ad116b7bd [ci skip] update NEWS 2017-11-21 22:23:31 +01:00
Anatol Belski
b75fd81563 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] update NEWS
2017-11-21 22:22:59 +01:00
Anatol Belski
38be3c4ac4 [ci skip] update NEWS 2017-11-21 22:22:21 +01:00
Anatol Belski
6db15b7dba Fix test 2017-11-21 21:44:09 +01:00
Anatol Belski
c029bd3342 Fix macro name 2017-11-21 20:27:17 +01:00
Anatol Belski
54e7b0a6f7 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed #75539 and #74183 - preg_last_error not returning error code after error
2017-11-21 20:15:30 +01:00
Anatol Belski
f6b0d365a7 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed #75539 and #74183 - preg_last_error not returning error code after error
2017-11-21 20:11:21 +01:00
Anatol Belski
f5c0754f6e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #75539 and #74183 - preg_last_error not returning error code after error
2017-11-21 20:10:49 +01:00
Nester
8fdef981ef Fixed #75539 and #74183 - preg_last_error not returning error code after error 2017-11-21 20:10:18 +01:00
Anatol Belski
12b2c2f5f9 Switch to ZMM routines, closes #2917 2017-11-21 19:38:53 +01:00
Anatol Belski
6b54b3409a Ensure shift doesn't overflow, closes #2916 2017-11-21 18:48:37 +01:00