Compare commits

...
Author SHA1 Message Date
Remi Collet 316802d8f2 Update versions for PHP 7.2.0beta3 2017-08-15 08:39:24 +00:00
Remi Collet 6c1c49d1b5 Update NEWS for PHP 7.2.0beta3 2017-08-15 08:39:24 +00:00
Anatol Belski 6e3356837d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  move dev to 7.0.24
2017-08-15 09:36:41 +02:00
Anatol Belski 49501f8f41 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  move dev to 7.0.24
2017-08-15 09:36:14 +02:00
Anatol Belski 3af6201224 move dev to 7.0.24 2017-08-15 09:33:30 +02:00
Xinchen Hui 6b77792dc2 Update NEWS 2017-08-15 12:35:17 +08:00
Xinchen Hui 05de40a651 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #75075 (unpack with X* causes infinity loop)
2017-08-15 12:35:10 +08:00
Xinchen Hui 6275825c68 Update NEWS 2017-08-15 12:34:58 +08:00
Xinchen Hui 4f8e703854 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75075 (unpack with X* causes infinity loop)
2017-08-15 12:34:37 +08:00
Xinchen Hui d8c80af71e Fixed bug #75075 (unpack with X* causes infinity loop) 2017-08-15 12:34:13 +08:00
Tianfang Yang 9ec0a2071c Merge branch 'PHP-7.1' into PHP-7.2 2017-08-14 21:22:17 -04:00
Tianfang Yang e112d71435 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-14 21:21:11 -04:00
Tianfang Yang 2def85688d Merge branch 'syncoci8' into PHP-7.0 2017-08-14 21:16:34 -04:00
Tianfang Yang 259477826c Prepare for PECL release 2017-08-14 21:14:14 -04:00
Anatol Belski 5dc847c53d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Test cleanup improvements, files might be locked in the test process
2017-08-14 14:40:26 +02:00
Anatol Belski 1f3b87dc11 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Test cleanup improvements, files might be locked in the test process
2017-08-14 14:39:58 +02:00
Anatol Belski ab07265573 Test cleanup improvements, files might be locked in the test process 2017-08-14 13:08:04 +02:00
Anatol Belski 707b2a529e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix test cleanup
2017-08-14 12:56:49 +02:00
Anatol Belski bd0b0cc8c9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix test cleanup
2017-08-14 12:55:58 +02:00
Anatol Belski 71fd58652f fix test cleanup 2017-08-14 12:55:14 +02:00
Dmitry Stogov df5104bfc9 Fixed removing dead live ranges 2017-08-14 13:54:52 +03:00
Anatol Belski 112afb9250 [ci skip] update NEWS 2017-08-14 12:24:51 +02:00
Anatol Belski 2492add033 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] update NEWS
2017-08-14 12:24:20 +02:00
Anatol Belski 73d84d4bbd [ci skip] update NEWS 2017-08-14 12:23:51 +02:00
Dmitry Stogov 18f567a3b4 Fixed test 2017-08-14 12:37:37 +03:00
Dmitry Stogov a80e462fbd Order live ranges according to "start" position 2017-08-14 12:21:07 +03:00
Dmitry Stogov cd6893aed1 Fixed attempt to free invalid structure (result of ROPE_INIT is not a zval) 2017-08-14 12:11:25 +03:00
Dmitry Stogov d6406bbf5f Merge branch 'PHP-7.2' of git.php.net:php-src into PHP-7.2
* 'PHP-7.2' of git.php.net:php-src:
  Revert "Fixed live_range removing (bug can be triggred by JIT)"
2017-08-14 12:00:30 +03:00
Dmitry Stogov 2fab62271a Revert "Fixed live_range removing (bug can be triggred by JIT)"
This reverts commit aecf996510.
2017-08-14 12:00:02 +03:00
Xinchen Hui 6445b3a68f Revert "Fixed live_range removing (bug can be triggred by JIT)"
This reverts commit aecf996510.
2017-08-14 16:59:01 +08:00
Tianfang Yang 1135161b4f Merge branch 'PHP-7.1' into PHP-7.2 2017-08-14 00:36:33 -04:00
Tianfang Yang 4d936c1254 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-14 00:23:41 -04:00
Tianfang Yang f555224743 Sync OCI8 on PHP 7.x branches 2017-08-13 23:44:24 -04:00
Anatol Belski 0a2a136111 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75063
2017-08-14 00:51:47 +02:00
Anatol Belski 3069ad8dd1 Fixed bug #75063 2017-08-14 00:44:19 +02:00
Christoph M. Becker 36eddfc785 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #73793 (WDDX uses wrong decimal seperator)
2017-08-13 21:05:57 +02:00
Christoph M. Becker 207105b1a3 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73793 (WDDX uses wrong decimal seperator)
2017-08-13 21:03:45 +02:00
Christoph M. Becker f64be0b013 Fixed bug #73793 (WDDX uses wrong decimal seperator)
The WDDX specification[1] requires to serialize floats with a decimal
point, but `snprintf()` is locale-dependent and may use a decimal
comma. We fix that afterwards by replacing an eventual comma with a
point.

[1] <http://xml.coverpages.org/wddx0090-dtd-19980928.txt>
2017-08-13 20:51:53 +02:00
Christoph M. Becker bbf39c550f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Skip this test if ext/session is not available
2017-08-13 18:10:37 +02:00
Christoph M. Becker de5a5f6fdc Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Skip this test if ext/session is not available
2017-08-13 18:07:42 +02:00
Christoph M. Becker 472b25921e Skip this test if ext/session is not available 2017-08-13 18:05:45 +02:00
Nikita Popov b202587e09 Note deprecation of $errcontext 2017-08-12 20:34:44 +02:00
Nikita Popov a871badf2a Merge branch 'PHP-7.1' into PHP-7.2 2017-08-12 13:17:24 +02:00
Nikita Popov 4fb7665c09 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-12 13:15:48 +02:00
Nikita Popov 1a23ebc1ff Fixed bug #74103 and bug #75054
Directly fail unserialization when trying to acquire an r/R
reference to an UNDEF HT slot. Previously this left an UNDEF and
later deleted the index/key from the HT.

What actually caused the issue here is a combination of two
factors: First, the key deletion was performed using the hash API,
rather than the symtable API, such that the element was not actually
removed if it used an integral string key. Second, a subsequent
deletion operation, while collecting trailing UNDEF ranges, would
mark the element as available for reuse (leaving a corrupted HT
state with nNumOfElemnts > nNumUsed).

Fix this by failing early and dropping the deletion code.
2017-08-12 13:11:35 +02:00
Andrea Faulds f877b86604 Merge branch 'PHP-7.1' into PHP-7.2 2017-08-12 01:38:46 +01:00
Andrea Faulds e88ab74886 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-12 01:37:47 +01:00
Andrea Faulds b59718bdc4 Fix bug #74725 (html_errors=1 breaks unhandled exceptions) 2017-08-12 01:37:20 +01:00
Xinchen Hui aecf996510 Fixed live_range removing (bug can be triggred by JIT) 2017-08-11 21:56:30 +08:00
Jakub Zelenka e53dd027c5 Reset utf8_invalid in json scanner 2017-08-10 19:47:58 +01:00
Jakub Zelenka f5b4cb7130 Fix possible overflow in json scanner utf8_invalid_count 2017-08-10 19:40:02 +01:00
Xinchen Hui 4375a6c5cd Fixed type infer for FUNC_GET_ARGS 2017-08-11 00:33:55 +08:00
Xinchen Hui f7cf839213 Update NEWs 2017-08-09 11:29:54 +08:00
Xinchen Hui e7dd9c781b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #75049 (spl_autoload_unregister can't handle spl_autoload_functions results)
2017-08-09 11:29:46 +08:00
Xinchen Hui 46ecda76ba Update NEWS 2017-08-09 11:29:32 +08:00
Xinchen Hui 307acb6618 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75049 (spl_autoload_unregister can't handle spl_autoload_functions results)
2017-08-09 11:29:13 +08:00
Xinchen Hui b06f8cb58b Fixed bug #75049 (spl_autoload_unregister can't handle spl_autoload_functions results) 2017-08-09 11:28:53 +08:00
Anatol Belski 823ca5c697 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Remove mistakingly added line
2017-08-08 19:40:42 +02:00
Anatol Belski 42608a3401 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Remove mistakingly added line
2017-08-08 19:40:28 +02:00
Anatol Belski afb20f4895 Remove mistakingly added line 2017-08-08 19:37:55 +02:00
Anatol Belski e62db6309c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync makefile options for phpize
2017-08-08 17:59:44 +02:00
Anatol Belski 315d3910fa Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Sync makefile options for phpize
2017-08-08 17:59:15 +02:00
Anatol Belski 075986f214 Sync makefile options for phpize
- run target
- debugger mode
2017-08-08 17:58:10 +02:00
Frank Denis ef0bd7b215 sodium ext: Use _ietf_ vs _IETF_ consistently 2017-08-08 17:50:17 +02:00
Frank Denis 03314e3f69 sodium ext: No need for #ifdef crypto_aead_chacha20poly1305_IETF_
chacha20poly1305_ietf was implemented in libsodium 1.0.4 which is way earlier
than the minimum version we support.
2017-08-08 17:42:38 +02:00
Frank Denis 596a892c5e Sodium ext: Isolate a return statement for consistency 2017-08-08 17:38:13 +02:00
Frank Denis a0d1e0915c sodium ext: The default password hashing function is not supposed to be Argon2i 2017-08-08 17:37:06 +02:00
Frank Denis 631fc3c9c1 sodium ext: long -> zend_long 2017-08-08 17:36:06 +02:00
Frank Denis 3140d40421 sodium ext: Add missing "return" statements after zend_throw_exception() 2017-08-08 17:34:20 +02:00
Darek Slusarczyk abd97b8bcb Merge branch 'PHP-7.1' into PHP-7.2
# Conflicts:
#	ext/json/config.w32
2017-08-08 16:08:19 +02:00
Darek Slusarczyk 86aa1ca990 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-08 16:05:13 +02:00
Darek Slusarczyk 618dcd6520 JSON: fix config.w32 / Install headers on windows 2017-08-08 15:52:53 +02:00
Andrey Hristov f589e5c791 Add new enum options defined in MySQL 5.7 2017-08-08 14:57:01 +03:00
Anatol Belski dcd669b4d9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Unify EOL
2017-08-07 17:04:15 +02:00
Anatol Belski 9ebf813ea4 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Unify EOL
2017-08-07 17:03:54 +02:00
Anatol Belski 4c9fe5a490 Unify EOL 2017-08-07 17:03:17 +02:00
Anatol Belski d36344e888 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix test target for phpize
2017-08-07 16:45:57 +02:00
Anatol Belski da966a93ac Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix test target for phpize
2017-08-07 16:45:41 +02:00
Anatol Belski d058e30917 fix test target for phpize 2017-08-07 16:45:02 +02:00
Jakub Zelenka 41d7621f48 Fix segfault in json ignoring of invalid UTF8 2017-08-06 17:20:31 +01:00
Nikita Popov 6b73b2d6eb Check for empty string in mb_ord() 2017-08-04 22:20:05 +02:00
Côme Chilliet aa0e402acf Added controls parameters to ldap_exop so that control support can be added later 2017-08-04 18:10:49 +02:00
Remi Collet 17bb8d575a win32 for pdo_sqlite 2017-08-04 13:28:48 +02:00
Remi Collet bf1c242cf4 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  use AC_DEFINE + win32
2017-08-04 13:21:54 +02:00
Remi Collet aee20e637a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  use AC_DEFINE + win32
2017-08-04 13:21:41 +02:00
Remi Collet 159e5c1048 use AC_DEFINE + win32 2017-08-04 13:21:28 +02:00
Nikita Popov 353f7bf461 Also check for invalid codepoints in mb_ord()
And return false in that case, instead of returning 0x3f...
2017-08-04 13:01:03 +02:00
Nikita Popov e53162a32b Return false on invalid codepoint in mb_chr()
Instead of returning the encoding of the current substitution
character. This allows a robust check for the failure case. The
substitution character (especially the default of "?") is also
a valid output of mb_chr() for a valid input (for "?" that would be
0x3f), so it's a bad choice for an error value.
2017-08-03 22:36:42 +02:00
Nikita Popov 41e9ba6333 Always use Unicode codepoints in mb_ord() and mb_chr()
Previously mb_chr() had two different encoding-dependent behaviors:
 * For "Unicode-encodings" it took a Unicode codepoint and returned
   its encoded representation.
 * Otherwise it returned a big-endian binary encoding of the passed
   integer.

Now the input is always interpreted as a Unicode codepoint. If
a big-endian binary encoding is what you want, you don't need
mbstring to implement that.
2017-08-03 22:14:00 +02:00
Nikita Popov fb9bf5b64b Revert/fix substitution character fallback
The introduced checks were not correct in two respects:
 * It was checked whether the source encoding of the string matches
   the internal encoding, while the actually relevant encoding is
   the *target* encoding.
 * Even if the correct encoding is used, the checks are still too
   conservative. Just because something is not a "Unicode-encoding"
   does not mean that it does not map any non-ASCII characters.

I've reverted the added checks and instead adjusted mbfl_convert
to first try to use the provided substitution character and if
that fails, perform the fallback to '?' at that point. This means
that any codepoint mapped in the target encoding should now be
correctly supported and anything else should fall back to '?'.
2017-08-03 21:53:59 +02:00
Nikita Popov a8a9e93e9a Revert/fix mb_substitute_character() codepoint checks
The introduced checks did not treat "non-Unicode" encodings correctly,
because they treated the passed integer as encoded in the internal
encoding in that case, while in actuality the substitute character
is always a Unicode codepoint.

Additionally checking the codepoint against the internal encoding
is not correct in any case, because the substitution character must
be mapped in the *target* encoding of the conversion, which does
not necessarily coincide with the internal encoding (the internal
encoding is the default *source* encoding, not *target* encoding).

This reverts the checks back to simple range checks, but in a way
that still resolves #69079: Characters outside the Basic
Multilingual Plane are now accepted and Surrogate Codepoints are
rejected. A distinction between UTF-8 and non-UTF-8 encodings is
not made for surrogate checks (as in the original patch), as
surrogates are always illegal on their own. Specifying a surrogate
as substitution character would only make sense if you could
specify a substitution string with more than one character --
however we do not support that.
2017-08-03 21:12:41 +02:00
Anatol Belski 355743600d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Increase expected timing on Travis
2017-08-03 15:08:05 +02:00
Anatol Belski 21c6ba3412 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Increase expected timing on Travis
2017-08-03 15:07:47 +02:00
Anatol Belski 9689796c10 Increase expected timing on Travis
If 5ms to read/write 8 bytes still has issue, probably next this test
should skip on Travis to avoid false positive fails.
2017-08-03 15:05:22 +02:00
Anatol Belski 93c2c56a1b Rework automatic interactive cli activation
There are still systems delivering buggy console info. If a file was
passed, obviously no interaction is meant.
2017-08-03 11:23:50 +02:00
Anatol Belski 39f0e810c9 [ci skip] update NEWS 2017-08-02 21:51:35 +02:00
Anatol Belski fbc8596b68 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] update NEWS
  update NEWS
2017-08-02 21:51:01 +02:00
Anatol Belski 54e2224df7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update NEWS
2017-08-02 21:50:26 +02:00
Anatol Belski 3e5b8c1e89 [ci skip] update NEWS 2017-08-02 21:49:56 +02:00
Anatol Belski 9ba2cfd33e update NEWS 2017-08-02 21:49:21 +02:00
Andreas Treichel 29e4d4eee6 Add ftp_append to create a new file or append data to an existing file (RFC959) 2017-08-02 20:52:28 +02:00
Nikita Popov aa925cb0ad Merge branch 'PHP-7.1' into PHP-7.2 2017-08-02 18:50:18 +02:00
Nikita Popov 4988e83fe9 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-02 18:50:04 +02:00
Andreas Treichel c2b8066efb Bug #74975: Different serialization for classes 2017-08-02 18:49:26 +02:00
Nikita Popov 042ff13ca9 Merge branch 'PHP-7.1' into PHP-7.2 2017-08-02 18:18:23 +02:00
Nikita Popov 9871555090 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-02 18:16:56 +02:00
Nikita Popov 9ca1b2a775 Merge remote-tracking branch 'php-src/PHP-7.0' into PHP-7.0 2017-08-02 18:16:18 +02:00
Nikita Popov 91240073ea Merge branch 'PHP-7.1' into PHP-7.2 2017-08-02 18:11:12 +02:00
Nikita Popov 63607375f5 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-02 18:09:09 +02:00
Fabien Villepinte 2cc1cbf2f4 Fix Bug #75001: Wrong reflection on mb_eregi_replace 2017-08-02 18:08:42 +02:00
Fabien Villepinte 15abb2b56e Fix test transliterator_create_inverse_basic.phpt 2017-08-02 18:04:43 +02:00
George Wang e78712791d take care of compile warnings. 2017-08-02 11:59:41 -04:00
Tyson Andre 5097e2ee13 Implement spl_object_id(object $x) : int
spl_object_id is a new function returning the object handle,
as a signed integer.

Discussion for this new function is ongoing on php-internals, see
https://marc.info/?t=143835274500003&r=1&w=2

The object id is unique for the lifetime of the object.
When the object is garbage collected,
different objects may & will have the same object id.

- This is also the case for the string generated by spl_object_hash

It is always possible to cast the object handle to a **signed** zend_long
in php 7.2. _zend_object->handle is always of the type `uint32_t`.
(zend_long is 32 bits on 32 bit builds, 64 bits on 64 bit builds)

As of php 7.0, the object id uniquely identifies the object,
there can't be two objects with the same id but different handlers
(See the implementation of spl_object_hash)

Skip the pointless XORing, as discussed in internals.

- It was intended to avoid exposing in-memory addresses.
- The object handle is not a memory address.
- The output of var_dump() includes the object handle(id)
2017-08-02 17:54:07 +02:00
Anatol Belski b4bce59fe9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75002 Null Pointer Dereference in timelib_time_clone
2017-08-02 16:42:20 +02:00
Anatol Belski 1fdc518971 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75002 Null Pointer Dereference in timelib_time_clone
2017-08-02 16:41:48 +02:00
Derick Rethans b112d09013 Fixed bug #75002 Null Pointer Dereference in timelib_time_clone 2017-08-02 16:40:48 +02:00
Remi Collet afdf7519d1 fix build with old system libsqlite (sqlite3_close_v2 may be missing) 2017-08-02 16:09:36 +02:00
Remi Collet 5e5895a464 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix build with old system libsqlite (sqlite3_errstr may be missing)
2017-08-02 14:03:23 +02:00
Remi Collet 5f030924c1 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix build with old system libsqlite (sqlite3_errstr may be missing)
2017-08-02 14:03:02 +02:00
Remi Collet 666cb6c802 fix build with old system libsqlite (sqlite3_errstr may be missing) 2017-08-02 14:01:56 +02:00
Joe Watkins 6202c821a9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fixed #endif comments
2017-08-02 08:35:51 +01:00
Joe Watkins 9c6262f39b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fixed #endif comments
2017-08-02 08:35:38 +01:00
clwu b2934d2612 fixed #endif comments 2017-08-02 08:35:27 +01:00
Christoph M. Becker 43e7656241 Update NEWS 2017-08-02 00:11:11 +02:00
Sara Golemon 6278f6140f Update NEWS for 7.2.0beta3 2017-08-01 12:50:56 -04:00
Sara Golemon 1b05a2373b Update NEWS for PHP 7.2.0beta2 2017-08-01 12:50:55 -04:00
Christoph M. Becker fe107cce45 Update to SQLite 3.20.0 2017-08-01 18:26:14 +02:00
Nikita Popov 6c2c7a023d Optimize array_unique()
In SORT_STRING mode, instead of sorting the array, build a hash of
seen elements.
2017-08-01 18:08:38 +02:00
Julien Pauli 5069d52189 Updated NEWS 2017-08-01 16:03:00 +02:00
Julien Pauli 4f06b62781 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Updated NEWS
  Updated NEWS
  Fix #75015. Crash in SPL destructors
2017-08-01 16:02:36 +02:00
Julien Pauli f0d40286e7 Updated NEWS 2017-08-01 16:02:26 +02:00
Julien Pauli cd06b5af09 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Updated NEWS
  Fix #75015. Crash in SPL destructors
2017-08-01 16:02:00 +02:00
Julien Pauli 0c0cbb43da Updated NEWS 2017-08-01 16:01:43 +02:00
Julien Pauli 64e6ddc7f7 Fix #75015. Crash in SPL destructors 2017-08-01 15:59:54 +02:00
Julien Pauli ad5222c3a6 Fix use of uninitialised value in uniqid() where more_entropy=0 2017-08-01 14:58:00 +02:00
Anatol Belski b8da481a2a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Test to cover the change in ce1a0d97
2017-08-01 12:51:20 +02:00
Anatol Belski d9d152b895 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Test to cover the change in ce1a0d97
2017-08-01 12:50:52 +02:00
Anatol Belski a8e25fdbf8 Test to cover the change in ce1a0d97 2017-08-01 12:49:45 +02:00
Anatol Belski 2164e3a0b8 fix test 2017-08-01 11:56:23 +02:00
Anatol Belski ce1a0d971b fix NULL deref 2017-08-01 11:55:32 +02:00
Xinchen Hui 5856becc2b Update NEWS 2017-07-31 11:52:23 +08:00
Xinchen Hui 9b87b73fec Req #74963 (Improved error message on fetching property of non-object) 2017-07-31 11:51:23 +08:00
Kalle Sommer Nielsen c62e5eb0a9 Reduce EXIF test image sizes, there is still one large image left that I will look into reducing if possible (bug50845.jpg)
The changes in phpts are due to exiftool, I verified that all the images still remain relevant for testing
2017-07-30 21:59:55 +02:00
Kalle Sommer Nielsen 97ff7bbb36 Lowercase the file extension 2017-07-30 21:59:10 +02:00
Anatol Belski 03383119d2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  remove dup of the binary file, rely on a test runtime copy instead
2017-07-30 17:52:36 +02:00
Anatol Belski eab66f9068 remove dup of the binary file, rely on a test runtime copy instead 2017-07-30 17:51:27 +02:00
Christoph M. Becker 4db1e1adf2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Shrink another large image
2017-07-30 16:35:07 +02:00
Christoph M. Becker 2d6d1ec55b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Shrink another large image
2017-07-30 16:27:38 +02:00
Christoph M. Becker 2d96fdd54f Shrink another large image
This image is only used for testing `BITMAPV5HEADER` support in
`getimagesize()` (see bf9ad4e). Therefore it is not necessary to have
a big image; a single pixel is sufficient.
2017-07-30 16:26:06 +02:00
Frank Denis 0c21187363 Merge branch 'PHP-7.2' of git.php.net:php-src into PHP-7.2
* 'PHP-7.2' of git.php.net:php-src:
  Shrink test image
2017-07-30 15:42:24 +02:00
Frank Denis 34df3cdafa sodium ext: skip scrypt if it is not available
scrypt was removed from minimal libsodium builds in version 1.0.13
2017-07-30 15:41:34 +02:00
Frank Denis 650f68c36e sodium ext: fix tests/pwhash_argon2i description 2017-07-30 15:05:21 +02:00
Christoph M. Becker d53b78c6ed Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Shrink test image
2017-07-30 15:01:59 +02:00
Frank Denis 74d7f1d04e sodium ext: check hash length for scrypt 2017-07-30 15:00:03 +02:00
Frank Denis 3f45262aa9 Merge branch 'PHP-7.2' of git.php.net:php-src into PHP-7.2
* 'PHP-7.2' of git.php.net:php-src:
  It's `--SKIPIF--`, not `--SKIP--`
2017-07-30 14:48:44 +02:00
Frank Denis 85895b2e5b sodium ext: no need for #ifdef crypto_aead_chacha20poly1305_IETF_NPUBBYTES
chacha20poly1305_ietf was implemented in libsodium 1.0.4 which is way earlier
than the minimum version we support.
2017-07-30 14:47:49 +02:00
Frank Denis 1d7e1f845f sodium ext: check that message sizes are safe, to avoid hitting abort() in libsodium 2017-07-30 14:45:06 +02:00
Christoph M. Becker 82e4ad3983 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Shrink test image
2017-07-30 14:44:52 +02:00
Christoph M. Becker 74a696d53b Shrink test image
The last (`IDAT`) chunk in this file starting at `0x5e265` reports to
have a length of `0x2000` bytes, but there are only `0x1D9B` bytes
left. Simply cutting the first `IDAT` chunk which starts at `0x31` and
also reports a length of `0x2000` at the same offset should produce the
same test results (while reducing the file size to 7.628 bytes).
2017-07-30 14:43:37 +02:00
Frank Denis ae99959986 sodium ext: use unexpand -t 4 --first-only to convert from spaces to tabs
No actual code changes.

Fun fact: macOS' unexpand(1) tool doesn't work as documented, and always
converts everything to tabs, regardless of the -a switch.
2017-07-30 14:34:55 +02:00
Christoph M. Becker 782f45c8e6 It's --SKIPIF--, not --SKIP-- 2017-07-30 14:01:51 +02:00
Christoph M. Becker 71e47c5c13 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Skip this test if ext/gd is not available
2017-07-30 13:37:36 +02:00
Christoph M. Becker f213ee5952 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Skip this test if ext/gd is not available
2017-07-30 13:30:18 +02:00
Christoph M. Becker 4d6f808c16 Skip this test if ext/gd is not available 2017-07-30 13:24:10 +02:00
Frank Denis 613c8dd7b0 sodium ext: let crypto_pwhash() accept an optional algorithm identifier 2017-07-29 13:04:54 +02:00
Nikita Popov 5d777e56e2 Merge branch 'PHP-7.1' into PHP-7.2 2017-07-28 13:03:26 +02:00
Nikita Popov c48c638aeb Merge branch 'PHP-7.0' into PHP-7.1 2017-07-28 13:03:02 +02:00
Nikita Popov e3d25e78eb Fixed bug #62934 2017-07-28 13:02:25 +02:00
Anatol Belski 80d839d25a add missing makefile fragment for .w32
ensure correct dir
2017-07-28 07:26:11 +02:00
Anatol Belski 2ae0dd7f61 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  relax test on travis
2017-07-28 00:28:12 +02:00
Anatol Belski 55e7459cea Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  relax test on travis
2017-07-28 00:27:52 +02:00
Anatol Belski b01336814d relax test on travis 2017-07-28 00:27:11 +02:00
Sara Golemon 4a6ef8327a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Simpler fix for #74974
2017-07-27 10:04:59 -04:00
Sara Golemon b62fb3aa0c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Simpler fix for #74974
2017-07-27 10:04:14 -04:00
Pedro Magalhães 34e5d3a87d Simpler fix for #74974 2017-07-27 09:25:38 -04:00
Xinchen Hui 262aeb8ae1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed test
2017-07-27 12:50:41 +08:00
Xinchen Hui 0ddda0dcb7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed test
2017-07-27 12:50:28 +08:00
Xinchen Hui 9fcfe52d03 Fixed test 2017-07-27 12:50:17 +08:00
Xinchen Hui afc2be8fc8 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #74949 (null pointer dereference in _function_string)
2017-07-27 11:24:53 +08:00
Xinchen Hui f894bb750c Update NEWS 2017-07-27 11:24:26 +08:00
Xinchen Hui efb1be547c Update NEWS 2017-07-27 11:23:52 +08:00
Xinchen Hui 84a18c4782 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74949 (null pointer dereference in _function_string)
2017-07-27 11:23:27 +08:00
Xinchen Hui e36c04ef48 Fixed bug #74949 (null pointer dereference in _function_string) 2017-07-27 11:23:06 +08:00
Sara Golemon 08fef4cc23 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Bugfix #74993 Wrong reflection param into for some intl: lookup_*() methods
2017-07-26 18:56:06 -04:00
Sara Golemon 80f4297c25 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Bugfix #74993 Wrong reflection param into for some intl: lookup_*() methods
2017-07-26 18:55:46 -04:00
Sara Golemon c7aa8ba0ee Bugfix #74993 Wrong reflection param into for some intl: lookup_*() methods 2017-07-26 18:55:23 -04:00
Anatol Belski 57c435e5ac [ci skip] update NEWS 2017-07-26 17:31:57 +02:00
Anatol Belski 2d8fe973b1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] update NEWS
  [ci skip] update NEWS
2017-07-26 17:31:10 +02:00
Anatol Belski 4cde48bb73 [ci skip] update NEWS 2017-07-26 17:30:40 +02:00
Anatol Belski 3f9e8e6686 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] update NEWS
2017-07-26 17:30:02 +02:00
Anatol Belski 3306b3aa60 [ci skip] update NEWS 2017-07-26 17:29:37 +02:00
Anatol Belski 9ff4801159 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #74833, SID constant created with wrong module number
2017-07-26 13:21:20 +02:00
Anatol Belski eaf5c7cdd4 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74833, SID constant created with wrong module number
2017-07-26 13:20:48 +02:00
Anatol Belski bd00fe81cc Fixed bug #74833, SID constant created with wrong module number 2017-07-26 13:19:41 +02:00
Joe Watkins d3060a00d1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #74991 - include_path has a 4096 char (minus "__DIR__:") limit, in some PHAR cases
2017-07-26 10:47:49 +01:00
Joe Watkins bb9ea4e88b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #74991 - include_path has a 4096 char (minus "__DIR__:") limit, in some PHAR cases
2017-07-26 10:47:22 +01:00
Benjamin W. Broersma 6b1fbafdf0 Fix bug #74991 - include_path has a 4096 char (minus "__DIR__:") limit, in some PHAR cases 2017-07-26 10:46:50 +01:00
Christopher Jones 787ea0dda5 Update NEWS 2017-07-26 15:25:01 +10:00
Christopher Jones 664eca5967 Merge branch 'PHP-7.1' into PHP-7.2 2017-07-26 15:24:26 +10:00
Christopher Jones 747f5b23ae Update NEWS 2017-07-26 15:23:58 +10:00
Christopher Jones 46a6ae0d45 Merge branch 'PHP-7.0' into PHP-7.1 2017-07-26 15:23:17 +10:00
Christopher Jones de65a2243f Expose oci_unregister_taf_callback() 2017-07-26 15:22:44 +10:00
Xinchen Hui 53e59e4b34 Update NEWS 2017-07-26 12:07:20 +08:00
Xinchen Hui 0e61cddeb1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #74980 (Narrowing occurred during type inference)
2017-07-26 12:06:55 +08:00
Xinchen Hui 3df47c12f7 Fixed bug #74980 (Narrowing occurred during type inference) 2017-07-26 12:06:33 +08:00
Aleš Rebec f469edcf59 Remove obsolete function names from CODING_STANDARDS file
Deprecated and removed function names used as examples in coding standards file.

- Mcrypt is deprecated and will be removed in 7.2
- Mysql functions are deprecated in 5.4 and removed in 7.0.

According to those changes, CODING_STANDARDS file should be updated.
2017-07-25 07:04:23 +01:00
Joe Watkins 4ddb0630c2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed finding CURL on systems with multiarch support
2017-07-25 06:59:03 +01:00
Joe Watkins 238f837cbc Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed finding CURL on systems with multiarch support
2017-07-25 06:58:37 +01:00
Carsten Brandt 3fd7d819b8 Fixed finding CURL on systems with multiarch support
fixes https://bugs.php.net/bug.php?id=74125

This commit makes the cURL config script aware of debian/ubuntu
[multiarch support][1] which installs architecture specific
headers in a different location.

It checks whether the `dpkg-architecture` script exists and is
executeable, if that is the case, the multiarch architecture is
detected by calling `dpkg-architecture -qDEB_HOST_MULTIARCH` as
documented in [debian multiarch implementation docs][2]:

> `/usr/include/<triplet>`: used for arch-varying headers

[1]: https://wiki.debian.org/Multiarch
[2]: https://wiki.debian.org/Multiarch/Implementation
2017-07-25 06:58:11 +01:00
Joe Watkins 8d5a5fbf6b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  minor loop optimizations, closes #2633
2017-07-25 06:54:20 +01:00
Joe Watkins 78ad5e8864 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  minor loop optimizations, closes #2633
2017-07-25 06:51:44 +01:00
Joe Watkins 69b48f83df minor loop optimizations, closes #2633 2017-07-25 06:47:58 +01:00
Joe Watkins 2e8759428b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed #74977 - Appending AppendIterator leads to segfault
2017-07-25 06:40:25 +01:00
andrewnester dbc2ffba82 Fixed #74977 - Appending AppendIterator leads to segfault 2017-07-25 06:39:50 +01:00
Sammy Kaye Powers 66729aeeeb Fix ext/sodium display in phpinfo() 2017-07-25 06:35:40 +01:00
Anatol Belski 7453d2303b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  switch to binary sdk 2.0.9 for appveyor
2017-07-24 23:09:20 +02:00
Anatol Belski bedd881da6 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  switch to binary sdk 2.0.9 for appveyor
2017-07-24 23:08:07 +02:00
Anatol Belski cdf9178c43 switch to binary sdk 2.0.9 for appveyor 2017-07-24 23:07:15 +02:00
jrfnl f901e7e3c5 Fix typo in PHP 7.2 changelog 2017-07-24 16:57:07 -04:00
Joe Watkins 515b396889 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update copyright year to 2017
2017-07-24 17:24:22 +01:00
Joe Watkins b44484b912 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Update copyright year to 2017
2017-07-24 17:24:10 +01:00
Peter Kokot 924ff6164e Update copyright year to 2017 2017-07-24 17:23:57 +01:00
Anatol Belski 0489e85c18 [ci skip] update NEWS 2017-07-24 17:46:31 +02:00
Anatol Belski cb7e42da25 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Add test for bug #74903
2017-07-24 17:03:24 +02:00
Anatol Belski 2dc81d4a09 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add test for bug #74903
2017-07-24 17:02:55 +02:00
Anatol Belski a769d873f8 Add test for bug #74903 2017-07-24 17:02:10 +02:00
Anatol Belski 660b829ccc Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Followup on 0ec147d3 for another place
  Ensure binary mode for OpenSSL I/O
2017-07-24 16:38:05 +02:00
Anatol Belski e2b61eccb9 Followup on 0ec147d3 for another place
which requires also to move the macros into the header

(cherry picked from commit b7eb2c0604)
2017-07-24 16:33:12 +02:00
Anatol Belski 6918a68d9d Ensure binary mode for OpenSSL I/O
Essential for OpenSSL 1.1.0 on Windows, some issues was revealed earlier
and now by openssl_pkcs12_export_to_file_basic.phpt.

(cherry picked from commit 0ec147d301)
2017-07-24 16:31:09 +02:00
Anatol Belski b7eb2c0604 Followup on 0ec147d3 for another place
which requires also to move the macros into the header
2017-07-24 16:24:04 +02:00
Anatol Belski 0ec147d301 Ensure binary mode for OpenSSL I/O
Essential for OpenSSL 1.1.0 on Windows, some issues was revealed earlier
and now by openssl_pkcs12_export_to_file_basic.phpt.
2017-07-24 15:43:48 +02:00
Anatol Belski 8a6afbef3f Combine conditions for the automatic interactive console activation
as with bug #74979 it seems to have regressions which were not
present before.
2017-07-24 14:47:32 +02:00
Frank Denis 742895f60c sodium ext: don't reinvent sodium_increment() and sodium_add() 2017-07-24 14:26:05 +02:00
Joe Watkins 52964bbfb2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  openssl: Add openssl_pkcs12_export_to_file tests
2017-07-24 10:47:02 +01:00
Joe Watkins 5816ce330c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  openssl: Add openssl_pkcs12_export_to_file tests
2017-07-24 10:46:52 +01:00
Jelle van der Waa 23c124ec75 openssl: Add openssl_pkcs12_export_to_file tests
Add basic tests for openssl_pkcs12_export_to_file.
2017-07-24 10:46:42 +01:00
Issei.M f1d7857969 Fix typo in UPGRADING for 7.2 2017-07-24 10:44:19 +01:00
Joe Watkins 94e6c72e26 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update PHP 5 version to 7 in header comments
2017-07-24 10:42:48 +01:00
Joe Watkins 642fb44d69 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Update PHP 5 version to 7 in header comments
2017-07-24 10:42:35 +01:00
Peter Kokot c4e11c8ef3 Update PHP 5 version to 7 in header comments 2017-07-24 10:42:15 +01:00
Sara Golemon a6e4a713ea Add hash_hmac_algos() for filtered is_crypto methods 2017-07-23 15:17:09 -04:00
Nikita Popov 706f0cf8a0 Update Unicode data for Unicode 10 2017-07-23 16:05:39 +02:00
Nikita Popov 24cfbfd56f Update ucgendat for more bidi properties
Handle them the same way as others -- by classifying as Other
Neutral.
2017-07-23 16:03:11 +02:00
Nikita Popov 077e61fad3 Fixed bug #69267 completely
ucgendat.c was assuming that a title-case character is a character
that has both lower and upper-case variants. However, there are
title-case characters that only have a lower-case variant. Use the
Lt general character proprety to determine where in the case map
the character should be placed instead.
2017-07-23 15:30:17 +02:00
Nikita Popov c0bcd301d3 Another fix for bug #69267
mb_strtoupper() was converting lowercase characters into
titlecase characters, instead of uppercase characters. Luckily
there are only very few characters with a distinct titlecase
representation, so this mostly worked out okay...
2017-07-23 15:07:02 +02:00
Nikita Popov 0e4af9192f Partial fix for bug #69267
This pulls in 60a25c72ba389f53b0621ca250bc99f3b295d43f from the
OpenLDAP project.
2017-07-23 14:47:21 +02:00
Nikita Popov 88f752a947 Merge branch 'PHP-7.1' into PHP-7.2 2017-07-23 12:21:51 +02:00
Nikita Popov f116a88592 Merge branch 'PHP-7.0' into PHP-7.1 2017-07-23 12:21:16 +02:00
Christoph M. Becker 418da85f15 Fix #71606: Segmentation fault mb_strcut with HTML-ENTITIES
The HTML decoding filter uses the `opaque` member of mbfl_convert_filter
as buffer, but there was no copy constructor defined, what caused double
frees when the filter is copied (what happens multiple times in mb_strcut(),
for instance).
2017-07-23 12:19:27 +02:00
Nikita Popov 9af5b7f33d Fix use after free in mb_send_mail 2017-07-23 11:55:26 +02:00
Anatol Belski 47334646db fix skipif 2017-07-23 11:08:11 +02:00
Sara Golemon 089f4ff885 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Use compatability zend_isnan() instead of POSIX isnan()
2017-07-22 21:33:28 -04:00
Sara Golemon a4e3589966 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Use compatability zend_isnan() instead of POSIX isnan()
2017-07-22 21:33:20 -04:00
Sara Golemon 775b4b54d8 Use compatability zend_isnan() instead of POSIX isnan()
s/isnan/zend_isnan/g
2017-07-22 21:32:44 -04:00
Sara Golemon e23c132940 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix compile-time optimization of NAN comparisons
2017-07-22 21:23:29 -04:00
Sara Golemon 1229b0f8cb Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix compile-time optimization of NAN comparisons
2017-07-22 21:23:17 -04:00
Sara Golemon c562d44321 Fix compile-time optimization of NAN comparisons 2017-07-22 21:22:51 -04:00
Frank Denis 401188cbf9 sodium ext: require libsodium >= 1.0.8
(but really, 1.0.9 should be the bare minimum)
2017-07-22 22:07:53 +02:00
Frank Denis c499bd12f7 sodium ext: define crypto_aead_chacha20poly1305_ietf_KEYBYTES if needed
Some old libsodium versions didn't had a dedicated constant for the
IETF version of this construction.
2017-07-22 19:57:44 +02:00
Frank Denis 8a2e747a7b sodium ext: remove redundant and obsolete macros 2017-07-22 17:50:22 +02:00
Nikita Popov 4672411ef5 Fix incorrect propagation of ZEND_BOOL in pass 1
BOOL (next to QM_ASSIGN) is one of the opcodes that can assign to
a temporary that is assigned in multiple branches. Pass 1 does
not check for this, so we should not try to handle it at that
point. Block pass and sccp will be able to treat this correctly.
2017-07-22 17:23:50 +02:00
Nikita Popov 96665fbfe0 Fix block removal if there are duplicate successors 2017-07-22 14:53:23 +02:00
Anatol Belski 1e9ad4a307 [ci skip] update NEWS 2017-07-22 14:15:32 +02:00
Anatol Belski 3fc52f1dc4 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] update NEWS
  [ci skip] update NEWS
2017-07-22 14:14:22 +02:00
Anatol Belski c068818ff3 [ci skip] update NEWS 2017-07-22 14:13:51 +02:00
Anatol Belski e0c0007bd2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] update NEWS
2017-07-22 14:13:25 +02:00
Anatol Belski ad12da4908 [ci skip] update NEWS 2017-07-22 14:12:45 +02:00
Bob Weinand 76ce874422 Merge branch 'PHP-7.1' into PHP-7.2 2017-07-22 11:16:48 +02:00
Bob Weinand 134e713be2 Merge branch 'PHP-7.0' into PHP-7.1 2017-07-22 11:14:54 +02:00
Bob Weinand bad5d0d6c5 Fixed bug #74954 (null deref and segfault in zend_generator_resume()) 2017-07-22 11:14:00 +02:00
Anatol Belski 14e8f9557b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #74968 PHP crashes when calling mysqli_result::fetch_object with an abstract class
2017-07-22 10:36:58 +02:00
Anatol Belski 4cb1151fff Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74968 PHP crashes when calling mysqli_result::fetch_object with an abstract class
2017-07-22 10:36:31 +02:00
Anatol Belski e405ff59f9 Fixed bug #74968 PHP crashes when calling mysqli_result::fetch_object with an abstract class 2017-07-22 10:35:26 +02:00
Nikita Popov 3fa76ac54f Merge branch 'PHP-7.1' into PHP-7.2 2017-07-21 23:22:56 +02:00
Nikita Popov 69ec51eb02 Fix DFG construction for VERIFY_RETURN
`use` only contains uses prior to definition. This was not
honoured for VERIFY_RETURN with a temporary operand.

The test case only breaks on PHP 7.2.
2017-07-21 23:20:56 +02:00
Anatol Belski 7ec8b8d49f remove casts and ensure no out of bounds access 2017-07-21 22:26:37 +02:00
Frank Denis f8ffc9622b sodium ext: delete copypasta from sodium_crypto_kdf_derive_from_key()
/via @fredemmott
2017-07-21 18:25:25 +02:00
Frank Denis 0e2a7fc829 sodium ext: use crypto_scalarmult_BYTES for points coordinates
Just for consistency.
2017-07-21 14:02:33 +02:00
Frank Denis 557029e8e6 sodium ext: clear the hash state after we're done hashing 2017-07-21 14:02:26 +02:00
Frank Denis d8a14e2aad sodium ext: drop unused code
/via @remicollet
2017-07-21 14:02:18 +02:00
Xinchen Hui 735b34c016 Update NEWS 2017-07-21 18:17:54 +08:00
Xinchen Hui 01090e6ced Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #74950 (nullpointer deref in simplexml_element_getDocNamespaces)
2017-07-21 18:17:33 +08:00
Xinchen Hui a8f98fc7f7 Update NEWS 2017-07-21 18:17:12 +08:00
Xinchen Hui 08177312fb Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74950 (nullpointer deref in simplexml_element_getDocNamespaces)
2017-07-21 18:16:54 +08:00
Xinchen Hui 256ec5bebb Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src:
  Move the define into the header to reduce diff for future upgrade
2017-07-21 18:16:37 +08:00
Xinchen Hui 3a7b0027f3 Fixed bug #74950 (nullpointer deref in simplexml_element_getDocNamespaces) 2017-07-21 18:16:11 +08:00
Anatol Belski 96ad72dc29 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Move the define into the header to reduce diff for future upgrade
2017-07-21 11:16:38 +02:00
Anatol Belski 4b3ed311aa Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Move the define into the header to reduce diff for future upgrade
2017-07-21 11:16:15 +02:00
Anatol Belski 9b3c26d4f4 Move the define into the header to reduce diff for future upgrade 2017-07-21 09:12:06 +02:00
Xinchen Hui 6242230219 Update NEWS 2017-07-21 12:03:17 +08:00
Xinchen Hui 463413db53 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #74947 (Segfault in scanner on INF number)

Conflicts:
	Zend/zend_language_scanner.c
2017-07-21 12:02:54 +08:00
Xinchen Hui e2b240c164 Update NEWS 2017-07-21 11:58:30 +08:00
Xinchen Hui 84926a0d71 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74947 (Segfault in scanner on INF number)

Conflicts:
	Zend/zend_language_scanner.c
2017-07-21 11:58:07 +08:00
Xinchen Hui 95d2908814 Fixed bug #74947 (Segfault in scanner on INF number) 2017-07-21 11:56:49 +08:00
Dmitry Stogov 0b2c456312 fixed comments 2017-07-20 23:29:22 +03:00
Dmitry Stogov 1b9d0c8af3 Fixed wrong edges_count re-calculation. 2017-07-20 23:28:05 +03:00
Anatol Belski b8eb110cd5 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  increment sdk version
2017-07-20 22:08:39 +02:00
Anatol Belski fa33b065ac Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  increment sdk version
2017-07-20 22:07:32 +02:00
Anatol Belski ce06677069 increment sdk version 2017-07-20 22:06:34 +02:00
Anatol Belski 2ec3c67428 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  remove another cygwin instance in AppVeyor run
2017-07-20 20:40:47 +02:00
Anatol Belski 7c21535fb3 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  remove another cygwin instance in AppVeyor run
2017-07-20 20:39:36 +02:00
Anatol Belski ecad9a470f remove another cygwin instance in AppVeyor run 2017-07-20 20:39:04 +02:00
Sergei Morozov 9b9184a45a Fixed bug #74941 - Session fails to start after having headers sent 2017-07-20 07:52:02 +01:00
Anatol Belski 18595b6fc6 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix dir separator in test
2017-07-19 22:42:05 +02:00
Anatol Belski 8ef5a50e2d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix dir separator in test
2017-07-19 22:41:32 +02:00
Anatol Belski f67a3cc9bd fix dir separator in test 2017-07-19 22:41:09 +02:00
Sara Golemon bb02f99e71 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Do not allow using traits/interfaces/abstract classes as stream wrappers
  Add oci8_failover.c to config.w32, follow up for commit 1b797f7a
2017-07-19 14:01:18 -04:00
Sara Golemon a9e8239f45 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Do not allow using traits/interfaces/abstract classes as stream wrappers
2017-07-19 14:01:00 -04:00
Sara Golemon c9fd093127 Do not allow using traits/interfaces/abstract classes as stream wrappers
Fixes https://bugs.php.net/bug.php?id=74951
2017-07-19 14:00:00 -04:00
Emmanuel Dreyfus d25049cc1b Fixed bug #74851: Improve uniqid() performance
uniqid() relies on microsecond-precise system clock to produce an
unique identifier. In order to avoid  using the same value, the
original implementation calls usleep(1) to wait for the next microsecond.

Unfortunately, usleep() specification says "The suspension time may be
longer than requested due to the scheduling of other activity by the
system." Indeed, the pause may as as long as an entire execution slice,
causing a uniqid() call to last more than 10 ms.

This is fixed by replacing the usleep() call by time polling using
gettimeofday() until the microsecond changes. Since the getttimeoday()
system call lasts around a microsecond, only a small time is wasted
calling multiple gettimeofday. On the benefit side, uniqid() performance
in increased 10000 fold without changing its behavior.
2017-07-19 19:54:19 +02:00
Lior Kaplan 2b36f3d71f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add oci8_failover.c to config.w32, follow up for commit 1b797f7a
2017-07-19 17:26:38 +03:00
Lior Kaplan 2cca43b3ab Add oci8_failover.c to config.w32, follow up for commit 1b797f7a 2017-07-19 17:23:22 +03:00
Dmitry Stogov 6fcc7134f1 Keep resource of enclosing stream, because it may be referenced from other place(s).
This fixes valgrind warnings on Zend/tests/type_declarations/scalar_basic.phpt
2017-07-19 17:16:56 +03:00
Dmitry Stogov 112eda7525 Separate the fast-patch 2017-07-19 15:42:32 +03:00
Dmitry Stogov 3185f8628f Convert CONCAT into FAST_CONCAT for non-object operands 2017-07-19 15:41:46 +03:00
Dmitry Stogov 95a1f77b5e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Reset globals on startup or restart
2017-07-19 15:36:48 +03:00
Dmitry Stogov 4252f14299 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Reset globals on startup or restart
2017-07-19 15:36:24 +03:00
Dmitry Stogov e5beb4e828 Reset globals on startup or restart 2017-07-19 15:35:10 +03:00
Dmitry Stogov 8447b86eef Remove dead live ranges and FREE instructions 2017-07-19 13:07:33 +03:00
Dmitry Stogov 5274cefb4d Remove live ranges 2017-07-19 13:06:25 +03:00
Nikita Popov ecb67e59d7 Don't reuse compare_function operands
If the same zval is used for the result and one operand, then the
function thinks it is responsible for freeing the value in case of
a type conversion.
2017-07-19 01:04:36 +02:00
Sergei Morozov 5b12b46a19 Fixed bug #74936 - session_*() functions trigger a warning in read mode when the session is active 2017-07-18 22:25:22 +02:00
Nikita Popov a624ded4d3 Merge branch 'PHP-7.1' into PHP-7.2 2017-07-18 22:16:33 +02:00
Nikita Popov 8e7c99acf4 Merge branch 'PHP-7.0' into PHP-7.1 2017-07-18 22:16:11 +02:00
andrewnester afc22828ea Fixed #74699 - Broken ArrayIterator unserializing 2017-07-18 22:14:11 +02:00
Nikita Popov f9d6cff67e Merge branch 'PHP-7.1' into PHP-7.2 2017-07-18 21:45:41 +02:00
Nikita Popov 4e9158da76 Merge branch 'PHP-7.0' into PHP-7.1 2017-07-18 21:45:35 +02:00
YaoGuai 51cdd3dc50 Fix check of mysql_commit() return value
For mysql_commit() everything non-zero is an error.
2017-07-18 21:45:02 +02:00
Nikita Popov 9cd82df0bb Merge branch 'PHP-7.1' into PHP-7.2 2017-07-18 21:21:46 +02:00
Andrew Nester 6c32d271d2 Fixed #74892 - Fixed URL rewriting for urls started with # 2017-07-18 21:20:03 +02:00
Dmitry Stogov 0903f6bffb Remove dead JMP/JMPZ/JMPNZ/JMPZNZ (DCE pass can't remove them) 2017-07-18 20:43:06 +03:00
Dmitry Stogov 582882ae18 Constant evaluation of few more constant functions 2017-07-18 20:42:40 +03:00
Dmitry Stogov c41d2535b1 Disabled compile-time constant DOUBLE to STRING evaluation (its result depends on run-time 'precision' setting) 2017-07-18 20:41:01 +03:00
Joe Watkins f4323248ec bump versions 2017-07-18 17:21:19 +01:00
Sara Golemon b01448f9a6 Update NEWS for 7.2.0beta2 2017-07-18 16:00:34 +00:00
Sara Golemon 1d184e1851 Update NEWS for PHP 7.2.0beta1 2017-07-18 15:40:26 +00:00
Sara Golemon 05ff0c5180 Bump all API numbers in prep for 7.2 fork 2017-07-18 10:45:02 -04:00
Frank Denis 09b15e4f30 sodium ext: implement sodium_crypto_kdf()
Also add zend_parse_parameters_none() statements where appropriate.
2017-07-18 14:42:15 +02:00
Frank Denis 36bd878ec2 Merge remote-tracking branch 'jedisct1/sodium-keygen'
* jedisct1/sodium-keygen:
  sodium ext: remove unused sodium_randombytes_*() prototypes
  sodium ext: add bindings for keygen() functions
  sodium ext: sort prototypes
2017-07-18 12:53:18 +02:00
Anatol Belski 3e33d2c2e6 Merge branch 'PHP-7.1'
* PHP-7.1:
  Exclude ext/ftp from AppVeyor test run
2017-07-18 12:11:17 +02:00
Anatol Belski 657609ebae Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Exclude ext/ftp from AppVeyor test run
2017-07-18 12:09:58 +02:00
Anatol Belski 0da10134f2 Exclude ext/ftp from AppVeyor test run
as the tests depend on fork() and otherwise an extra setup would be
needed anyway.
2017-07-18 12:08:31 +02:00
Anatol Belski 807bc620ac Merge branch 'PHP-7.1'
* PHP-7.1:
  move to 7.0.23 for dev
2017-07-18 10:26:51 +02:00
Anatol Belski 735468a0b8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  move to 7.0.23 for dev
2017-07-18 10:26:10 +02:00
Anatol Belski 649027b963 move to 7.0.23 for dev 2017-07-18 10:25:40 +02:00
Anatol Belski a39fd99524 fix regression introduced by 0782a7fc63 2017-07-18 00:35:01 +02:00
Dmitry Stogov bb743ca62d Added NEWS entry 2017-07-17 23:21:03 +03:00
Dmitry Stogov f49ee79e95 gc_check_possible_root() may throw exception. 2017-07-17 23:17:16 +03:00
Dmitry Stogov cc04d42055 Merge branch 'master' into unset_cv
* master:
  Constant evaluation of in_array() (support for more cases).
  fix missing var for phpize
  Add support for OpenSSL security level
2017-07-17 23:09:13 +03:00
Dmitry Stogov ff83560ec6 Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  fix missing var for phpize
  Add support for OpenSSL security level
2017-07-17 23:08:42 +03:00
Dmitry Stogov 3754272818 Constant evaluation of in_array() (support for more cases). 2017-07-17 23:08:10 +03:00
Anatol Belski bdfc84239b Merge branch 'PHP-7.1'
* PHP-7.1:
  fix missing var for phpize
2017-07-17 19:41:21 +02:00
Anatol Belski 65d5e025a7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix missing var for phpize
2017-07-17 19:40:31 +02:00
Anatol Belski 4ef9f536ba fix missing var for phpize
(cherry picked from commit 36c3d71407)
2017-07-17 19:38:50 +02:00
Jakub Zelenka 26982e36d5 Add support for OpenSSL security level 2017-07-17 17:40:51 +01:00
Dmitry Stogov eb6c7471cb Constant evaluation of in_array() (support for more cases). 2017-07-17 17:27:21 +03:00
Dmitry Stogov 1180d8c801 Separate ISSET_ISEMPTY_CV/UNSET_CV from ISSET_ISEMPTY_VAR/UNSET_VAR 2017-07-17 14:11:50 +03:00
Dmitry Stogov d9d3b2c206 Fixed CFG/SSA construction (avoid multiple identical predecessors) 2017-07-17 13:35:47 +03:00
Dmitry Stogov 5b0e6248e6 Removed vim mode lines. zend_vm_opcodes.h loses these lines after regeneration. Lines in zend_vm_def.h lead to insertion inthe middle of zend_vm_execute.h. 2017-07-17 11:00:46 +03:00
Dmitry Stogov b31e77dbea Allocate additional slot for third argument 2017-07-17 09:11:14 +03:00
Anatol Belski 6e4f3d1967 fix new password related pieces wrt failing tests 2017-07-17 08:01:26 +02:00
Peter Kokot 9780d16376 Fixed bug #74906 redirecting incorrect include <sys/errno.h> 2017-07-17 06:56:59 +01:00
Joe Watkins 876941cae2 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74906 redirecting incorrect include <sys/errno.h>
2017-07-17 06:55:28 +01:00
Joe Watkins e0282c3b58 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74906 redirecting incorrect include <sys/errno.h>
2017-07-17 06:55:02 +01:00
Peter Kokot 4d08b9dac0 Fixed bug #74906 redirecting incorrect include <sys/errno.h> 2017-07-17 06:54:27 +01:00
Joe Watkins 8c238c15bc Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug 74913 redirecting incorrect include <sys/poll.h>
2017-07-17 06:52:43 +01:00
Joe Watkins 2e82ed9b73 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug 74913 redirecting incorrect include <sys/poll.h>
2017-07-17 06:51:47 +01:00
Peter Kokot 0db20a7cb1 Fixed bug 74913 redirecting incorrect include <sys/poll.h> 2017-07-17 06:50:59 +01:00
Anatol Belski ea51bcd1fa fix typo 2017-07-17 07:01:07 +02:00
Anatol Belski 36c3d71407 fix missing var for phpize 2017-07-17 06:54:47 +02:00
Sara Golemon e93f089d6a Refactor password_hash()
Pull salt generation out to a helper.
Merge options/hash into single switch.
Restore php_error->php_error_docref from last diff. (Error messages matter)
2017-07-16 17:37:45 -04:00
Sara Golemon 7165e28738 Refactor password.c
Use zend_string instread of char*/size_t
Clean up use of scope vars
Get rid of some temporaries/overstacked expressions.
2017-07-16 17:02:39 -04:00
Sara Golemon 3de82a0349 Provide zend_string wrappers for php_base64_(en|de)code
Also pull existing php_base64_decode() proxy out to an inline.
Bump PHP_API_VERSION for ABI change.
2017-07-16 17:01:20 -04:00
Jakub Zelenka 90ae2aec8c Make functions in openssl.c more consistent
Improve naming, CS and add some static defs
2017-07-16 18:38:17 +01:00
Jakub Zelenka 5381ff757d Make consitent naming and improve CS in xp_ssl 2017-07-16 17:57:43 +01:00
Jakub Zelenka c08dba3431 Allow setting SNI cert and pk in separate files 2017-07-16 16:15:43 +01:00
Jakub Zelenka 18180bb161 Bump PHP_JSON_VERSION to 1.6.0 2017-07-16 15:53:02 +01:00
Jakub Zelenka 0f047f60f0 [ci skip] Remove CSV leftovers from json code - $Id$ 2017-07-16 15:51:39 +01:00
Jakub Zelenka 9c58822653 Introduce internal php_json_encode_ex to allow extensions setting depth 2017-07-16 15:47:23 +01:00
Jakub Zelenka 0d0f7cde8c Add JSON_INVALID_UTF8_SUBSTITUTE and JSON_INVALID_UTF8_IGNORE
It implements request #65082 and adds options for replacing resp.
ignoring invalid UTF-8 sequences for json_encode and json_decode.
2017-07-16 12:35:24 +01:00
Anatol Belski f6a4491662 Merge branch 'PHP-7.1'
* PHP-7.1:
  Add test for bug #74923
2017-07-15 11:31:45 +02:00
Anatol Belski 6cd140fdf8 Add test for bug #74923 2017-07-15 11:30:56 +02:00
Anatol Belski d6bcfcd9eb update NEWS 2017-07-14 21:08:36 +02:00
Anatol Belski 705c151cd8 Merge branch 'PHP-7.1'
* PHP-7.1:
  update NEWS
2017-07-14 21:08:16 +02:00
Anatol Belski 0b5683e480 update NEWS 2017-07-14 21:07:48 +02:00
Sebastian Bergmann 674b11d10e Tweak 2017-07-14 13:43:21 +02:00
Dmitry Stogov 2a286ad599 Added goblal optimisation passes based on data flow analyses using SSA form:
SCCP - Sparse Conditional Constant Propagation, DCE - Dead Code Elimination
and removing of unused local variablesi.

Squashed commit of the following:

commit bf5ac05fc0f5f6ab9c7f2e4eaa83a11c84f471d3
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 14:26:40 2017 +0300

    Added news entry

commit 4cfa6984b1f3cd8008a0c0dc82ee3de2da02bf7c
Merge: 1cdaaac 1f261d7
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 13:30:50 2017 +0300

    Merge branch 'sccp' into dce

    * sccp:
      Bump OCI8 version for recent patch
      WS
      Fix test title
      Ensure that the stream position is kept between reads
      Turn off EXIF_DEBUG so Travis don't complain at me
      Don't add a new line to undefined tags in EXIF_DEBUG mode
      Fix compile error with EXIF_DEBUG
      update NEWS
      disable --with-pcre-valgrind on travis
      fix default args for --with-pcre-valgrind
      Enable valgrind support for PCRE by default in debug builds
      add oniguruma.patch to ease future upgrades
      SIZEOF_SIZE_T doesn't exist on AIX and POWER8 (ppc64le), keep using SIZEOF_LONG

commit 1f261d77cb1cb966335097f364ace9349269c704
Merge: a32a3fb b280ba8
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 13:30:39 2017 +0300

    Merge branch 'master' into sccp

    * master:
      Bump OCI8 version for recent patch
      WS
      Fix test title
      Ensure that the stream position is kept between reads
      Turn off EXIF_DEBUG so Travis don't complain at me
      Don't add a new line to undefined tags in EXIF_DEBUG mode
      Fix compile error with EXIF_DEBUG
      update NEWS
      disable --with-pcre-valgrind on travis
      fix default args for --with-pcre-valgrind
      Enable valgrind support for PCRE by default in debug builds
      add oniguruma.patch to ease future upgrades
      SIZEOF_SIZE_T doesn't exist on AIX and POWER8 (ppc64le), keep using SIZEOF_LONG

commit 1cdaaac601cff37fa729f3e6b31dc584782a1649
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 13:27:12 2017 +0300

    Use generic evalution mechanism for constant functions

commit 75bd92a60928818358686410deec24a48e05d6da
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 12:39:05 2017 +0300

    Fixed use-def chain unlinking for "$a = 1; $a += $a;"

commit 7d7746814dc382e468f9016d90c069b88b8b0f0d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 12:38:29 2017 +0300

    Enable duplicate predecessors verification

commit 6b1667f2062d7c1b55e389b03b155cbe132f5dbf
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 11:55:20 2017 +0300

    Removed duplicate definitions

commit 1415b53014bf5aa1521b779debea6847db8c7940
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 11:51:29 2017 +0300

    Enable evaluation of constant functions with 3 arguments

commit ab367deef99f39dee15c6bbac45cb25eb9d29e00
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 11:45:13 2017 +0300

    Removed deprecated check

commit c51659ea8c62e4e8fbf32a0567d4f541807d6b6d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 11:40:42 2017 +0300

    Reduce limit

commit b1be5a04d783eb160a71fe26e030386b3e2771ba
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 11:38:23 2017 +0300

    Disable constant array_flip() evaluation

commit 7a5b0596a149a2efc5893ea83be78ef9129009cb
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 11:33:20 2017 +0300

    Fixed comments

commit 377e48b3426f9ccbcd6207acbbed87b9fdbf549d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 11:28:50 2017 +0300

    Cast of string to long/double can not produce exception

commit 228dd01af3bf6daefbd7d5be82938dec8b55b6a0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 11:24:50 2017 +0300

    Added missed return

commit 0972a2163643757e7e270b8e1c466800aedf1308
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 11:22:36 2017 +0300

    objects may be nested in array operands

commit bd346bfa5c4c58896fabd9ab2e4d9bb85b3c1402
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 11:19:20 2017 +0300

    ~$resource is unsupported.

commit c77e45610c22e29b5f4ad7234e38a1f4e2498937
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 11:15:39 2017 +0300

    ws

commit 0b64d71109fddfec736c91546b6df978adb1f4fd
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 11:14:40 2017 +0300

    Call to zend_ssa_unlink_use_chain() shouldn't be dropped

commit cb7059fcf6e51616c08d5b8a933401a94ae0b6e0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 11:11:58 2017 +0300

    Safer check for function name. The previous check is incorrect in ZTS build.

commit 7280aba1e125fc314284d7ef1252e14d04c415a4
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 11:02:10 2017 +0300

    Missing warning

commit 54bc7b576cee33037b7e575c013e3ede726647a2
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 14 10:56:42 2017 +0300

    Proper check for successors count

commit ea8c004a155453b4e15684e2bd1bdb1dc99e8833
Merge: 624f76d a32a3fb
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 13 15:56:26 2017 +0300

    Merge branch 'sccp' into dce

    * sccp:
      fix fold
      Fixed bug #74866 extension_dir = "./ext" now use current directory for base
      add next vc15 toolset to the list
      Revert "Enable whole program optimization for builds without PGO, too"
      extend comment
      cleanup discontinued target

commit a32a3fb67cd03b9cdab8cd15f133ef55e717408d
Merge: 2722dbf 5fb2abd
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 13 15:56:14 2017 +0300

    Merge branch 'master' into sccp

    * master:
      fix fold
      Fixed bug #74866 extension_dir = "./ext" now use current directory for base
      add next vc15 toolset to the list
      Revert "Enable whole program optimization for builds without PGO, too"
      extend comment
      cleanup discontinued target

commit 624f76df48db42f616bdfd02e9b26515a97c68e2
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 13 12:30:27 2017 +0300

    Set RETURN_VALUE_UNUSED instead of additional FREE opcode, if possible.
    Keep alive dead instructions that have to free two temporary variables.

commit 94c9b26695702e863ebeb40fa3cce5f5f2db7744
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 13 11:51:14 2017 +0300

    More accurate "vararg" handling in DCE

commit 665ed8491ca07cd6d3363abf42c5777e132a3da1
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 13 09:31:45 2017 +0300

    Improved DCE performance, by avoiding redundand checks and repeatable iterations.

commit 3f42ce18ba4420aabb9b07b838096cce340d06b7
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 12 23:03:11 2017 +0300

    Added few more instructions without side effects and exceptions

commit b17178f991c095d9137c1536b53b933208e575bf
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 12 20:39:02 2017 +0300

    Temprary enable SSA validation in DEBUG build

commit e238a8dc79debcf2f833e07323f975173aec6205
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 12 20:37:53 2017 +0300

    Inegrate SSA validation developed by Nikita

commit a247cee80b47ca335162e8bd46d06274f8af5a4d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 12 20:31:27 2017 +0300

    Perform DCE pass before other DFA optimisations, to properly reconstruct "no value" use-def chains.

commit a651564f299e3b413af1146149de0d7eec0dfb28
Merge: 06f6eb0 2722dbf
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 12 18:55:05 2017 +0300

    Merge branch 'sccp' into dce

    * sccp:
      Resources should be closed during object destructioin, not during freeing.
      Guard against AppVeyor losing deps issue
      increase poll timeout as false positives mitigation
      Value of EG(user_exception_handler) should't relive request boundary
      sodium ext: remove function names before exception messages
      sodium ext: update the crypto_kx_*() API to the libsodium one
      Revert "fix macro redifinitions"

commit 2722dbfdf54702c8b429ed792e96f91219031eb6
Merge: 6595ea3 09d3b73
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 12 18:54:48 2017 +0300

    Merge branch 'master' into sccp

    * master:
      Resources should be closed during object destructioin, not during freeing.
      Guard against AppVeyor losing deps issue
      increase poll timeout as false positives mitigation
      Value of EG(user_exception_handler) should't relive request boundary
      sodium ext: remove function names before exception messages
      sodium ext: update the crypto_kx_*() API to the libsodium one
      Revert "fix macro redifinitions"

commit 06f6eb0e6877d8b26c621f5627587539ebcc781f
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 12 14:52:28 2017 +0300

    Use zend_ssa_is_no_val_use() instead of zend_has_improper_op1_use()

commit 4b64dbb30d519be359c44ad4f3802e93a7f5fa65
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 12 13:07:14 2017 +0300

    Check if instruction may throw exception only for instructions without known side effects.
    Always disable removing ASSIGN and UNSET_VAR that may throw.

commit c5aa1f47cd16290c77fb988504dc0dd8bad242a3
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 12 11:21:07 2017 +0300

    Use existing bit

commit c2af153baea6e05401f78a856a8ae436e5f37bf9
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 12 11:10:48 2017 +0300

    Updated Windows build

commit de5e8fc12971e55c81b0768daa96adcd6074038e
Merge: 8c0de53 6595ea3
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 12 11:10:12 2017 +0300

    Merge branch 'sccp' into dce

    * sccp: (29 commits)
      Use existing bit
      Updated Windows build
      Fixed compilation error
      Remove debug code
      We need to check for the length here too, or we crash and no one likes that! :(
      * Implemented #65187 (exif_read_data/thumbnail: add support for stream resource) * ext/exif now uses FAST_ZPP
      Remove extraneous configure flag
      Revert "remove excessive checks and fix warnings"
      parametrize zip names
      Upgrade bundled PCRE to 8.41
      Updated NEWS file with LDAP changes
      Fixed removing all controls by passing an empty array to ldap_set_option
      Filled in NEWS file with ext/ldap last modifications
      change order, allow to build as shared extension
      restore file deleted by mistake in a merge commit
      Fix segfault in php_stream_context_get_option call
      remove excessive checks and fix warnings
      fix macro redifinitions
      fix symbol availability and ws
      Remove this for now, as not found
      ...

commit 6595ea3420b686d1bfe49fbd5893b6a42115c60b
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 12 10:27:02 2017 +0300

    Use existing bit

commit f0bfd36cb822dbbe28df827a53a2ed96aa61051f
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 12 10:21:22 2017 +0300

    Updated Windows build

commit a9bd7c89f28cf99933a4d3d026a6da5f5e3ca0f7
Merge: d1eb5ed 2b7d3fb
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 12 09:51:32 2017 +0300

    Merge branch 'master' into sccp

    * master: (27 commits)
      Fixed compilation error
      Remove debug code
      We need to check for the length here too, or we crash and no one likes that! :(
      * Implemented #65187 (exif_read_data/thumbnail: add support for stream resource) * ext/exif now uses FAST_ZPP
      Remove extraneous configure flag
      Revert "remove excessive checks and fix warnings"
      parametrize zip names
      Upgrade bundled PCRE to 8.41
      Updated NEWS file with LDAP changes
      Fixed removing all controls by passing an empty array to ldap_set_option
      Filled in NEWS file with ext/ldap last modifications
      change order, allow to build as shared extension
      restore file deleted by mistake in a merge commit
      Fix segfault in php_stream_context_get_option call
      remove excessive checks and fix warnings
      fix macro redifinitions
      fix symbol availability and ws
      Remove this for now, as not found
      fix authors
      NEWS for Sodium
      ...

commit 8c0de53e5f599c83fa03c78931527ab4ff14cf93
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 11 21:54:36 2017 +0300

    Initial integration of Dead Code Elimination (DCE) and unused variable removing passes, originally developed in https://github.com/nikic/php-src/tree/opt, into DFA optimization pass.

commit d1eb5ede3a2b9a0bf57e06783f7913a6383f5d6d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 11 12:19:11 2017 +0300

    Proper SSA reconstruction for "$a = $a;"

commit 4872d139b55c22c2325459dba0ee557c708567b5
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 11 11:57:33 2017 +0300

    Replace conditions, that should be always true, by ZEND_ASSERT()

commit 9915b1f5cd2bdd92d0cc5e90244a90fbef06740b
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 11 11:56:51 2017 +0300

    Fixed pass name

commit d26ff1b88d3b3b1e8742f2e7812ae5e2531958a6
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 11 11:55:47 2017 +0300

    Don't create identical predecessors

commit 0625fbe32bd66b7bcca29e65b131f0cfccd3e074
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 11 09:36:07 2017 +0300

    Update unreachable blocks.

commit 9d7d409e6abda5c2e13458f01b8133095fb68531
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 11 09:28:49 2017 +0300

    Keep consistent cfg.map[]

commit 85a86e58b220eaf2012f652b97fbeb2d2f85646d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 11 02:36:14 2017 +0300

    Remove unusded phi

commit d5e0f2df4c76656bbe5973e69e12e1b7415de5ee
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 11 02:35:00 2017 +0300

    Don't clear phi->spources[] too early.

commit a90ed34295a0bab09c00bb7001a368a858a38399
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 10 21:29:39 2017 +0300

    Make SCCP to remove dead live ranges.

commit 320237f3d84b872dfa096b9a604ae4d5b4d28c8e
Merge: 63bbed5 7be2637
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 10 17:35:21 2017 +0300

    Merge branch 'master' into sccp

    * master:
      Fixed memory leak introduced by 7cb5bdf64a
      eliminate casts
      remove checks for eol dependencies
      improve test
      Small fix in ext/ldap, Moved vars definitions to the beginning of the block using them
      ZipArchive implements countable, added ZipArchive::count() method

commit 63bbed5e71432d14217b591de511f09937a3c00c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 10 17:01:15 2017 +0300

    Evaluation of few more constant functions

commit 07f45d8a3dbfa67bc28c9ef4bb14c753816f4e44
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 10 16:22:47 2017 +0300

    Properly unlinking dead blocks from predecessors/successors and dominators

commit 502002aa6e11452ed27829f7e29604b27fc69ad2
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 10 13:33:14 2017 +0300

    Replacel constant JMPZ/NZ/ZNZ by JMP or NOP

commit 3253e61b66b3aa324115ec57ff1cb271ca27dc14
Merge: e7f69f0 161c378
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 10 12:22:39 2017 +0300

    Merge branch 'master' into sccp

    * master:
      Revert "Fixed bug #74878"
      Upgrading note for #74837
      Fixed bug #74837 - NEWS
      Implement Countable for DomNodeList and DOMNamedNodeMap (Request #74837)
      Fix #49649 - Handle property visibility changes on unserialization

commit e7f69f07fc649692218d01dab34b8f8555a6f88c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 10 12:15:08 2017 +0300

    Prevent compile-time evaluation of implode() with arguments causing run-time warnings

commit 0e882f189a01b6ee648420776fb473c1efd22380
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 10 11:54:04 2017 +0300

    Constant evaluation of ini_get() for some safe cases

commit 9e36a748b28850bd15ac621879e1d28ed8e36169
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 10 11:13:37 2017 +0300

    Constant evaluation of implode()

commit e73046e266617ae23caa7f40344fc6e8e41e3c56
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 10 10:51:23 2017 +0300

    Fixed uninitialized value

commit f5e2e8e68cc46cfc1380d000672d01b243ad7f59
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 10 10:05:37 2017 +0300

    Remove (compact) unused constants after SCCP pass

commit f0b7bb86ebe93373a02ef36029f76239ba9ec1d4
Merge: e69d4f6 cfacf84
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 10 09:10:00 2017 +0300

    Merge branch 'master' into sccp

    * master: (37 commits)
      #73594 tests only check the extra params if dns_get_record is successful
      Fixed bug #74852 (property_exists returns true on unknown DateInterval property)
      fix uninitialized var
      fix comparison warning
      comply with POSIX signature
      fix warning
      remove some casts
      cleanup casts
      remove useless cast
      eliminate casts
      sync vim mode lines in main
      [ci skip] update NEWS
      [ci skip] update NEWS
      [ci skip] update NEWS
      Fixed bug #74883 SQLite3::__construct() produces "out of memory" exception with invalid flags
      Silent compiler warning
      Fix test
      Deprecated the read_exif_data() alias
      Add myself as exif maintainer
      update libs versions
      ...

commit e69d4f61409c473ae36d85c3779ad5f786fecdc0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 7 12:51:41 2017 +0300

    Avoid in-place modification of referenced data

commit 58f7c17978dec7b5fe6fe80b4efc55e2168bab61
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 7 12:33:24 2017 +0300

    Use arena for temporary data.

commit 93d3e7ddc22f1bc7323abae2256b0b50bc1f8b29
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 7 11:54:47 2017 +0300

    Made sccp_ctx to be an "extension" of scdf_ctx and remove duplicate data.

commit f810c6f7c47b03412c61878b761e1bb687fbcf28
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 7 11:20:48 2017 +0300

    Improved SSCP integration

commit d17ed887f304af0f6ccba76a3dbfca888867ea01
Merge: d90805a 29653da
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 7 10:22:37 2017 +0300

    Merge branch 'master' into sccp

    * master:
      Fixed bug #74873 (Minor BC break: PCRE_JIT changes output of preg_match()).
      Fixed bug #72324 (imap_mailboxmsginfo() return wrong size)
      Fix redefine warnings
      Expand sb's name and capitalize my own
      Write the URL on a new line, so that it is easier copyable

commit d90805a40bd5d75d197f7b95c69680f636932868
Merge: 2e5e03b fc336c7
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 6 23:07:04 2017 +0300

    Merge branch 'master' into sccp

    * master:
      Added missed dump of "main" script code
      replace the stack var by a macro
      [ci skip] sync NEWS
      minor fix for web announce
      add missing NEWS entry for #74087 and also fix the formatting
      move NEWS entry to the correct place, also bump the version

commit 2e5e03b673cb86ee0fa6be06496553fa6b8c52e7
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 6 23:03:41 2017 +0300

    Call info should be removed, but at least we should prevent incorrect stack adjustment.

commit 1ee9110b35eab79f74d08278c104c92796740fa7
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 6 19:34:43 2017 +0300

    Remove NOP instructions, introduced bvy SCCP.
    This commit discloses unrelated issue caused ext/soap/tests/bug70211.phpt failure.

commit 9a2f50070d1afde8ee4784a1dade2537e1ac30d5
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 6 16:34:02 2017 +0300

    Avoid useless iterations for first SSA variablesi, always marked BOT.

commit c57dd7c6efb98c89a8c87af0eaad76b71c9cda16
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 6 16:33:46 2017 +0300

    Use reference-counting

commit 90f822d68ef1cb68befa3fff289c9e8d1b2068c8
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 6 14:00:22 2017 +0300

    Support for few more opcodes

commit cffee2f7e5bb4198e645e291fafe5690443cf26c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 6 12:35:13 2017 +0300

    Combined constants substitutaion and dead instruction removing in single pass. This eleminates substitution in dead instructions.

commit f890375c16052a9d79bf77c9021914cb9c6616f8
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 6 10:34:48 2017 +0300

    Use reference-counting instead of duplication

commit db0cd64dfa7a2ff809b49a049074b5fa39d37314
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 6 03:04:27 2017 +0300

    Improved SCDF<->SCCP interface

     - "get_feasible_successors" callback is changed into "mark_feasible_successors" and should mark necessary edges through scdf_mark_edge_feasible()
     - SCDF takes care about OP_DATA instruction
     - SCDF code is re-arranged to avoid repeatable checks

commit e0ad5dd48942c71033fad985c591549a35c21ef3
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 6 00:55:40 2017 +0300

    Changed representation of "feasible_edges", using one bit per edge.

commit afee3138fe49588b3967f54bf66375f880a51924
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 6 00:49:56 2017 +0300

    Revert "Don't propagate unused values"

    This reverts commit 84e5bfd4304d34e3a7107db71783882013f8de59.

commit 84e5bfd4304d34e3a7107db71783882013f8de59
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 5 23:39:42 2017 +0300

    Don't propagate unused values

commit d4f15b95061a8a2303d90e6e54effeb9733f90b7
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 5 23:39:10 2017 +0300

    Don't visit the same Phi twice

commit 2558311b4d530fb84539db304d03dfeba5eda789
Merge: 722a59d 7bb4ae5
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 5 21:51:06 2017 +0300

    Merge branch 'master' into sccp

    * master:
      Fixed final dump "after optimizer"

commit 722a59ddb12e641aea99ca8853ef921c4fdf9819
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 5 21:09:29 2017 +0300

    SCCP doesn't support VERIFY_RETURN_TYPE (ext/opcache/tests/bug73789.phpt failure)

commit 7084fade4dcb74415f0644d8e207f0fab6c6509d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 5 20:37:21 2017 +0300

    Fixed SSA reconstruction

commit 37ec4e0845a5b25fe2b523452d32dba22605d2e3
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 5 19:34:46 2017 +0300

    Disable constant propagation for variables that can be modified indirectly

commit 4bb9b6526e44c2f324f9a7c08890ab9bdedd639c
Merge: 6800460 73d5097
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 5 19:17:04 2017 +0300

    Merge branch 'master' into sccp

    * master: (43 commits)
      Keep information about SSA variables, that may be modified indirectly.
      Added constants for known ldap controls OID and tests for ldap_get/set_option for controls
      Added support for controls to ldap_get_option
      [ci skip] sync NEWS
      NEWS for oniguruma
      Patch from the upstream git https://github.com/kkos/oniguruma/issues/60 (CVE-2017-9228)
      Patch from the upstream git https://github.com/kkos/oniguruma/issues/59 (CVE-2017-9229) b690371bbf97794b4a1d3f295d4fb9a8b05d402d Modified for onig 5.9.6
      Patch from the upstream git https://github.com/kkos/oniguruma/issues/58 (CVE-2017-9227)
      Patch from the upstream git https://github.com/kkos/oniguruma/issues/57 (CVE-2017-9224)
      Patch from the upstream git https://github.com/kkos/oniguruma/issues/55 (CVE-2017-9226) b4bf968ad52afe14e60a2dc8a95d3555c543353a Modified for onig 5.9.6 f015fbdd95f76438cd86366467bb2b39870dd7c6 Modified for onig 5.9.6
      valid_symbol_table removed
      Improve fix for #74145
      Fix wddx
      Fix tests
      Fixed bug #74111
      Fix bug #74603 - use correct buffer size
      Fix bug #74651 - check EVP_SealInit as it can return -1
      Update NEWS
      Fix bug #74087
      Fixed parsing of strange formats with mixed month/day and time strings
      ...

commit 680046086c17b938e0288fca820668a183b86834
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 5 16:14:38 2017 +0300

    Support for few more internal functions evaluation

commit 74a29468ef14260ea3c210a2d1e3548806c81339
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 5 13:42:55 2017 +0300

    Disabled evaluation of strpos() with empty needle.

commit e8908946e52127727da9f0dd22a053befe8bf848
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 5 13:17:30 2017 +0300

    Replace calls to in_array() with constant array by IN_ARRAY instruction after SCCP.

commit 4e8fa2c3dd087a49ba90a3ef8231cc81f0399548
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jul 5 00:58:12 2017 +0300

    Initial integration of Sparse Conditional Constant Propagation (SCCP), originally developed in https://github.com/nikic/php-src/tree/opt, into DFA optimization pass.
2017-07-14 14:33:34 +03:00
Anatol Belski b5fd99b636 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74923 Crash when crawling through network share
2017-07-14 13:24:21 +02:00
Anatol Belski 5d15fdc4a4 Fixed bug #74923 Crash when crawling through network share 2017-07-14 13:23:24 +02:00
Christopher Jones b280ba854a Merge branch 'PHP-7.1' 2017-07-14 14:14:10 +10:00
Christopher Jones 3b60af90fd Merge branch 'PHP-7.0' into PHP-7.1 2017-07-14 14:13:33 +10:00
Christopher Jones c1504b81d3 Bump OCI8 version for recent patch 2017-07-14 14:13:08 +10:00
Kalle Sommer Nielsen 4d684a6cd7 WS 2017-07-14 03:42:15 +02:00
Kalle Sommer Nielsen 333c362178 Fix test title 2017-07-14 02:02:25 +02:00
Kalle Sommer Nielsen 997e2e5452 Ensure that the stream position is kept between reads 2017-07-14 01:59:23 +02:00
Kalle Sommer Nielsen f7d9f6456c Turn off EXIF_DEBUG so Travis don't complain at me 2017-07-14 01:18:58 +02:00
Kalle Sommer Nielsen bf7f6f9078 Don't add a new line to undefined tags in EXIF_DEBUG mode 2017-07-14 01:17:34 +02:00
Kalle Sommer Nielsen 9cf586cdfb Fix compile error with EXIF_DEBUG 2017-07-14 01:12:00 +02:00
Anatol Belski 89eb27a99c update NEWS 2017-07-13 21:08:13 +02:00
Anatol Belski 9ce076a3d1 disable --with-pcre-valgrind on travis 2017-07-13 20:28:44 +02:00
Anatol Belski 24de0fe9f4 fix default args for --with-pcre-valgrind 2017-07-13 20:28:10 +02:00
Frank Denis aa32d989c7 sodium ext: remove unused sodium_randombytes_*() prototypes 2017-07-13 18:59:58 +02:00
Anatol Belski 850bb998d9 Enable valgrind support for PCRE by default in debug builds
Thanks Nikita for the hint.
2017-07-13 18:38:28 +02:00
Anatol Belski 1e2764614b add oniguruma.patch to ease future upgrades 2017-07-13 17:34:14 +02:00
Lior Kaplan c2c60fcac7 SIZEOF_SIZE_T doesn't exist on AIX and POWER8 (ppc64le), keep using SIZEOF_LONG 2017-07-13 18:05:47 +03:00
Anatol Belski 5fb2abd6b0 fix fold 2017-07-13 14:33:49 +02:00
Francois Laupretre 0782a7fc63 Fixed bug #74866 extension_dir = "./ext" now use current directory for base 2017-07-13 14:27:19 +02:00
Anatol Belski 613102bd67 add next vc15 toolset to the list 2017-07-13 12:20:34 +02:00
Anatol Belski bc16deee83 Revert "Enable whole program optimization for builds without PGO, too"
This reverts commit f052e99df6.

There appear to be link issues with upcoming 19.11 and /LTCG, prefer
wider dependency compatibility.
2017-07-13 12:20:34 +02:00
Anatol Belski d9f72886aa extend comment 2017-07-13 12:20:34 +02:00
Anatol Belski 1300017cdc cleanup discontinued target 2017-07-13 08:18:50 +02:00
Frank Denis b071fcb81d sodium ext: add bindings for keygen() functions
This is the recommended way to generate keys correctly for all operations
using a single key, since libsodium 1.0.12.
2017-07-12 23:29:48 +02:00
Frank Denis 8e8fbf51f7 sodium ext: sort prototypes 2017-07-12 23:06:43 +02:00
Dmitry Stogov 09d3b7386c Resources should be closed during object destructioin, not during freeing. 2017-07-12 18:53:16 +03:00
Anatol Belski b41d715511 Merge branch 'PHP-7.1'
* PHP-7.1:
  Guard against AppVeyor losing deps issue
2017-07-12 15:40:33 +02:00
Anatol Belski 91aad4bc81 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Guard against AppVeyor losing deps issue
2017-07-12 15:40:00 +02:00
Anatol Belski 2f606dc5e8 Guard against AppVeyor losing deps issue
Possibly due to concurrent build cache updates or some changes in
the remote image. Some locking mechanism still could be required.
2017-07-12 15:37:40 +02:00
Anatol Belski bfa3df0048 Merge branch 'PHP-7.1'
* PHP-7.1:
  increase poll timeout as false positives mitigation
2017-07-12 14:50:36 +02:00
Anatol Belski 8b04e89ef0 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  increase poll timeout as false positives mitigation
2017-07-12 14:49:58 +02:00
Anatol Belski 04cc2f6473 increase poll timeout as false positives mitigation 2017-07-12 14:38:12 +02:00
Dmitry Stogov 43e283fd64 Value of EG(user_exception_handler) should't relive request boundary 2017-07-12 15:37:12 +03:00
Frank Denis a5258ed645 sodium ext: remove function names before exception messages 2017-07-12 08:48:09 +01:00
Frank Denis 6ac6d2c64a sodium ext: update the crypto_kx_*() API to the libsodium one
The crypto_kx API initially present in the PHP bindings was a prototype
that was not part of libsodium.

This implements the one from libsodium >= 1.0.12.

We can later leverage the native libsodium functions if we decide that
1.0.12 is the minimum version we want to support.
2017-07-12 08:25:38 +01:00
Frank Denis dfac71d096 Revert "fix macro redifinitions"
This reverts commit cbbf579f21.
2017-07-12 08:25:35 +01:00
Dmitry Stogov 2b7d3fb45f Fixed compilation error 2017-07-12 09:46:22 +03:00
Kalle Sommer Nielsen 7845182edd Remove debug code 2017-07-12 06:12:07 +02:00
Kalle Sommer Nielsen 363bb03b7e We need to check for the length here too, or we crash and no one likes that! :( 2017-07-12 06:11:14 +02:00
Kalle Sommer Nielsen 969eb8345b * Implemented #65187 (exif_read_data/thumbnail: add support for stream resource)
* ext/exif now uses FAST_ZPP
2017-07-12 05:43:50 +02:00
Sara Golemon bf0f769d58 Remove extraneous configure flag
--with-sodium --with-libsodium[=DIR] is inconsistent with
existing extensions. Unify these into a single
--with-sodium[=DIR] option
2017-07-11 22:12:58 -04:00
Anatol Belski d1ee66655b Revert "remove excessive checks and fix warnings"
This reverts commit c620daecb4.
2017-07-11 23:13:22 +02:00
Anatol Belski 2b37da9eda parametrize zip names
simplify names
2017-07-11 21:45:49 +02:00
Anatol Belski 8a287c0ea0 Upgrade bundled PCRE to 8.41
HEADSUP! With PCRE 8.39 the JIT related code was changed in the way,
that additional valgrind options became almost unavoidable. Valgrind
had it already sometimes hard with JIT, now there are seem to be more
cases requiring special valgrind options.

For this reason, the new configure option --with-pcre-valgrind was
introduced. The option is development/debugging only and turns on the
Valgrind related pieces in PCRE, so then false positives are avoided
to the big part. In addition, run-tests.php was added a new valgrind
option, when the leak check is enabled and the test filepath contains
pcre.

Thus, to debug the code related to PCRE with JIT enabled, two things
would likely make sense

  - configure --with-pcre-valgrind
  - valgrind option --smc-check=all if run-tests.php is not used

The checks so far reveal no new issues.
2017-07-11 17:01:59 +02:00
Côme Chilliet 9bcd93201f Updated NEWS file with LDAP changes
Also fixed wording: bug -> feature request for EXOP
2017-07-11 16:23:21 +02:00
Côme Chilliet a148ee8c7c Fixed removing all controls by passing an empty array to ldap_set_option 2017-07-11 16:18:33 +02:00
Côme Chilliet 4219ca966e Filled in NEWS file with ext/ldap last modifications 2017-07-11 13:53:46 +02:00
Remi Collet 249f75e7e4 change order, allow to build as shared extension 2017-07-11 13:53:06 +02:00
Remi Collet d5f7e01f7c restore file deleted by mistake in a merge commit 2017-07-11 13:07:51 +02:00
Remi Collet 2458dce3e5 Fix segfault in php_stream_context_get_option call 2017-07-11 11:41:47 +02:00
Anatol Belski c620daecb4 remove excessive checks and fix warnings 2017-07-11 11:03:09 +02:00
Anatol Belski cbbf579f21 fix macro redifinitions 2017-07-11 10:01:37 +02:00
Anatol Belski 8cfe479d1f fix symbol availability and ws 2017-07-11 09:54:36 +02:00
Remi Collet 90b2cecbaa Remove this for now, as not found
"E: Unable to locate package libsodium-dev"
2017-07-11 07:52:28 +02:00
Remi Collet d269aa2003 fix authors 2017-07-11 07:43:56 +02:00
Remi Collet c229ab587c NEWS for Sodium 2017-07-11 07:41:43 +02:00
Remi Collet ae96c7f48f fix CREDITS file 2017-07-11 07:30:22 +02:00
Paragon Initiative Enterprises 5cfa26c181 Squashed commit - Add ext/sodium
RFC: https://wiki.php.net/rfc/libsodium
Licensing: https://web.archive.org/web/20170710161517/https://github.com/jedisct1/libsodium-php/issues/127
2017-07-11 07:25:50 +02:00
Anatol Belski da2583b193 Merge branch 'PHP-7.1'
* PHP-7.1:
  update NEWS
  update NEWS
2017-07-10 22:50:53 +02:00
Anatol Belski 82acb58d8a update NEWS 2017-07-10 22:50:34 +02:00
Anatol Belski 3da01a9652 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update NEWS
2017-07-10 22:50:20 +02:00
Anatol Belski 3bcab31749 update NEWS 2017-07-10 22:49:55 +02:00
Anatol Belski 215bf24f01 Merge branch 'PHP-7.1'
* PHP-7.1:
  switch to next binary tools sdk version
2017-07-10 21:47:07 +02:00
Anatol Belski be531ce9f0 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  switch to next binary tools sdk version
2017-07-10 21:45:43 +02:00
Anatol Belski b47cff48de switch to next binary tools sdk version 2017-07-10 21:44:43 +02:00
Anatol Belski 07c7445dd0 fix datatype 2017-07-10 17:34:58 +02:00
Anatol Belski ad25234350 Merge branch 'PHP-7.1'
* PHP-7.1:
  Revert "Add more constants, improve comments, and add tests"
2017-07-10 17:02:32 +02:00
Anatol Belski 7360e6a36f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Revert "Add more constants, improve comments, and add tests"
2017-07-10 17:01:25 +02:00
Anatol Belski a797421e98 Revert "Add more constants, improve comments, and add tests"
This reverts commit 0c4f11ecaa.
2017-07-10 16:53:56 +02:00
Dmitry Stogov 7be2637dce Fixed memory leak introduced by 7cb5bdf64a 2017-07-10 17:34:30 +03:00
Anatol Belski 2283b6ff53 eliminate casts 2017-07-10 15:48:54 +02:00
Anatol Belski e0809fe62d remove checks for eol dependencies
yet one leftower, only FreeTDS is usable at the moment
2017-07-10 15:00:16 +02:00
Anatol Belski b6ae363338 Merge branch 'PHP-7.1'
* PHP-7.1:
  improve test
2017-07-10 13:50:53 +02:00
Anatol Belski fd08eaa8bc improve test 2017-07-10 13:49:44 +02:00
Côme Chilliet ed8bfcc6ea Small fix in ext/ldap, Moved vars definitions to the beginning of the block using them 2017-07-10 11:33:08 +02:00
Remi Collet 569d164c4a ZipArchive implements countable, added ZipArchive::count() method 2017-07-10 11:31:55 +02:00
Dmitry Stogov 161c378cc8 Revert "Fixed bug #74878"
This reverts commit 9069734b57.
2017-07-10 12:21:58 +03:00
Remi Collet 5369006edf Upgrading note for #74837 2017-07-10 08:55:41 +02:00
Remi Collet 6f97fb47ca Fixed bug #74837 - NEWS 2017-07-10 08:50:38 +02:00
Andreas Treichel f725d9b1b9 Implement Countable for DomNodeList and DOMNamedNodeMap (Request #74837) 2017-07-10 08:48:10 +02:00
Pedro Magalhães 7cb5bdf64a Fix #49649 - Handle property visibility changes on unserialization 2017-07-10 07:27:09 +01:00
Joe Watkins cfacf84dc1 Merge branch 'PHP-7.1'
* PHP-7.1:
  #73594 tests only check the extra params if dns_get_record is successful
2017-07-10 06:56:03 +01:00
Joe Watkins de32c9efc8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  #73594 tests only check the extra params if dns_get_record is successful
2017-07-10 06:55:53 +01:00
Pedro Magalhães 2689917b17 #73594 tests only check the extra params if dns_get_record is successful 2017-07-10 06:55:31 +01:00
Joe Watkins bad55a72ab Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74852 (property_exists returns true on unknown DateInterval property)
2017-07-10 06:54:24 +01:00
Joe Watkins ccd0ff3ac4 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74852 (property_exists returns true on unknown DateInterval property)
2017-07-10 06:53:59 +01:00
jhdxr 5cf54f6073 Fixed bug #74852 (property_exists returns true on unknown DateInterval property) 2017-07-10 06:53:22 +01:00
Anatol Belski e24a8012a0 fix uninitialized var 2017-07-09 17:54:46 +02:00
Anatol Belski a51cb393b1 fix comparison warning 2017-07-09 16:28:17 +02:00
Anatol Belski ba5df1c682 comply with POSIX signature 2017-07-09 16:23:31 +02:00
Anatol Belski 8d0d326ff9 fix warning 2017-07-09 16:05:36 +02:00
Anatol Belski 72b0a3a892 remove some casts 2017-07-09 15:47:01 +02:00
Anatol Belski 84079f4a1e cleanup casts 2017-07-09 15:31:05 +02:00
Anatol Belski e403acc74b remove useless cast 2017-07-09 15:15:17 +02:00
Anatol Belski aaf09f7bdf eliminate casts 2017-07-09 15:11:02 +02:00
Anatol Belski 384f0f8a4c sync vim mode lines in main 2017-07-09 15:07:23 +02:00
Anatol Belski e870edb1ee [ci skip] update NEWS 2017-07-09 15:05:44 +02:00
Anatol Belski 2409aac896 Merge branch 'PHP-7.1'
* PHP-7.1:
  [ci skip] update NEWS
  [ci skip] update NEWS
2017-07-09 15:03:07 +02:00
Anatol Belski 7938b9ccac [ci skip] update NEWS 2017-07-09 15:02:40 +02:00
Anatol Belski e89476a870 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] update NEWS
2017-07-09 15:02:03 +02:00
Anatol Belski 62700f76cb [ci skip] update NEWS 2017-07-09 15:01:37 +02:00
Anatol Belski 176b45fa3a Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74883 SQLite3::__construct() produces "out of memory" exception with invalid flags
2017-07-09 01:32:07 +02:00
Anatol Belski 02cc492015 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74883 SQLite3::__construct() produces "out of memory" exception with invalid flags
2017-07-09 01:31:25 +02:00
Anatol Belski b5338c0b7d Fixed bug #74883 SQLite3::__construct() produces "out of memory" exception with invalid flags 2017-07-08 23:52:22 +02:00
Kalle Sommer Nielsen 7bb696dc49 Silent compiler warning 2017-07-08 19:05:28 +02:00
Kalle Sommer Nielsen 38d019979e Fix test 2017-07-08 18:01:51 +02:00
Kalle Sommer Nielsen ba28d75c2c Deprecated the read_exif_data() alias 2017-07-08 15:02:05 +02:00
Kalle Sommer Nielsen 5c6e0b189e Merge branch 'master' of git.php.net:/php-src 2017-07-08 13:52:00 +02:00
Kalle Sommer Nielsen b1fd08d94c Add myself as exif maintainer 2017-07-08 13:51:36 +02:00
Anatol Belski 0acb6d1ae2 Merge branch 'PHP-7.1'
* PHP-7.1:
  update libs versions
  Fix NEWS entry location
  Fix NEWS entry location
  news entry for 74819
  news entry for 74651
  news entry for 74111
  news entry for 74435
  news entry for 74603
2017-07-08 13:42:47 +02:00
Anatol Belski b38de96733 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update libs versions
2017-07-08 13:42:10 +02:00
Anatol Belski 0fdceb6cd5 update libs versions 2017-07-08 13:41:50 +02:00
Kalle Sommer Nielsen 106386dd98 Fixed file name for case sensitive file systems 2017-07-08 03:34:30 +02:00
Kalle Sommer Nielsen 469206c84e Added test case for bug #73115 which was fixed by recently fixed bugs 2017-07-08 03:30:46 +02:00
Nikita Popov 9069734b57 Fixed bug #74878 2017-07-07 22:41:48 +02:00
Kalle Sommer Nielsen 134047dfde We currently don't use the guessing code, so don't compile it 2017-07-07 12:23:24 +02:00
Kalle Sommer Nielsen e6903d471e * Fixed bug #72819 (EXIF thumbnails not read anymore)
* Fixed bug #62523 (php crashes with segfault when exif_read_data called)
* Fixed the poor test case for #62523, which was a HTML document

Fixing #72819 had the side effect of fixing #62523 by supporting the format as seen in bug62523_1.phpt
2017-07-07 12:20:05 +02:00
Andrey Andreev ce4e07e37d Add missing NEWS entry, update UPGRADING
This was done back in January, but never noted in the NEWS file.
References:

https://github.com/php/php-src/pull/2312
https://github.com/php/php-src/pull/2321
2017-07-07 13:01:09 +03:00
Kalle Sommer Nielsen babc3c522f This should be EXPECT instead of EXPECTF 2017-07-07 11:31:31 +02:00
Kalle Sommer Nielsen cd8d0aad7f Fixed bug #50660 (exif_read_data(): Illegal IFD offset (works fine with other exif readers)) 2017-07-07 11:29:23 +02:00
Kalle Sommer Nielsen 900ce92c9a Fixed bug #74428 (exif_read_data(): "Illegal IFD size" warning occurs with correct exif format) 2017-07-07 10:20:02 +02:00
Anatol Belski 57432da0b9 fix command 2017-07-07 09:05:33 +02:00
Dmitry Stogov 29653da385 Fixed bug #74873 (Minor BC break: PCRE_JIT changes output of preg_match()). 2017-07-07 09:54:21 +03:00
Kalle Sommer Nielsen 5a991ea49b Fixed bug #72324 (imap_mailboxmsginfo() return wrong size) 2017-07-07 08:18:33 +02:00
Kalle Sommer Nielsen 9507d14584 Fix redefine warnings 2017-07-07 08:08:25 +02:00
Kalle Sommer Nielsen 4be4a38d99 Expand sb's name and capitalize my own 2017-07-07 04:56:45 +02:00
Kalle Sommer Nielsen c5f83f3426 Write the URL on a new line, so that it is easier copyable 2017-07-07 04:15:13 +02:00
Christopher Jones 0d3e6f6add Merge branch 'PHP-7.0' into PHP-7.1 2017-07-07 12:14:57 +10:00
Christopher Jones 5c96a255ea Fix NEWS entry location 2017-07-07 12:14:12 +10:00
Christopher Jones 5ca02ca494 Fix NEWS entry location 2017-07-07 12:13:21 +10:00
Dmitry Stogov fc336c78e7 Added missed dump of "main" script code 2017-07-06 23:06:11 +03:00
Anatol Belski 9ad0d0ca3c replace the stack var by a macro 2017-07-06 20:47:04 +02:00
Remi Collet 9470b2016c [ci skip] sync NEWS 2017-07-06 13:22:10 +02:00
Remi Collet ec0ad331cd minor fix for web announce 2017-07-06 12:34:00 +02:00
Joe Watkins 18eb78854c news entry for 74819 2017-07-06 09:33:07 +01:00
Joe Watkins 700803b70c news entry for 74651 2017-07-06 08:20:21 +01:00
Joe Watkins 739ecf5430 news entry for 74111 2017-07-06 08:06:11 +01:00
Joe Watkins 1af5ca0746 news entry for 74435 2017-07-06 08:03:17 +01:00
Joe Watkins 2928feca46 news entry for 74603 2017-07-06 08:02:00 +01:00
Ferenc Kovacs b04b6b6a5b Merge branch 'PHP-7.1' 2017-07-06 00:14:29 +02:00
Ferenc Kovacs fb140d582c Merge branch 'PHP-7.0' into PHP-7.1 2017-07-06 00:13:24 +02:00
Ferenc Kovacs af07b76ccf Merge branch 'PHP-5.6' into PHP-7.0 2017-07-06 00:12:05 +02:00
Ferenc Kovacs 390f64701d add missing NEWS entry for #74087 and also fix the formatting 2017-07-06 00:10:07 +02:00
Ferenc Kovacs 7991a88675 move NEWS entry to the correct place, also bump the version 2017-07-06 00:05:14 +02:00
Dmitry Stogov 7bb4ae59c3 Fixed final dump "after optimizer" 2017-07-05 21:48:01 +03:00
Dmitry Stogov 73d5097a9f Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  Added constants for known ldap controls OID and tests for ldap_get/set_option for controls
  Added support for controls to ldap_get_option
2017-07-05 19:16:26 +03:00
Dmitry Stogov acffb7a080 Keep information about SSA variables, that may be modified indirectly. 2017-07-05 19:15:16 +03:00
Côme Chilliet 274d84139b Added constants for known ldap controls OID and tests for ldap_get/set_option for controls
Also fixed existing tests which were expecting ldap_get_option to fail on controls
2017-07-05 16:41:52 +02:00
Côme Chilliet 3a09c1246c Added support for controls to ldap_get_option 2017-07-05 16:41:52 +02:00
Anatol Belski 6164ec91c6 Merge branch 'PHP-7.1'
* PHP-7.1:
  [ci skip] sync NEWS
2017-07-05 12:33:20 +02:00
Anatol Belski 489f3a3234 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] sync NEWS
2017-07-05 12:32:52 +02:00
Anatol Belski aa3fceeaad [ci skip] sync NEWS 2017-07-05 12:31:21 +02:00
Côme Chilliet 513bbba5cc Merge branch 'pull-request/2608'
* pull-request/2608:
  Test ldap_exop_passwd with less parameters to be sure it works
  Changed API to avoid using passing result by reference
  Removed unused variables left over by LDAP EXOP patch
  Removed TSRMLS_CC instances left over by LDAP EXOP patch
  Swapped position of retoid and retdata as retoid is almost never used
  Removed two step syntax for EXOP helpers, one call workflow is enough
  Improved ldap_exop test to encode&decode a passwd EXOP to test sending/recieving data
  Removed TODOs regarding implementing passwd and whoami exops based on ldap_exop
  Added constants for standard EXOPs
  Removed ldap_refresh function as I’m not sure how to fix/use/test it
  Fixed ldap_exop and ldap_parse_exop. Only tested them for whoami exop. (see test file)
  Fixed ldap_parse_exop_whoami and ldap_parse_exop_passwd and added test for them
  Fixed ldap_exop_whoami and added a test for it
  Fixed ldap_exop_passwd and added tests for it
  Fixed building errors in LDAP EXOP
  Added EXOP features based on patch from http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/databases/php-ldap/files/ldap-ctrl-exop56.patch
2017-07-05 11:20:14 +02:00
Remi Collet e1f1ee1eb5 Merge branch 'PHP-7.1'
* PHP-7.1:
  NEWS for oniguruma
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/60 (CVE-2017-9228)
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/59 (CVE-2017-9229) b690371bbf97794b4a1d3f295d4fb9a8b05d402d Modified for onig 5.9.6
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/58 (CVE-2017-9227)
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/57 (CVE-2017-9224)
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/55 (CVE-2017-9226) b4bf968ad52afe14e60a2dc8a95d3555c543353a Modified for onig 5.9.6 f015fbdd95f76438cd86366467bb2b39870dd7c6 Modified for onig 5.9.6
2017-07-05 10:03:00 +02:00
Remi Collet 1e3b960ab5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  NEWS for oniguruma
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/60 (CVE-2017-9228)
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/59 (CVE-2017-9229) b690371bbf97794b4a1d3f295d4fb9a8b05d402d Modified for onig 5.9.6
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/58 (CVE-2017-9227)
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/57 (CVE-2017-9224)
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/55 (CVE-2017-9226) b4bf968ad52afe14e60a2dc8a95d3555c543353a Modified for onig 5.9.6 f015fbdd95f76438cd86366467bb2b39870dd7c6 Modified for onig 5.9.6
2017-07-05 10:02:42 +02:00
Remi Collet 8b1559b9f4 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  NEWS for oniguruma
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/60 (CVE-2017-9228)
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/59 (CVE-2017-9229) b690371bbf97794b4a1d3f295d4fb9a8b05d402d Modified for onig 5.9.6
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/58 (CVE-2017-9227)
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/57 (CVE-2017-9224)
  Patch from the upstream git https://github.com/kkos/oniguruma/issues/55 (CVE-2017-9226) b4bf968ad52afe14e60a2dc8a95d3555c543353a Modified for onig 5.9.6 f015fbdd95f76438cd86366467bb2b39870dd7c6 Modified for onig 5.9.6
2017-07-05 10:02:21 +02:00
Remi Collet 55b880070c NEWS for oniguruma 2017-07-05 09:26:55 +02:00
Remi Collet 703be4f77e Patch from the upstream git
https://github.com/kkos/oniguruma/issues/60 (CVE-2017-9228)

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
2017-07-05 09:26:06 +02:00
Remi Collet 27a743b82b Patch from the upstream git
https://github.com/kkos/oniguruma/issues/59 (CVE-2017-9229)
b690371bbf97794b4a1d3f295d4fb9a8b05d402d Modified for onig 5.9.6

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
2017-07-05 09:25:57 +02:00
Remi Collet bdf7393ddb Patch from the upstream git
https://github.com/kkos/oniguruma/issues/58 (CVE-2017-9227)

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
2017-07-05 09:25:49 +02:00
Remi Collet 2693e52113 Patch from the upstream git
https://github.com/kkos/oniguruma/issues/57 (CVE-2017-9224)

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
2017-07-05 09:25:39 +02:00
Remi Collet 4e68b2c52b Patch from the upstream git
https://github.com/kkos/oniguruma/issues/55 (CVE-2017-9226)
b4bf968ad52afe14e60a2dc8a95d3555c543353a Modified for onig 5.9.6
f015fbdd95f76438cd86366467bb2b39870dd7c6 Modified for onig 5.9.6

Thanks to Mamoru TASAKA <mtasaka@fedoraproject.org>
2017-07-05 09:25:27 +02:00
Remi Collet 8d1ae4e1c5 valid_symbol_table removed 2017-07-05 06:33:34 +02:00
Stanislav Malyshev d75dbb0e31 Merge branch 'PHP-7.1'
* PHP-7.1:
  Improve fix for #74145
  Fix wddx
  Fix tests
  Fixed bug #74111
  Fix bug #74603 - use correct buffer size
  Fix bug #74651 - check EVP_SealInit as it can return -1
  Update NEWS
  Fix bug #74087
  Fixed parsing of strange formats with mixed month/day and time strings
  Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV
  Fixed bug #74111
  Fix #74435: Buffer over-read into uninitialized memory
  Fix bug #74603 - use correct buffer size
  Fix bug #74651 - check EVP_SealInit as it can return -1
  Update NEWS
  Fix bug #73807
2017-07-04 21:23:16 -07:00
Stanislav Malyshev 0ba04f7737 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Improve fix for #74145
  Fix wddx
  Fix tests
  Fixed bug #74111
  Fix bug #74603 - use correct buffer size
  Fix bug #74651 - check EVP_SealInit as it can return -1
  Update NEWS
  Fix bug #74087
  Fixed parsing of strange formats with mixed month/day and time strings
  Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV
  Fixed bug #74111
  Fix #74435: Buffer over-read into uninitialized memory
  Fix bug #74603 - use correct buffer size
  Fix bug #74651 - check EVP_SealInit as it can return -1
  Update NEWS
  Fix bug #73807
2017-07-04 21:18:10 -07:00
Stanislav Malyshev 54840f9c8f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Improve fix for #74145
2017-07-04 21:11:15 -07:00
Stanislav Malyshev f269cdcd4f Improve fix for #74145 2017-07-04 21:10:08 -07:00
Stanislav Malyshev f76a6cd023 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix tests
2017-07-04 21:05:06 -07:00
Stanislav Malyshev 6b18d956de Fix wddx 2017-07-04 20:19:34 -07:00
Stanislav Malyshev e46d589624 Fix tests 2017-07-04 20:12:57 -07:00
Stanislav Malyshev 0496f5407f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Update NEWS
  Fix bug #74087
  Fixed parsing of strange formats with mixed month/day and time strings
  Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV
  Fixed bug #74111
  Fix #74435: Buffer over-read into uninitialized memory
  Fix bug #74603 - use correct buffer size
  Fix bug #74651 - check EVP_SealInit as it can return -1
  Update NEWS
  Fix bug #73807
2017-07-04 19:44:51 -07:00
Nikita Popov 3a25a56a92 Fixed bug #74111 2017-07-04 19:38:42 -07:00
Stanislav Malyshev 0525574913 Fix bug #74603 - use correct buffer size 2017-07-04 19:35:56 -07:00
Stanislav Malyshev 73cabfedf5 Fix bug #74651 - check EVP_SealInit as it can return -1 2017-07-04 19:30:56 -07:00
Stanislav Malyshev 12107d619b Update NEWS 2017-07-04 19:30:29 -07:00
Stanislav Malyshev f7f4fd4706 Fix bug #74087
Ported from https://vcs.pcre.org/pcre/code/trunk/pcre_jit_compile.c?r1=1676&r2=1680&view=patch
2017-07-04 19:21:28 -07:00
Derick Rethans e8b7698f5e Fixed parsing of strange formats with mixed month/day and time strings 2017-07-04 19:19:30 -07:00
Stanislav Malyshev 2aae60461c Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV 2017-07-04 19:06:42 -07:00
Nikita Popov f8c514ba6b Fixed bug #74111 2017-07-04 19:06:16 -07:00
Christoph M. Becker 8dc4f4dc9e Fix #74435: Buffer over-read into uninitialized memory
The stack allocated color map buffers were not zeroed before usage, and
so undefined palette indexes could cause information leakage.
2017-07-04 19:00:57 -07:00
Stanislav Malyshev 5f8380d33e Fix bug #74603 - use correct buffer size 2017-07-04 19:00:03 -07:00
Stanislav Malyshev 89637c6b41 Fix bug #74651 - check EVP_SealInit as it can return -1 2017-07-04 12:32:06 -07:00
Nikita Popov 8e0ddc89fe Drop duplicate dtors in update_opN
Per new convention update_opN should no longer dtor on failure.
2017-07-04 21:23:34 +02:00
Nikita Popov 3f8ceb6f05 Drop useless allocation in php_filter_callback 2017-07-04 21:11:22 +02:00
Nikita Popov 8126599670 Drop dead abstract method check from zend_call_function()
zend_is_callable() is responsible for doing these kinds of checks
already.

Aldro drop a piece of obsolete commented out code.
2017-07-04 21:11:22 +02:00
Remi Collet 1be0563087 Merge branch 'PHP-7.1'
* PHP-7.1:
  Adapt for 32-bits which fails at different offset (49 vs 38)
2017-07-04 20:27:10 +02:00
Remi Collet 1fa8e74d6e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Adapt for 32-bits which fails at different offset (49 vs 38)
2017-07-04 20:26:53 +02:00
Remi Collet 4b38feabe7 Adapt for 32-bits which fails at different offset (49 vs 38) 2017-07-04 20:25:59 +02:00
Anatol Belski bc5811f361 further sync for vim mode lines 2017-07-04 18:12:45 +02:00
Anatol Belski 6a3a2bf18e vim folds and mode lines yet 2017-07-04 17:06:52 +02:00
Anatol Belski a0203ea143 fix datatype 2017-07-04 16:41:29 +02:00
Anatol Belski 8bf7246310 Merge branch 'PHP-7.1'
* PHP-7.1:
  fix datatype
2017-07-04 16:41:05 +02:00
Anatol Belski 41ba98f02d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix datatype
2017-07-04 16:38:12 +02:00
Anatol Belski a29264eb8c fix datatype 2017-07-04 16:37:17 +02:00
Anatol Belski bae668ee2a add missing include guards 2017-07-04 16:21:45 +02:00
Anatol Belski a56700043e vim folds and modelines 2017-07-04 16:08:48 +02:00
Dmitry Stogov 0965a4ef9f Check for exceptional cases before actual constant evaluation. 2017-07-04 16:09:28 +03:00
Dmitry Stogov 6276268b77 Separate constants propagation code shatred between "first" and "block" passes into helper functions. 2017-07-04 15:10:33 +03:00
Anatol Belski 816669af0c Merge branch 'PHP-7.1'
* PHP-7.1:
  [ci skip] sync NEWS
2017-07-04 12:15:19 +02:00
Anatol Belski 396c0f7a76 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] sync NEWS
2017-07-04 12:14:50 +02:00
Anatol Belski 4903f044d3 [ci skip] sync NEWS 2017-07-04 12:12:51 +02:00
Remi Collet 1605f5b8c4 Update NEWS for 7.2.0beta1 2017-07-04 11:35:39 +02:00
Remi Collet 8fa1f15e2d Update NEWS for PHP 7.2.0alpha3 2017-07-04 11:35:39 +02:00
Anatol Belski cae6767f8d update NEWS 2017-07-04 11:31:35 +02:00
Anatol Belski ff79b2070f Merge branch 'PHP-7.1'
* PHP-7.1:
  update NEWS
  update NEWS
2017-07-04 11:31:09 +02:00
Anatol Belski 6f78923d1f update NEWS 2017-07-04 11:30:30 +02:00
Anatol Belski 04904333fd Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update NEWS
2017-07-04 11:29:54 +02:00
Anatol Belski ce64b82ebb update NEWS 2017-07-04 11:29:00 +02:00
Anatol Belski b28c6515a6 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74101 and bug #74614
2017-07-04 10:44:50 +02:00
Anatol Belski 2dc24005d9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74101 and bug #74614
2017-07-04 10:42:48 +02:00
Nikita Popov d02f953faf Fixed bug #74101 and bug #74614 2017-07-04 10:39:41 +02:00
Côme Chilliet 209c9ba384 Test ldap_exop_passwd with less parameters to be sure it works 2017-07-04 10:17:41 +02:00
Côme Chilliet 3207747b9e Changed API to avoid using passing result by reference
See discussion on internals ML
2017-07-04 10:03:27 +02:00
Dmitry Stogov 10dbc0b2e7 Compile/optimisation-time constants can't be circular, but in general may be reference-countable. It's better to use zval_ptr_dtor_nogc() to release them. 2017-07-04 10:43:34 +03:00
Dmitry Stogov b685991b44 Get rid of old compatibility macros 2017-07-04 09:50:57 +03:00
Dmitry Stogov bfa24e3488 Fixed bug #74836 (isset on zero-prefixed numeric indexes in array broken) 2017-07-04 07:23:46 +03:00
Dmitry Stogov 02ef5d3803 Revert "Avoid run-time checks performed at compile-time."
This reverts commit 8fe47a47cf.
2017-07-04 07:15:42 +03:00
Anatol Belski 726f2f7403 [ci skip] update NEWS 2017-07-03 23:21:38 +02:00
Anatol Belski 8871d2d12e Fixed bug #74849 Process is started as interactive shell in PhpStorm 2017-07-03 21:59:31 +02:00
Dmitry Stogov 55cd4e859b Added missed opcodes 2017-07-03 21:26:44 +03:00
Côme Chilliet 13062efd02 Removed unused variables left over by LDAP EXOP patch 2017-07-03 12:23:34 +02:00
Côme Chilliet e05d230e52 Removed TSRMLS_CC instances left over by LDAP EXOP patch 2017-07-03 12:08:24 +02:00
Côme Chilliet bda80aa332 Swapped position of retoid and retdata as retoid is almost never used 2017-07-03 10:58:13 +02:00
Côme Chilliet e9001cab46 Removed two step syntax for EXOP helpers, one call workflow is enough 2017-07-03 10:58:13 +02:00
Côme Chilliet 5020325a6f Improved ldap_exop test to encode&decode a passwd EXOP to test sending/recieving data 2017-07-03 10:58:13 +02:00
Côme Chilliet 413e9c84f6 Removed TODOs regarding implementing passwd and whoami exops based on ldap_exop 2017-07-03 10:58:13 +02:00
Côme Chilliet 9aa99cc34c Added constants for standard EXOPs 2017-07-03 10:58:13 +02:00
Côme Chilliet 4652c46245 Removed ldap_refresh function as I’m not sure how to fix/use/test it 2017-07-03 10:58:13 +02:00
Côme Chilliet e832ce4b22 Fixed ldap_exop and ldap_parse_exop. Only tested them for whoami exop. (see test file) 2017-07-03 10:58:13 +02:00
Côme Chilliet 28530b2f1c Fixed ldap_parse_exop_whoami and ldap_parse_exop_passwd and added test for them 2017-07-03 10:58:13 +02:00
Côme Chilliet fdafd68419 Fixed ldap_exop_whoami and added a test for it 2017-07-03 10:58:12 +02:00
Côme Chilliet ae76c8ba2c Fixed ldap_exop_passwd and added tests for it 2017-07-03 10:58:12 +02:00
Côme Chilliet def09c7cab Fixed building errors in LDAP EXOP 2017-07-03 10:58:12 +02:00
Côme Chilliet a0920f2822 Added EXOP features based on patch from http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/databases/php-ldap/files/ldap-ctrl-exop56.patch 2017-07-03 10:58:12 +02:00
Sara Golemon f066f59eab Add NEWS entry and a test for Bug#71412 2017-07-02 10:41:38 -04:00
Tyson Andre 96fe07e006 Fixes Bug #71412 Incorrect ArrayIterator __construct signature
ArrayIterator doesn't have a getIterator method(), or an iterator setter,
and I don't think it makes sense for it to have one.
2017-07-02 10:37:28 -04:00
Anatol Belski 04d7595e58 Merge branch 'PHP-7.1'
* PHP-7.1:
  yet one C++ compat fix
2017-07-01 20:07:05 +02:00
Anatol Belski 9d1575c495 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  yet one C++ compat fix
2017-07-01 20:06:39 +02:00
Anatol Belski d0b7eed0c9 yet one C++ compat fix 2017-07-01 20:05:11 +02:00
Anatol Belski 46ef3e237c Merge branch 'PHP-7.1'
* PHP-7.1:
  fix C++ compat
2017-07-01 18:39:02 +02:00
Anatol Belski 667185a264 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix C++ compat
2017-07-01 18:38:18 +02:00
Anatol Belski c71b773a62 fix C++ compat 2017-07-01 18:36:43 +02:00
Bob Weinand 2304bc2aa2 Merge branch 'PHP-7.1' 2017-07-01 11:53:00 +02:00
Bob Weinand af7bfc71fd Merge branch 'PHP-7.0' into PHP-7.1 2017-07-01 11:52:41 +02:00
Bob Weinand e3cc15daf2 Fixed bug #74840 (Opcache overwrites argument of GENERATOR_RETURN within finally) 2017-07-01 11:52:03 +02:00
Yasuo Ohgaki a2d766503a Fixed bug #74514 5 session functions incorrectly warn when calling in read-only/getter mode 2017-07-01 03:32:54 +09:00
Richard Fussenegger 66e5dc5b9b Fixed ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO macro
The macro was expanding to a wrong macro and thus leads to compile errors upon
usage. Changed it to expand to the correct macro.
2017-06-30 13:22:25 +02:00
Julien Pauli cf7ae70540 Merge branch 'PHP-7.1'
* PHP-7.1:
  Updated NEWS
  Updated NEWS
  Fix bug #74832, crash in extension loading
2017-06-29 20:25:18 +02:00
Julien Pauli 72f7143295 Updated NEWS 2017-06-29 20:24:34 +02:00
Julien Pauli e57fce4d00 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Updated NEWS
  Fix bug #74832, crash in extension loading
2017-06-29 20:24:03 +02:00
Julien Pauli 2a1ad88538 Updated NEWS 2017-06-29 20:23:37 +02:00
Julien Pauli 3f4340a796 Fix bug #74832, crash in extension loading 2017-06-29 20:22:21 +02:00
Adam Baratz 5ed83f7e84 Apply fix for #69356 to "Sent SQL" 2017-06-29 11:45:41 +02:00
Adam Baratz 3ac20e0995 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #69356
  Fixed #69356: PDOStatement::debugDumpParams() truncates query
2017-06-29 11:44:02 +02:00
Adam Baratz c8bb64c406 Fixed bug #69356 2017-06-29 11:43:12 +02:00
Adam Baratz f15790ec73 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #69356: PDOStatement::debugDumpParams() truncates query
2017-06-29 11:40:56 +02:00
Adam Baratz 08089f014c Fixed #69356: PDOStatement::debugDumpParams() truncates query 2017-06-29 11:39:50 +02:00
Dmitry Stogov 10dc924999 Use inlined version of zval_ptr_dytor() in var_destroy() loop 2017-06-29 12:16:52 +03:00
Dmitry Stogov 5a51da9942 Use inlined version of zval_ptr_dtor() in array_map() loop 2017-06-29 12:15:57 +03:00
Dmitry Stogov e111bccd48 Use zval_ptr_dtor_nogc() for data that can't be circular 2017-06-29 12:14:41 +03:00
Dmitry Stogov bbb786c85b Split zend_init_execute_data() into zend_init_func_execute_data() and zend_init_code_execute_data() 2017-06-29 10:10:57 +03:00
Dmitry Stogov c23ffaa211 We don't have to use "persistent" heap with PHP-7 HashTable(s). 2017-06-29 09:24:07 +03:00
Xinchen Hui d79305fb7a Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix typo in PHP 7.1.8 news
2017-06-29 11:51:05 +08:00
Tyson Andre a99c5f28c5 Fix typo in PHP 7.1.8 news 2017-06-28 15:46:58 -07:00
Anatol Belski b411d4acc3 [ci skip] update NEWS 2017-06-28 23:38:49 +02:00
Nikita Popov 4465b37105 Fix zend_get_zval_ptr() 2017-06-28 10:21:32 +02:00
George Wang 79128b34ff Merge branch 'PHP-7.1' 2017-06-27 23:18:27 -04:00
George Wang 4e4f2f9f89 Merge branch 'PHP-7.0' into PHP-7.1 2017-06-27 23:16:25 -04:00
George Wang 751d19f698 [BUGFIX] fixes the issue that a value from .user.ini displays in phpinfo(), but not applies.
[BUGFIX] when lsapi used the php_value has higher priority then ini_set when called from the script by itself .
2017-06-27 23:14:36 -04:00
Dmitry Stogov f626a783b6 Avoid string duplication in preg_split() 2017-06-28 00:43:55 +03:00
Anatol Belski e08c0ed8ce Bug #74815 crash with a combination of INI entries at startup
TS related VCWD routines depend on CWD. Thus, a premature CWD
deactivation renders the VCWD layer unusable. Same issue seems to
persist in versions < 7.2, just that the code path is actually unused so
the issue didn't show up. Still might make sense to backport this into
lower branches.
2017-06-27 16:30:10 +02:00
Dmitry Stogov c0be77aa75 Removed deprecated checks. 2017-06-27 13:12:09 +03:00
Dmitry Stogov 908ce66f73 Cleanup. Removed unused functions and unimplemented prototype. Avoid useless "dtor_obj" calls. 2017-06-27 12:03:06 +03:00
Remi Collet b6ee9dd490 upgrading: doc about ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX 2017-06-26 17:26:07 +02:00
Remi Collet 85c32322ac Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (24 commits)
  Removed EG(valid_symbol_table). Used EG(active) instead.
  Release temporary string reference
  Remove superfluous semicolons
  Fix tests on Windows
  Produce a better exception message when IntlDateFormatter constructor fails.
  Fix format arguments
  Remove unused variable op2. It is redeclared later.
  Fix typo
  Implement object type annotation
  Fixed bug #73173
  Expose inflate_get_status() and inflate_get_read_len() functions
  Add more constants, improve comments, and add tests
  Fixed bug #73900
  Add OPENSSL_DONT_ZERO_PAD_KEY constant to prevent key padding
  Drop soap_hash_str_find_deref()
  Only compute callback name in error cases
  Extract zend_get_callable_name() API
  Move va_copy compatibility code into zend_portability.h
  Remove unnecessary string copy
  Fix FE_FETCH_* exception check
  ...
2017-06-26 17:22:01 +02:00
Dmitry Stogov caaeb4849a Removed EG(valid_symbol_table). Used EG(active) instead. 2017-06-26 13:35:07 +03:00
Sara Golemon 24030d54d8 Release temporary string reference 2017-06-25 19:39:13 -04:00
Tom Van Looy 04fb3f28ff Remove superfluous semicolons 2017-06-26 00:23:25 +02:00
Nikita Popov b3849edf2c Fix tests on Windows 2017-06-26 00:22:14 +02:00
Sara Golemon ecaf408d30 Produce a better exception message when IntlDateFormatter constructor fails. 2017-06-25 17:44:59 -04:00
Nikita Popov e5741da85c Fix format arguments
Only dropped one before, both need to go...
2017-06-25 22:32:57 +02:00
Tom Van Looy 60d032d65e Remove unused variable op2. It is redeclared later. 2017-06-25 22:31:00 +02:00
Nikita Popov 9dfcb04f10 Fix typo 2017-06-25 22:28:56 +02:00
Michał Brzuchalski 8e10c9d373 Implement object type annotation
RFC: https://wiki.php.net/rfc/object-typehint
2017-06-25 21:49:41 +02:00
Nikita Popov dd15b34018 Merge branch 'PHP-7.1' 2017-06-25 20:17:34 +02:00
Nikita Popov e938cfc921 Merge branch 'PHP-7.0' into PHP-7.1 2017-06-25 20:17:26 +02:00
Nikita Popov 604827b694 Fixed bug #73173
Patch by tloi at fortinet dot com.
2017-06-25 20:17:06 +02:00
Bob Weinand a1755671e2 Merge branch 'PHP-7.1' 2017-06-25 20:15:31 +02:00
Bob Weinand 44d734254a Merge branch 'PHP-7.0' into PHP-7.1 2017-06-25 20:13:48 +02:00
Bob Weinand cfee5116dd Expose inflate_get_status() and inflate_get_read_len() functions 2017-06-25 20:12:45 +02:00
Matthew Trescott 0c4f11ecaa Add more constants, improve comments, and add tests 2017-06-25 20:12:45 +02:00
Nikita Popov 957c24d5ee Merge branch 'PHP-7.1' 2017-06-25 19:49:25 +02:00
Nikita Popov 653b96347c Merge branch 'PHP-7.0' into PHP-7.1 2017-06-25 19:49:11 +02:00
Nikita Popov 2fddc4a7f1 Fixed bug #73900 2017-06-25 19:48:17 +02:00
Jakub Zelenka e657f0d3f2 Merge branch 'PHP-7.1' 2017-06-25 18:11:10 +01:00
Jakub Zelenka 0c707fcb10 Add OPENSSL_DONT_ZERO_PAD_KEY constant to prevent key padding
It fixes bug #71917 (openssl_open() returns junk on envelope < 16 bytes)
and bug #72362 (OpenSSL Blowfish encryption is incorrect for short
keys).
2017-06-25 18:08:50 +01:00
Nikita Popov 1f924d75cb Drop soap_hash_str_find_deref()
And directly use zend_hash_str_find_deref() instead.
2017-06-25 18:51:59 +02:00
Nikita Popov 035a27cbc6 Only compute callback name in error cases
Mostly the callback name is only used to report an error. Try to
avoid calculating it if no error occurred.
2017-06-25 18:45:59 +02:00
Nikita Popov ee8e75aab4 Extract zend_get_callable_name() API
Instead of interleaving this inside zend_is_callable(), implement
this in a separate function instead.

Also add _deref() hash APIs. I've wanted these for a while, and
this is another place where they're useful, so finally do it...
2017-06-25 18:26:03 +02:00
Nikita Popov 205807f60e Move va_copy compatibility code into zend_portability.h
Previously this was defined in zend.c and php.h and also handled
in another way in soap.c.
2017-06-25 17:00:26 +02:00
Nikita Popov 6dd2eaf45c Remove unnecessary string copy 2017-06-25 16:52:50 +02:00
Nikita Popov c136afa2be Fix FE_FETCH_* exception check
Only applying this for 7.2, because handling this would be ugly
under the old retval freeing semantics.
2017-06-25 16:45:17 +02:00
Nikita Popov ed37ca7369 Fixed bug #74810
And also did some general cleanup in ZEND_FUNC_GET_ARGS.
2017-06-25 16:00:24 +02:00
Nikita Popov 191f154d40 Merge branch 'PHP-7.1' 2017-06-25 15:32:38 +02:00
Nikita Popov bda0f4e8dc Merge branch 'PHP-7.0' into PHP-7.1 2017-06-25 15:30:29 +02:00
Nikita Popov de66e80d75 Don't leave holes in func_get_args() and backtraces
Argument lists should always be continuous and hole-free, even if
local variables are unset. Replace UNDEF values with NULLs.
2017-06-25 15:27:45 +02:00
Bob Weinand fda0a8b735 Fixed bug #73944 (inflate_init() dictionary option) - add NEWS entry 2017-06-25 10:57:36 +02:00
wapmorgan cd1869bcf2 Remove invalid check of dictionary content and add initialization of dictionary if raw compression used 2017-06-25 10:53:28 +02:00
Remi Collet 4ed8ff5090 not about zend_arg_info.class_name 2017-06-25 08:41:11 +02:00
Stanislav Malyshev 3eecee16d1 Update NEWS 2017-06-24 23:32:59 -07:00
Remi Collet b3b8627106 note about IS_TYPE_IMMUTABLE 2017-06-25 08:32:03 +02:00
Remi Collet 59c30c01b3 note about php_pcre_replace* 2017-06-25 08:27:52 +02:00
Remi Collet 754e1c463d ZEND_ACC_CLONE is removed 2017-06-25 08:23:30 +02:00
Remi Collet 8e98a44eb2 fix version 2017-06-25 08:22:29 +02:00
Anatol Belski 31e4afe3c3 [ci skip] update NEWS 2017-06-24 01:37:45 +02:00
Anatol Belski cf1f9a20fd Merge branch 'PHP-7.1'
* PHP-7.1:
  [ci skip] update NEWS
2017-06-24 01:29:51 +02:00
Anatol Belski 4e98990f6b [ci skip] update NEWS 2017-06-24 01:28:58 +02:00
Anatol Belski eb68301df1 Relax test condition, as OpenSSL 1.1.x out differs in EOL only 2017-06-24 00:25:51 +02:00
Anatol Belski d7b9eb981a Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix bug #74798 pkcs7_en/decrypt does not work if \x0a is used in content
2017-06-24 00:24:56 +02:00
Anatol Belski b714309056 Fix bug #74798 pkcs7_en/decrypt does not work if \x0a is used in content
The patch for bug #74720 was incomplete.
2017-06-24 00:18:57 +02:00
Nikita Popov 272a9f29f5 Merge branch 'PHP-7.1' 2017-06-23 17:33:36 +02:00
Nikita Popov 5b5a92b8b6 Fixed bug #74623 2017-06-23 17:32:45 +02:00
Nikita Popov 4948da178a Make inference robust against infinite loop
Right now, if narrowing occurs on non-debug builds, inference can
easily go into an infinite loop. Prevent this, and add a pointer
that this should be reported as a bug.
2017-06-23 17:07:44 +02:00
Dmitry Stogov d55b43d9cb Merge branch 'fast_shutdown'
* fast_shutdown:
  Reseet EG(active) a bit early.
  Reuse "nIndex"
  shutdown_executor() refactoring (reuse opcache fast request shutdown code)
2017-06-23 14:59:29 +03:00
Dmitry Stogov 866d3b40e9 Reseet EG(active) a bit early. 2017-06-23 14:58:19 +03:00
Nikita Popov 748069e3a0 Merge branch 'PHP-7.1' 2017-06-23 13:32:51 +02:00
Nikita Popov 721de5b542 Merge branch 'PHP-7.0' into PHP-7.1 2017-06-23 13:31:39 +02:00
ideal 4d6100569b Fix error if compiled without -fpermissive flag. 2017-06-23 13:31:23 +02:00
Dmitry Stogov 40ed9aaa48 Reuse "nIndex" 2017-06-23 14:23:00 +03:00
Joe Watkins a79ec404b2 Merge branch 'PHP-7.1'
* PHP-7.1:
  fix method "eof"
2017-06-23 07:53:24 +01:00
Joe Watkins bd8940a1fe Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix method "eof"
2017-06-23 07:53:12 +01:00
danchukas b255b97e43 fix method "eof"
replace "eof" with  "feof"
because:
1) http://php.net/manual/ru/function.feof.php
2) Error: Call to undefined function eof()
2017-06-23 07:53:00 +01:00
Joe Watkins 5796fff344 Merge branch 'PHP-7.1'
* PHP-7.1:
  Remove superfluous branch
2017-06-23 07:51:59 +01:00
Joe Watkins b903733762 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Remove superfluous branch
2017-06-23 07:51:46 +01:00
Thomas Punt b1301a0686 Remove superfluous branch 2017-06-23 07:51:32 +01:00
Marat Nagayev 99b611958f fix news 2017-06-22 22:41:53 +01:00
Jakub Zelenka bf8717594c Update NEWS with info about openssl pkcs7 read and verify changes 2017-06-22 20:39:09 +01:00
Jelle van der Waa 787a18a50a Add openssl_pkcs7_read and output P7B in openssl_pkcs7_verify
Add an optional argument to openssl_pkcs7_verify to save the P7B
structure which can contain extra CA intermediate certificates send
along with an S/MIME signed email.

Introduce a new function called openssl_pkcs7_read, which can read a
PKCS#7 structure passed as a string and returns by reference an array
with PEM certificates formatted as a string.
2017-06-22 20:36:23 +01:00
Sara Golemon d09edf7b34 Minor refactor of load extension by name impl
Minimize the #ifdef surface area
Localize orig_libpath to retry scope
Send errors to php_error() rathern than stderr
2017-06-22 13:13:45 -04:00
Francois Laupretre fe5c8f2b80 Allow loading PHP and Zend extensions by name
Allow extension name as INI 'extension=' and dl() argument
No BC break, as file name is still accepted.
When using the '-z' command line option (CLI/CGI), an absolute file name must still be provided (nothing changed here)
Change comments in example INI files
2017-06-22 12:58:15 -04:00
Joe Watkins 0f15a03026 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix configure error
2017-06-22 14:02:09 +01:00
Joe Watkins 21cbdf6984 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix configure error
2017-06-22 14:01:45 +01:00
Peter Kokot 660250f4da Fix configure error
This patch fixes configure error on some systems such as Alpine.

```
 line 3472: test: =: unary operator expected
```

One of the fixes has been suggested also here already:
https://bugs.php.net/bug.php?id=39835

Thank you for considering merging this.
2017-06-22 14:01:18 +01:00
Michael Moussa 9437dcd621 Add test for bug #52480 2017-06-22 13:56:03 +01:00
Joe Watkins 2030b59829 Merge branch 'PHP-7.1'
* PHP-7.1:
  fix bug #73471 PHP freezes with AppendIterator
2017-06-22 11:58:04 +01:00
Joe Watkins c56378b0d5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix bug #73471 PHP freezes with AppendIterator
2017-06-22 11:57:39 +01:00
jhdxr 81c2a4b9ba fix bug #73471 PHP freezes with AppendIterator 2017-06-22 11:56:49 +01:00
Joe Watkins 36d064be12 fix news 2017-06-22 11:54:10 +01:00
Joe Watkins 7945dca6ec Merge branch 'PHP-7.1'
* PHP-7.1:
  fix bug #74780 parse_url() borken when query string contains colon
  Update NEWS
2017-06-22 11:53:27 +01:00
Joe Watkins ed1f64e083 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix bug #74780 parse_url() borken when query string contains colon
2017-06-22 11:52:39 +01:00
jhdxr db287b2303 fix bug #74780 parse_url() borken when query string contains colon 2017-06-22 11:52:06 +01:00
Niklas Keller 3250fa09b2 Fix name in NEWS
It's enough to name my php.net account there.
2017-06-22 11:48:43 +01:00
Dmitry Stogov f25ecdacf8 shutdown_executor() refactoring (reuse opcache fast request shutdown code) 2017-06-22 01:45:28 +03:00
Dmitry Stogov 9fb0e6ffe2 Fixed SKIP code 2017-06-22 01:41:59 +03:00
Dmitry Stogov c7a75b7112 Fixed few test failures if php.ini contains zend.assertions=-1 2017-06-21 18:50:08 +03:00
Dmitry Stogov 06e41cadd9 We don't need any special handling for CG(unclean_shutdown) at this point, because in case of exit() or die() all destructors must be already called before. 2017-06-21 16:11:50 +03:00
Dmitry Stogov 9b201aec07 Setting CG(unclean_shutdown) in fast shutdown doesn't make a lot of sense (it was set to prevent memory leak messages, but we doesn't check memory leaks in RELEASE build anyway). 2017-06-21 16:09:21 +03:00
Dmitry Stogov 7af5741333 Avoid useless duplication 2017-06-21 12:57:24 +03:00
Dmitry Stogov c61cea7135 Use persistent heap only for persistent connections. 2017-06-21 11:25:30 +03:00
Dmitry Stogov 687123ebf2 Use request heap. 2017-06-21 11:25:05 +03:00
Dmitry Stogov c16f954ff1 Clear alocated memory blocks, only if this is really necessary. 2017-06-21 10:37:54 +03:00
Christopher Jones 1dfb63feca Update NEWS 2017-06-21 16:17:54 +10:00
Christopher Jones c288ed44a2 Update NEWS 2017-06-21 16:16:20 +10:00
Christopher Jones 5465fbdc48 Merge branch 'PHP-7.1'
* PHP-7.1:
  Add bug #74625 to package.xml
  Add IN bind case to bug74625.phpt
  Fixed bug #74625 (Integer overflow in oci_bind_array_by_name).
2017-06-21 15:56:09 +10:00
Christopher Jones 5d666d2a02 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add bug #74625 to package.xml
  Add IN bind case to bug74625.phpt
  Fixed bug #74625 (Integer overflow in oci_bind_array_by_name).
2017-06-21 15:55:54 +10:00
Christopher Jones b3bd379198 Merge branch 'pull-request/2532' into PHP-7.0
* pull-request/2532:
  Add bug #74625 to package.xml
  Add IN bind case to bug74625.phpt
  Fixed bug #74625 (Integer overflow in oci_bind_array_by_name).
2017-06-21 15:55:28 +10:00
Christopher Jones cda87977a5 Add bug #74625 to package.xml 2017-06-21 15:50:51 +10:00
Christopher Jones b4c5f20c46 Add IN bind case to bug74625.phpt 2017-06-21 15:47:32 +10:00
Ingmar Runge fa3615f14e Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). 2017-06-21 15:44:55 +10:00
Christopher Jones d561aa7cb1 Merge branch 'PHP-7.1' 2017-06-21 15:04:34 +10:00
Christopher Jones 13347e8a7d Merge branch 'PHP-7.0' into PHP-7.1 2017-06-21 15:04:03 +10:00
Christopher Jones 3fbbcf7f93 Remove use of obsolete create_function() 2017-06-21 15:02:58 +10:00
Christopher Jones 78e5811c1a Merge branch 'PHP-7.1' 2017-06-21 14:32:00 +10:00
Christopher Jones d9feb3c2d0 Merge branch 'PHP-7.0' into PHP-7.1 2017-06-21 14:29:43 +10:00
Christopher Jones 1bdc290017 Update OCI8 version test and package.xml 2017-06-21 14:29:30 +10:00
Stanislav Malyshev 18b6de7a91 Fix bug #73634 - grapheme_strpos illegal memory access 2017-06-20 13:29:57 -07:00
Stanislav Malyshev 14c422a32f Fix bug #73648 - integer overflow in substr 2017-06-20 13:29:48 -07:00
Dmitry Stogov 7802cf8c1a Added specialized FE_FETCH_R handler for iteration over array 2017-06-20 23:25:09 +03:00
Dmitry Stogov 31a2198fd9 FE_RESER/FE_FETCH optimisation 2017-06-20 22:26:46 +03:00
Joe Watkins 78bec63ad9 bump versions 2017-06-20 17:34:00 +01:00
Sara Golemon c18ba686cd Update NEWS for 7.2.0alpha3 2017-06-20 10:11:41 -04:00
Sara Golemon 3bf3227e16 Update NEWS for PHP 7.2.0alpha2 2017-06-20 10:11:41 -04:00
Anatol Belski 3fc1993cfc Merge branch 'PHP-7.1'
* PHP-7.1:
  Split requested size as expected by CreateFileMapping.
2017-06-20 15:45:34 +02:00
Anatol Belski 67f063e3ac Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Split requested size as expected by CreateFileMapping.
2017-06-20 15:45:05 +02:00
Anatol Belski 6a854e2740 Split requested size as expected by CreateFileMapping.
Thus fixing ext\opcache\tests\log_verbosity_bug.phpt fails on 64-bit.
2017-06-20 15:40:25 +02:00
Nikita Popov 0f8cf3b849 Fix bug #73807 2017-06-20 00:23:44 -07:00
722 changed files with 48719 additions and 28231 deletions

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ environment:
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
PHP_BUILD_OBJ_DIR: c:\obj
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.5
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.9
PHP_BUILD_CRT: vc15
# ext and env setup for tests
#MYSQL_TEST_PASSWD: Password12!
+5
View File
@@ -229,3 +229,8 @@ win32/wsyslog.h
**/tests/**/*.db
**/tests/**/*.txt
**/tests/**/*.tmp
# special cases to invert previous ignore rules
!ext/fileinfo/libmagic.patch
!ext/mbstring/oniguruma.patch
+4 -4
View File
@@ -93,12 +93,12 @@ User Functions/Methods Naming Conventions
readability of the function name itself::
Good:
'mcrypt_enc_self_test'
'mysql_list_fields'
'str_word_count'
'array_key_exists'
Ok:
'mcrypt_module_get_algo_supported_key_sizes'
(could be 'mcrypt_mod_get_algo_sup_key_sizes'?)
'date_interval_create_from_date_string'
(could be 'date_intvl_create_from_date_str'?)
'get_html_translation_table'
(could be 'html_get_trans_table'?)
+7 -1
View File
@@ -269,7 +269,7 @@ STATUS: Working
SINCE: 5.3
-------------------------------------------------------------------------------
EXTENSION: exif
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>
PRIMARY MAINTAINER: Kalle Sommer Nielsen <kalle@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.2
@@ -419,6 +419,12 @@ MAINTENANCE: Maintained
STATUS: Working
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: sodium
PRIMARY MAINTAINER: Frank Denis <jedisct1@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 7.2.0
-------------------------------------------------------------------------------
EXTENSION: spl
PRIMARY MAINTAINER: Marcus Boerger <helly@php.net>, Etienne Kneuss <colder@php.net>
MAINTENANCE: Maintained
+246 -8
View File
@@ -1,9 +1,246 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 7.2.0alpha2
17 Aug 2017, PHP 7.2.0beta3
- Core:
. Change PHP_OS_FAMILY value from "OSX" to "Darwin". (sb, kalle)
. Fixed bug #75063 (Main CWD initialized with wrong codepage). (Anatol)
- Date:
. Fixed bug #75002 (Null Pointer Dereference in timelib_time_clone). (Derick)
- FTP:
. Added ftp_append() function. (blar)
- Mbstring:
. Fixed bug #75001 (Wrong reflection on mb_eregi_replace). (Fabien
Villepinte)
- SQLite3:
. Updated to SQLite 3.20.0. (cmb)
- SPL:
. Fixed bug #75049 (spl_autoload_unregister can't handle
spl_autoload_functions results). (Laruence)
. Added spl_object_id(). (Tyson Andre)
- Standard:
. Fixed bug #75075 (unpack with X* causes infinity loop). (Laruence)
. Fixed bug #74103 (heap-use-after-free when unserializing invalid array
size). (Nikita)
. Fixed bug #75054 (A Denial of Service Vulnerability was found when
performing deserialization). (Nikita)
- WDDX:
. Fixed bug #73793 (WDDX uses wrong decimal seperator). (cmb)
- XMLRPC:
. Fixed bug #74975 (Incorrect xmlrpc serialization for classes with declared
properties). (blar)
03 Aug 2017, PHP 7.2.0beta2
- Core:
. Implemented FR #74963 (Improved error message on fetching property of
non-object). (Laruence)
. Fixed bug #74947 (Segfault in scanner on INF number). (Laruence)
. Fixed bug #74954 (null deref and segfault in zend_generator_resume()). (Bob)
- CLI:
. Fixed bug #74979 (Interactive shell opening instead of script execution
with -f flag). (Anatol)
- cURL:
. Fixed bug #74125 (Fixed finding CURL on systems with multiarch support).
(cebe)
- Intl:
. Fixed bug #74993 (Wrong reflection on some locale_* functions). (Sara)
- Mbstring:
. Fixed bug #69267 (mb_strtolower fails on titlecase characters). (Nikita)
. Fixed bug #71606 (Segmentation fault mb_strcut with HTML-ENTITIES encoding).
(cmb)
. Fixed bug #62934 (mb_convert_kana() does not convert iteration marks).
(Nikita)
- MySQLi:
. Fixed bug #74968 (PHP crashes when calling mysqli_result::fetch_object with
an abstract class). (Anatol)
- OCI8:
. Expose oci_unregister_taf_callback() (Tianfang Yang)
- Opcache:
. Fixed bug #74980 (Narrowing occurred during type inference). (Laruence)
- OpenSSL:
. Fixed bug #74903 (openssl_pkcs7_encrypt() uses different EOL than before).
(Anatol)
- phar:
. Fixed bug #74991 (include_path has a 4096 char limit in some cases).
(bwbroersma)
- Reflection:
. Fixed bug #74949 (null pointer dereference in _function_string). (Laruence)
- Session:
. Fixed bug #74892 (Url Rewriting (trans_sid) not working on urls that start
with "#"). (Andrew Nester)
. Fixed bug #74936 (session_cache_expire/cache_limiter/save_path() trigger a
warning in read mode). (morozov)
. Fixed bug #74941 (session fails to start after having headers sent).
(morozov)
. Fixed bug #74833 (SID constant created with wrong module number). (Anatol)
- SimpleXML:
. Fixed bug #74950 (nullpointer deref in simplexml_element_getDocNamespaces).
(Laruence)
- SPL:
. Fixed bug #74669 (Unserialize ArrayIterator broken). (Andrew Nester)
. Fixed bug #74977 (Appending AppendIterator leads to segfault).
(Andrew Nester)
. Fixed bug #75015 (Crash in recursive iterator destructors). (Julien)
- Standard:
. Fixed bug #74851 (uniqid() without more_entropy performs badly).
(Emmanuel Dreyfus)
20 Jul 2017, PHP 7.2.0beta1
- Core:
. Added new VM instuctions ISSET_ISEMPTY_CV and UNSET_CV. Previously they
were implemented as ISSET_ISEMPTY_VAR and UNSET_VAR variants with
ZEND_QUICK_SET flag. (Nikita, Dmitry)
. Fixed bug #74603 (PHP INI Parsing Stack Buffer Overflow Vulnerability).
(Stas)
. Fixed bug #74111 (Heap buffer overread (READ: 1) finish_nested_data from
unserialize). (Nikita)
. Fixed bug #74819 (wddx_deserialize() heap out-of-bound read via
php_parse_date()). (Derick)
. Fixed bug #49649 (unserialize() doesn't handle changes in property
visibility). (pmmaga)
. Fixed #74866 (extension_dir = "./ext" now use current directory for base).
(Francois Laupretre)
. Fixed bug #74923 (Crash when crawling through network share). (Anatol)
. Fixed bug #74913 (fixed incorrect poll.h include). (petk)
. Fixed bug #74906 (fixed incorrect errno.h include). (petk)
- Date:
. Fixed bug #74852 (property_exists returns true on unknown DateInterval
property). (jhdxr)
- DOM:
. Implement #74837 (Implement Countable for DomNodeList and DOMNamedNodeMap).
(Andreas Treichel)
- EXIF:
. Implemented #65187 (exif_read_data/thumbnail: add support for stream
resource). (Kalle)
. Deprecated the read_exif_data() alias. (Kalle)
. Fixed bug #74428 (exif_read_data(): "Illegal IFD size" warning occurs with
correct exif format). (bradpiccho at gmail dot com, Kalle)
. Fixed bug #72819 (EXIF thumbnails not read anymore). (Kalle)
. Fixed bug #62523 (php crashes with segfault when exif_read_data called).
(Kalle)
. Fixed bug #50660 (exif_read_data(): Illegal IFD offset (works fine with
other exif readers). (skinny dot bravo at gmail dot com, Kalle)
- GD:
. Fixed bug #74435 (Buffer over-read into uninitialized memory). (cmb)
- IMAP:
. Fixed bug #72324 (imap_mailboxmsginfo() return wrong size).
(ronaldpoon at udomain dot com dot hk, Kalle)
- JSON:
. Add JSON_INVALID_UTF8_IGNORE and JSON_INVALID_UTF8_SUBSTITUTE options for
json_encode and json_decode to ignore or replace invalid UTF-8 byte
sequences - it addresses request #65082. (Jakub Zelenka)
- LDAP:
. Fixed passing an empty array to ldap_set_option for client or server controls.
- Opcache:
. Added global optimisation passes based on data flow analysis using Single
Static Assignment (SSA) form: Sparse Conditional Constant Propagation (SCCP),
Dead Code Elimination (DCE), and removal of unused local variables
(Nikita, Dmitry)
- OpenSSL:
. Add ssl security_level stream option to support OpenSSL security levels.
(Jakub Zelenka).
. Allow setting SNI cert and private key in separate files. (Jakub Zelenka)
. Fixed bug #74651 (negative-size-param (-1) in memcpy in zif_openssl_seal()).
(Stas)
- PCRE:
. Fixed bug #74873 (Minor BC break: PCRE_JIT changes output of preg_match()).
(Dmitry)
- Sodium:
. New cryptographic extension
- SQLite3:
. Fixed bug #74883 (SQLite3::__construct() produces "out of memory" exception
with invalid flags). (Anatol)
- ZIP:
. ZipArchive implements countable, added ZipArchive::count() method. (Remi)
. Fix segfault in php_stream_context_get_option call. (Remi)
06 Jul 2017, PHP 7.2.0alpha3
- Core:
. Fixed bug #74780 (parse_url() broken when query string contains colon).
(jhdxr)
. Fixed bug #74761 (Unary operator expected error on some systems). (petk)
. Allow loading PHP/Zend extensions by name in ini files (extension=<name>).
(francois at tekwire dot net)
. Added object type annotation. (brzuchal)
. Fixed bug #74815 (crash with a combination of INI entries at startup).
(Anatol)
. Fixed bug #74836 (isset on zero-prefixed numeric indexes in array broken).
(Dmitry)
. Fixed bug #74101, bug #74614 (Unserialize Heap Use-After-Free (READ: 1) in
zval_get_type). (Nikita)
- CLI:
. Fixed bug #74849 (Process is started as interactive shell in PhpStorm).
(Anatol)
- LDAP:
. Implemented FR #69445 (Support for LDAP EXOP operations)
. Fixed support for LDAP_OPT_SERVER_CONTROLS and LDAP_OPT_CLIENT_CONTROLS in ldap_get_option
- OpenSSL:
. Fixed bug #74798 (pkcs7_en/decrypt does not work if \x0a is used in content).
(Anatol)
- SPL:
. Fixed bug #73471 (PHP freezes with AppendIterator). (jhdxr)
. Fixed bug #71412 (Incorrect arginfo for ArrayIterator::__construct).
(tysonandre775 at hotmail dot com)
- Session:
. Fixed bug #74514 (5 session functions incorrectly warn when calling in
read-only/getter mode). (Yasuo)
- Standard:
. Add support for extension name as argument to dl().
(francois at tekwire dot net)
- zlib:
. Fixed bug #73944 (dictionary option of inflate_init() does not work).
(wapmorgan)
. Expose inflate_get_status() and inflate_get_read_len() functions.
(Matthew Trescott)
22 Jun 2017, PHP 7.2.0alpha2
- Core:
. Change PHP_OS_FAMILY value from "OSX" to "Darwin". (Sebastian, Kalle)
- GD:
. Fixed bug #74744 (gd.h: stdarg.h include missing for va_list use in
@@ -11,19 +248,19 @@ PHP NEWS
- OCI8:
. Add TAF callback (PR #2459). (KoenigsKind)
. Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). (Ingmar Runge)
- OpenSSL:
. Fixed bug #74720 (pkcs7_en/decrypt does not work if \x1a is used in
content). (Anatol)
. Use TLS_ANY for default ssl:// and tls:// negotiation.
(Niklas Keller, me at kelunik dot com)
. Use TLS_ANY for default ssl:// and tls:// negotiation. (kelunik)
. Fix leak in openssl_spki_new(). (jelle at vdwaa dot nl)
. Added openssl_pkcs7_read() and pk7 parameter to openssl_pkcs7_verify().
(jelle at vdwaa dot nl)
- PDO_OCI:
. Fixed Bug #74537 (Align --with-pdo-oci configure option with --with-oci8 syntax).
(Tianfang Yang)
. Support Instant Client 12.2 in --with-pdo-oci configure option.
(Tianfang Yang)
- Standard:
. Compatibility with libargon2 versions 20161029 and 20160821.
@@ -32,8 +269,7 @@ PHP NEWS
(mhagstrand at gmail dot com)
- Streams:
. Default ssl/single_dh_use and ssl/honor_cipher_order to true.
(me at kelunik dot com)
. Default ssl/single_dh_use and ssl/honor_cipher_order to true. (kelunik)
- SQLite3:
. Update to Sqlite 3.19.3. (cmb)
@@ -162,6 +398,8 @@ PHP NEWS
. Fixed bug #73961 (environmental build dependency in hash sha3 source).
(krakjoe)
. Changed HashContext from resource to object. (Rouven Weßling, Sara)
. Disallowed usage of non-cryptographic hash functions with HMAC and PBKDF2.
(Andrey Andreev, Nikita)
- intl:
. Fixed bug #74433 (wrong reflection for Normalizer methods). (villfa)
+2 -2
View File
@@ -130,8 +130,8 @@ highlight the major important things (security fixes) and when it is important
to upgrade.
a. Call php bin/createNewsEntry in your local phpweb checkout
Use category "releases" for all non-stable releases.
Use category "frontpage" for X.Y.0 non-stable releases only.
Use category "releases" for all stable releases.
Use category "frontpage" for X.Y.0 non-stable releases only (news only).
b. Add the content for the news entry. Be sure to include the text:
"THIS IS A DEVELOPMENT PREVIEW - DO NOT USE IT IN PRODUCTION!"
+57 -48
View File
@@ -125,7 +125,7 @@ TSRM_TLS uint8_t in_main_thread = 0;
/* Startup TSRM (call once for the entire process) */
TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_level, char *debug_filename)
{
{/*{{{*/
#if defined(GNUPTH)
pth_init();
#elif defined(PTHREADS)
@@ -166,12 +166,12 @@ TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debu
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Started up TSRM, %d expected threads, %d expected resources", expected_threads, expected_resources));
return 1;
}
}/*}}}*/
/* Shutdown TSRM (call once for the entire process) */
TSRM_API void tsrm_shutdown(void)
{
{/*{{{*/
int i;
if (!in_main_thread) {
@@ -227,12 +227,12 @@ TSRM_API void tsrm_shutdown(void)
tsrm_new_thread_begin_handler = NULL;
tsrm_new_thread_end_handler = NULL;
tsrm_shutdown_handler = NULL;
}
}/*}}}*/
/* allocates a new thread-safe-resource id */
TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor)
{
{/*{{{*/
int i;
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Obtaining a new resource id, %d bytes", size));
@@ -283,11 +283,11 @@ TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Successfully allocated new resource id %d", *rsrc_id));
return *rsrc_id;
}
}/*}}}*/
static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_T thread_id)
{
{/*{{{*/
int i;
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Creating data structures for thread %x", thread_id));
@@ -323,12 +323,12 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
}
tsrm_mutex_unlock(tsmm_mutex);
}
}/*}}}*/
/* fetches the requested resource for the current thread */
TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
{
{/*{{{*/
THREAD_T thread_id;
int hash_value;
tsrm_tls_entry *thread_resources;
@@ -386,12 +386,12 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
* changes to the structure as we read it.
*/
TSRM_SAFE_RETURN_RSRC(thread_resources->storage, id, thread_resources->count);
}
}/*}}}*/
/* frees an interpreter context. You are responsible for making sure that
* it is not linked into the TSRM hash, and not marked as the current interpreter */
void tsrm_free_interpreter_context(void *context)
{
{/*{{{*/
tsrm_tls_entry *next, *thread_resources = (tsrm_tls_entry*)context;
int i;
@@ -410,10 +410,10 @@ void tsrm_free_interpreter_context(void *context)
free(thread_resources);
thread_resources = next;
}
}
}/*}}}*/
void *tsrm_set_interpreter_context(void *new_ctx)
{
{/*{{{*/
tsrm_tls_entry *current;
current = tsrm_tls_get();
@@ -426,12 +426,12 @@ void *tsrm_set_interpreter_context(void *new_ctx)
/* return old context, so caller can restore it when they're done */
return current;
}
}/*}}}*/
/* allocates a new interpreter context */
void *tsrm_new_interpreter_context(void)
{
{/*{{{*/
tsrm_tls_entry *new_ctx, *current;
THREAD_T thread_id;
@@ -445,12 +445,12 @@ void *tsrm_new_interpreter_context(void)
/* switch back to the context that was in use prior to our creation
* of the new one */
return tsrm_set_interpreter_context(current);
}
}/*}}}*/
/* frees all resources allocated for the current thread */
void ts_free_thread(void)
{
{/*{{{*/
tsrm_tls_entry *thread_resources;
int i;
THREAD_T thread_id = tsrm_thread_id();
@@ -487,12 +487,12 @@ void ts_free_thread(void)
thread_resources = thread_resources->next;
}
tsrm_mutex_unlock(tsmm_mutex);
}
}/*}}}*/
/* frees all resources allocated for all threads except current */
void ts_free_worker_threads(void)
{
{/*{{{*/
tsrm_tls_entry *thread_resources;
int i;
THREAD_T thread_id = tsrm_thread_id();
@@ -533,12 +533,12 @@ void ts_free_worker_threads(void)
}
}
tsrm_mutex_unlock(tsmm_mutex);
}
}/*}}}*/
/* deallocates all occurrences of a given id */
void ts_free_id(ts_rsrc_id id)
{
{/*{{{*/
int i;
int j = TSRM_UNSHUFFLE_RSRC_ID(id);
@@ -567,7 +567,7 @@ void ts_free_id(ts_rsrc_id id)
tsrm_mutex_unlock(tsmm_mutex);
TSRM_ERROR((TSRM_ERROR_LEVEL_CORE, "Successfully freed resource id %d", id));
}
}/*}}}*/
@@ -578,7 +578,7 @@ void ts_free_id(ts_rsrc_id id)
/* Obtain the current thread id */
TSRM_API THREAD_T tsrm_thread_id(void)
{
{/*{{{*/
#ifdef TSRM_WIN32
return GetCurrentThreadId();
#elif defined(GNUPTH)
@@ -594,12 +594,12 @@ TSRM_API THREAD_T tsrm_thread_id(void)
#elif defined(BETHREADS)
return find_thread(NULL);
#endif
}
}/*}}}*/
/* Allocate a mutex */
TSRM_API MUTEX_T tsrm_mutex_alloc(void)
{
{/*{{{*/
MUTEX_T mutexp;
#ifdef TSRM_WIN32
mutexp = malloc(sizeof(CRITICAL_SECTION));
@@ -625,12 +625,12 @@ TSRM_API MUTEX_T tsrm_mutex_alloc(void)
printf("Mutex created thread: %d\n",mythreadid());
#endif
return( mutexp );
}
}/*}}}*/
/* Free a mutex */
TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
{
{/*{{{*/
if (mutexp) {
#ifdef TSRM_WIN32
DeleteCriticalSection(mutexp);
@@ -654,7 +654,7 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
#ifdef THR_DEBUG
printf("Mutex freed thread: %d\n",mythreadid());
#endif
}
}/*}}}*/
/*
@@ -662,7 +662,7 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
A return value of 0 indicates success
*/
TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
{
{/*{{{*/
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Mutex locked thread: %ld", tsrm_thread_id()));
#ifdef TSRM_WIN32
EnterCriticalSection(mutexp);
@@ -686,7 +686,7 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
return acquire_sem(mutexp->sem);
return 0;
#endif
}
}/*}}}*/
/*
@@ -694,7 +694,7 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
A return value of 0 indicates success
*/
TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
{
{/*{{{*/
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Mutex unlocked thread: %ld", tsrm_thread_id()));
#ifdef TSRM_WIN32
LeaveCriticalSection(mutexp);
@@ -718,14 +718,14 @@ TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
return release_sem(mutexp->sem);
return 0;
#endif
}
}/*}}}*/
/*
Changes the signal mask of the calling thread
*/
#ifdef HAVE_SIGPROCMASK
TSRM_API int tsrm_sigmask(int how, const sigset_t *set, sigset_t *oldset)
{
{/*{{{*/
TSRM_ERROR((TSRM_ERROR_LEVEL_INFO, "Changed sigmask in thread: %ld", tsrm_thread_id()));
/* TODO: add support for other APIs */
#ifdef PTHREADS
@@ -733,35 +733,35 @@ TSRM_API int tsrm_sigmask(int how, const sigset_t *set, sigset_t *oldset)
#else
return sigprocmask(how, set, oldset);
#endif
}
}/*}}}*/
#endif
TSRM_API void *tsrm_set_new_thread_begin_handler(tsrm_thread_begin_func_t new_thread_begin_handler)
{
{/*{{{*/
void *retval = (void *) tsrm_new_thread_begin_handler;
tsrm_new_thread_begin_handler = new_thread_begin_handler;
return retval;
}
}/*}}}*/
TSRM_API void *tsrm_set_new_thread_end_handler(tsrm_thread_end_func_t new_thread_end_handler)
{
{/*{{{*/
void *retval = (void *) tsrm_new_thread_end_handler;
tsrm_new_thread_end_handler = new_thread_end_handler;
return retval;
}
}/*}}}*/
TSRM_API void *tsrm_set_shutdown_handler(tsrm_shutdown_func_t shutdown_handler)
{
{/*{{{*/
void *retval = (void *) tsrm_shutdown_handler;
tsrm_shutdown_handler = shutdown_handler;
return retval;
}
}/*}}}*/
/*
@@ -770,7 +770,7 @@ TSRM_API void *tsrm_set_shutdown_handler(tsrm_shutdown_func_t shutdown_handler)
#if TSRM_DEBUG
int tsrm_error(int level, const char *format, ...)
{
{/*{{{*/
if (level<=tsrm_error_level) {
va_list args;
int size;
@@ -785,12 +785,12 @@ int tsrm_error(int level, const char *format, ...)
} else {
return 0;
}
}
}/*}}}*/
#endif
void tsrm_error_set(int level, char *debug_filename)
{
{/*{{{*/
tsrm_error_level = level;
#if TSRM_DEBUG
@@ -807,16 +807,25 @@ void tsrm_error_set(int level, char *debug_filename)
tsrm_error_file = stderr;
}
#endif
}
}/*}}}*/
TSRM_API void *tsrm_get_ls_cache(void)
{
{/*{{{*/
return tsrm_tls_get();
}
}/*}}}*/
TSRM_API uint8_t tsrm_is_main_thread(void)
{
{/*{{{*/
return in_main_thread;
}
}/*}}}*/
#endif /* ZTS */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+9
View File
@@ -216,3 +216,12 @@ TSRM_API uint8_t tsrm_is_main_thread(void);
#endif /* ZTS */
#endif /* TSRM_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+9
View File
@@ -13,3 +13,12 @@
#include <crtdbg.h>
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+9
View File
@@ -69,3 +69,12 @@ char *alloca ();
#endif
#endif /* TSRM_CONFIG_COMMON_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+13 -4
View File
@@ -4,7 +4,7 @@
#include "tsrm_strtok_r.h"
static inline int in_character_class(char ch, const char *delim)
{
{/*{{{*/
while (*delim) {
if (*delim == ch) {
return 1;
@@ -12,10 +12,10 @@ static inline int in_character_class(char ch, const char *delim)
delim++;
}
return 0;
}
}/*}}}*/
TSRM_API char *tsrm_strtok_r(char *s, const char *delim, char **last)
{
{/*{{{*/
char *token;
if (s == NULL) {
@@ -41,7 +41,7 @@ TSRM_API char *tsrm_strtok_r(char *s, const char *delim, char **last)
*last = s + 1;
}
return token;
}
}/*}}}*/
#if 0
@@ -61,3 +61,12 @@ main()
}
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+47 -36
View File
@@ -42,7 +42,7 @@ static tsrm_win32_globals win32_globals;
#endif
static void tsrm_win32_ctor(tsrm_win32_globals *globals)
{
{/*{{{*/
#ifdef ZTS
TSRMLS_CACHE_UPDATE();
#endif
@@ -61,10 +61,10 @@ TSRMLS_CACHE_UPDATE();
*/
globals->impersonation_token = INVALID_HANDLE_VALUE;
globals->impersonation_token_sid = NULL;
}
}/*}}}*/
static void tsrm_win32_dtor(tsrm_win32_globals *globals)
{
{/*{{{*/
shm_pair *ptr;
if (globals->process) {
@@ -89,26 +89,26 @@ static void tsrm_win32_dtor(tsrm_win32_globals *globals)
if (globals->impersonation_token_sid) {
free(globals->impersonation_token_sid);
}
}
}/*}}}*/
TSRM_API void tsrm_win32_startup(void)
{
{/*{{{*/
#ifdef ZTS
ts_allocate_id(&win32_globals_id, sizeof(tsrm_win32_globals), (ts_allocate_ctor)tsrm_win32_ctor, (ts_allocate_ctor)tsrm_win32_dtor);
#else
tsrm_win32_ctor(&win32_globals);
#endif
}
}/*}}}*/
TSRM_API void tsrm_win32_shutdown(void)
{
{/*{{{*/
#ifndef ZTS
tsrm_win32_dtor(&win32_globals);
#endif
}
}/*}}}*/
char * tsrm_win32_get_path_sid_key(const char *pathname, size_t pathname_len, size_t *key_len)
{
{/*{{{*/
PSID pSid = TWG(impersonation_token_sid);
char *ptcSid = NULL;
char *bucket_key = NULL;
@@ -139,11 +139,11 @@ char * tsrm_win32_get_path_sid_key(const char *pathname, size_t pathname_len, si
LocalFree(ptcSid);
return bucket_key;
}
}/*}}}*/
PSID tsrm_win32_get_token_sid(HANDLE hToken)
{
{/*{{{*/
DWORD dwLength = 0;
PTOKEN_USER pTokenUser = NULL;
DWORD sid_len;
@@ -190,10 +190,10 @@ Finished:
HeapFree(GetProcessHeap(), 0, (LPVOID)pTokenUser);
}
return NULL;
}
}/*}}}*/
TSRM_API int tsrm_win32_access(const char *pathname, int mode)
{
{/*{{{*/
time_t t;
HANDLE thread_token = NULL;
PSID token_sid;
@@ -394,11 +394,11 @@ Finished:
return 0;
}
}
}
}/*}}}*/
static process_pair *process_get(FILE *stream)
{
{/*{{{*/
process_pair *ptr;
process_pair *newptr;
@@ -421,10 +421,10 @@ static process_pair *process_get(FILE *stream)
ptr = newptr + TWG(process_size);
TWG(process_size)++;
return ptr;
}
}/*}}}*/
static shm_pair *shm_get(key_t key, void *addr)
{
{/*{{{*/
shm_pair *ptr;
shm_pair *newptr;
@@ -453,24 +453,25 @@ static shm_pair *shm_get(key_t key, void *addr)
TWG(shm_size)++;
memset(ptr, 0, sizeof(*ptr));
return ptr;
}
}/*}}}*/
static HANDLE dupHandle(HANDLE fh, BOOL inherit) {
static HANDLE dupHandle(HANDLE fh, BOOL inherit)
{/*{{{*/
HANDLE copy, self = GetCurrentProcess();
if (!DuplicateHandle(self, fh, self, &copy, 0, inherit, DUPLICATE_SAME_ACCESS|DUPLICATE_CLOSE_SOURCE)) {
return NULL;
}
return copy;
}
}/*}}}*/
TSRM_API FILE *popen(const char *command, const char *type)
{
{/*{{{*/
return popen_ex(command, type, NULL, NULL);
}
}/*}}}*/
TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env)
{
{/*{{{*/
FILE *stream = NULL;
int fno, type_len, read, mode;
STARTUPINFOW startup;
@@ -614,10 +615,10 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
proc->prochnd = process.hProcess;
proc->stream = stream;
return stream;
}
}/*}}}*/
TSRM_API int pclose(FILE *stream)
{
{/*{{{*/
DWORD termstat = 0;
process_pair *process;
@@ -634,10 +635,10 @@ TSRM_API int pclose(FILE *stream)
CloseHandle(process->prochnd);
return termstat;
}
}/*}}}*/
TSRM_API int shmget(key_t key, size_t size, int flags)
{
{/*{{{*/
shm_pair *shm;
char shm_segment[26], shm_info[29];
HANDLE shm_handle, info_handle;
@@ -717,10 +718,10 @@ TSRM_API int shmget(key_t key, size_t size, int flags)
}
return key;
}
}/*}}}*/
TSRM_API void *shmat(int key, const void *shmaddr, int flags)
{
{/*{{{*/
shm_pair *shm = shm_get(key, NULL);
if (!shm->segment) {
@@ -740,10 +741,10 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags)
shm->descriptor->shm_nattch++;
return shm->addr;
}
}/*}}}*/
TSRM_API int shmdt(const void *shmaddr)
{
{/*{{{*/
shm_pair *shm = shm_get(0, (void*)shmaddr);
if (!shm->segment) {
@@ -755,9 +756,10 @@ TSRM_API int shmdt(const void *shmaddr)
shm->descriptor->shm_nattch--;
return UnmapViewOfFile(shm->addr) ? 0 : -1;
}
}/*}}}*/
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf) {
TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf)
{/*{{{*/
shm_pair *shm = shm_get(key, NULL);
if (!shm->segment) {
@@ -785,16 +787,16 @@ TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf) {
default:
return -1;
}
}
}/*}}}*/
TSRM_API char *realpath(char *orig_path, char *buffer)
{
{/*{{{*/
int ret = GetFullPathName(orig_path, _MAX_PATH, buffer, NULL);
if(!ret || ret > _MAX_PATH) {
return NULL;
}
return buffer;
}
}/*}}}*/
#if HAVE_UTIME
static zend_always_inline void UnixTimeToFileTime(time_t t, LPFILETIME pft) /* {{{ */
@@ -852,3 +854,12 @@ TSRM_API int win32_utime(const char *filename, struct utimbuf *buf) /* {{{ */
/* }}} */
#endif
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+9
View File
@@ -113,3 +113,12 @@ TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf);
TSRM_API char *realpath(char *orig_path, char *buffer);
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+33 -4
View File
@@ -25,7 +25,7 @@ PHP 7.2 UPGRADE NOTES
. is_object() will now return true for objects of class
__PHP_Incomplete_Class.
. Support for Netware operating systems have been removed.
. Casting arrays to objects (with (object) or settype()) will now covert
. Casting arrays to objects (with (object) or settype()) will now convert
integer keys to string property names. This fixes the behaviour of previous
versions, where integer keys would become inaccessible properties with
integer names.
@@ -41,6 +41,7 @@ PHP 7.2 UPGRADE NOTES
. Minimum supported Windows versions are Windows 7/Server 2008 R2.
. Initial trait property value compatibility check will no longer perform
any casts. (Bug #74269)
. "object" (in any case) can no longer be used as a class name.
- BCMath:
. The bcmod() function no longer truncates fractional numbers to integers. As
@@ -48,8 +49,8 @@ PHP 7.2 UPGRADE NOTES
example `bcmod('4', '3.5')` now returns '0.5' instead of '1'.
- Hash:
. The hash_hmac(), hash_hmac_file() and hash_pbkdf2() functions no longer
accept non-cryptographic hashes.
. The hash_hmac(), hash_hmac_file(), hash_pbkdf2() and hash_init() (with
HASH_HMAC) functions no longer accept non-cryptographic hashes.
- JSON
. The json_decode() option JSON_OBJECT_AS_ARRAY is used if the second
@@ -85,6 +86,13 @@ PHP 7.2 UPGRADE NOTES
session_start()
. Session no longer initialize $_SESSION for invalid and useless session.
session_start()
. When headers are already sent and try to set new INI values, session_name(),
session_module_name(), session_save_path(), session_cache_limiter() and
session_cache_expire() are no longer works. Older PHPs accepts new values even
if new values will not be effective.
This new corrected behavior may affect command line mode CLI scripts that manage
sessions. Use output buffer just like web applications to resolve problems on
CLI scripts.
========================================
@@ -101,6 +109,8 @@ PHP 7.2 UPGRADE NOTES
(https://wiki.php.net/rfc/allow-abstract-function-override)
. A trailing comma in group use statements is now allowed.
(https://wiki.php.net/rfc/list-syntax-trailing-commas)
. The "object" type annotation is now supported.
(https://wiki.php.net/rfc/object-typehint)
- DBA:
. Implemented support for the LMDB backend.
@@ -114,6 +124,9 @@ PHP 7.2 UPGRADE NOTES
subpatterns and empty matches by reporting NULL and "" (empty string),
respectively.
- Sodium
. New cryptographic extension
- SQLite3:
. Implemented writing to BLOBs.
@@ -133,6 +146,8 @@ PHP 7.2 UPGRADE NOTES
ZipArchive::EM_AES_192
ZipArchive::EM_AES_256
. accept 'password' from zip stream context
. ZipArchive implements countable, added ZipArchive::count() method.
========================================
3. Changes in SAPI modules
@@ -146,7 +161,7 @@ All the deprecated functionality listed in the following will be removed in
PHP 8.0.
- Core:
. The trace_errors ini directive has been deprecated.
. The track_errors ini directive has been deprecated.
. The __autoload() mechanism has been deprecated, use spl_autoload_register()
instead.
. The (unset) cast has been deprecated. This does not affect the unset($var)
@@ -154,6 +169,11 @@ PHP 8.0.
. The create_function() function has been deprecated, use anonymous functions
instead.
. The each() function has been deprecated, use a foreach loop instead.
. The $errcontext error handler argument has been deprecated. However, using
it does not trigger a deprecation warning for technical reasons.
- EXIF:
. The read_exif_data() alias have been deprecated, use exif_read_data() instead.
- GD:
. png2wbmp() and jpeg2wbmp() have been deprecated.
@@ -211,6 +231,13 @@ See also: https://wiki.php.net/rfc/deprecations_php_7_2
. Added stream_isatty().
. Added sapi_windows_vt100_support().
- DOM:
. DomNodeList implements Countable, added DomNodeList::count().
. DOMNamedNodeMap implements Countable, added DOMNamedNodeMap::count().
- FTP:
. Added ftp_append().
- GD:
. Added imagesetclip() and imagegetclip().
. Added imageopenpolygon().
@@ -251,6 +278,8 @@ See also: https://wiki.php.net/rfc/deprecations_php_7_2
. Added extended exif tag support for the following formats:
Samsung, DJI, Panasonic, Sony, Pentax, Minolta, Sigma/Foveon,
AGFA, Kyocera, Ricoh & Epson.
. exif_read_data() and exif_thumbnail() now supports a passed streams as their
first parameter.
- GD:
. Removed --enable-gd-native-ttf configuration option which was unused as
+25 -1
View File
@@ -1,9 +1,14 @@
PHP 7.1 INTERNALS UPGRADE NOTES
PHP 7.2 INTERNALS UPGRADE NOTES
1. Internal API changes
a. Path related functions
b. php_win32_get_random_bytes()
c. nice() Windows implementation
d. ZEND_ACC_CLONE removed
e. IS_TYPE_IMMUTABLE removed
f. zend_arg_info.class_name removed
g. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX changed
h. valid_symbol_table removed
2. Build system changes
a. Unix build system changes
@@ -29,6 +34,19 @@ PHP 7.1 INTERNALS UPGRADE NOTES
SetPriorityClass(). See the implementation for more in-depth details. This also
defines HAVE_NICE.
d. ZEND_ACC_CLONE is removed, but was not used in previous versions
e. IS_TYPE_IMMUTABLE is removed, IS_TYPE_COPYABLE can be used instead
Z_IMMUTABLE() check function is still available
f. zend_arg_info class_name member is removed, use ZEND_TYPE_NAME instead
g. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX classname option is removed
use ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX for simple type
use ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX for object
h. valid_symbol_table is removed from executor_globals.
Use EG(active) instead of removed EG(valid_symbol_table)
========================
2. Build system changes
@@ -49,6 +67,12 @@ PHP 7.1 INTERNALS UPGRADE NOTES
3. Module changes
========================
- Pcre:
. php_pcre_replace and php_pcre_replace_impl expect a zend_string instead of a zval and
is_callable_replace options is removed:
- PHPAPI zend_string *php_pcre_replace(zend_string *regex, zend_string *subject_str, char *subject, int subject_len, zend_string *replace_str, int limit, int *replace_count);
- PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *subject_str, char *subject, int subject_len, zend_string *replace_str, int limit, int *replace_count);
- Session:
. php_session_start()/session_reset_id() return value is changed from void to int.
It returns SUCCESS/FAILURE.
+4 -4
View File
@@ -37,15 +37,15 @@ NULL
Notice: Undefined variable: b in %s on line %d
int(1)
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property '1' of non-object in %s on line %d
NULL
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property '1' of non-object in %s on line %d
NULL
Notice: Undefined variable: c in %s on line %d
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property '1' of non-object in %s on line %d
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property '' of non-object in %s on line %d
NULL
+1 -1
View File
@@ -18,7 +18,7 @@ print "ok\n";
?>
--EXPECTF--
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property 'a' of non-object in %s on line %d
ok
Warning: Creating default object from empty value in %s on line %d
+1 -1
View File
@@ -24,7 +24,7 @@ Notice: Undefined variable: arr in %s on line %d
Notice: Undefined variable: arr in %s on line %d
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property 'foo' of non-object in %s on line %d
Warning: Creating default object from empty value in %s on line %d
+2 -2
View File
@@ -49,8 +49,8 @@ NULL
Warning: Cannot use a scalar value as an array in %s on line %d
NULL
Warning: Attempt to assign property of non-object in %s on line %d
Warning: Attempt to assign property 'foo' of non-object in %s on line %d
NULL
Warning: Attempt to assign property of non-object in %s on line %d
Warning: Attempt to assign property 'foo' of non-object in %s on line %d
NULL
+4 -4
View File
@@ -5,7 +5,7 @@ Bug #26698 (Thrown exceptions while evaluting argument to pass as parameter cras
ini_set("report_memleaks", 0); // the exception thrown in this test results in a memory leak, which is fine
class Object
class ObjectOne
{
function getNone()
{
@@ -23,7 +23,7 @@ class Proxy
{
try
{
$res = new Object();
$res = new ObjectOne();
$this->three($res->getNone());
}
catch(Exception $e)
@@ -36,7 +36,7 @@ class Proxy
{
try
{
$res = new Object();
$res = new ObjectOne();
$this->three(1, $res->getNone());
}
catch(Exception $e)
@@ -49,7 +49,7 @@ class Proxy
{
try
{
$res = new Object();
$res = new ObjectOne();
$this->three(1, 2, $res->getNone());
}
catch(Exception $e)
+6 -6
View File
@@ -9,7 +9,7 @@ function my_error_handler($errno, $errstr, $errfile, $errline) {
set_error_handler('my_error_handler');
class Object
class ObjectOne
{
public $x;
@@ -26,7 +26,7 @@ class Overloaded
function __construct($x)
{
$this->x = new Object($x);
$this->x = new ObjectOne($x);
}
function __get($prop)
@@ -47,7 +47,7 @@ var_dump($y->x->x);
var_dump($y->x->x = 3);
var_dump($y->y = 3);
var_dump($y->y);
var_dump($y->z = new Object(4));
var_dump($y->z = new ObjectOne(4));
var_dump($y->z->x);
$t = $y->z;
var_dump($t->x = 5);
@@ -56,7 +56,7 @@ var_dump($y->z->x = 6);
?>
===DONE===
--EXPECTF--
object(Object)#%d (1) {
object(ObjectOne)#%d (1) {
["x"]=>
int(2)
}
@@ -66,9 +66,9 @@ Overloaded::__set(y,3)
int(3)
Overloaded::__get(y)
int(3)
string(55) "Object of class Object could not be converted to string"
string(58) "Object of class ObjectOne could not be converted to string"
Overloaded::__set(z,)
object(Object)#%d (1) {
object(ObjectOne)#%d (1) {
["x"]=>
int(4)
}
+2 -2
View File
@@ -44,7 +44,7 @@ ok
ok
ok
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property 'wrong' of non-object in %s on line %d
ok
Warning: Illegal string offset 'wrong' in %s on line %d
@@ -52,4 +52,4 @@ ok
ok
Warning: Illegal string offset 'wrong' in %s on line %d
ok
ok
+1 -1
View File
@@ -5,7 +5,7 @@ Bug #35470 (Assigning global using variable name from array doesn't function)
$x = array("test", "55");
global ${$x[0]};
${$x[0]} = $x[1];
echo "Test: $test\n";;
echo "Test: $test\n";
?>
--EXPECT--
Test: 55
+1 -1
View File
@@ -8,7 +8,7 @@ foreach($x->a->b as &$v) {
echo "ok\n";
?>
--EXPECTF--
Warning: Attempt to modify property of non-object in %sbug36303.php on line 3
Warning: Attempt to modify property 'a' of non-object in %sbug36303.php on line 3
Warning: Invalid argument supplied for foreach() in %sbug36303.php on line 3
ok
+6 -6
View File
@@ -28,22 +28,22 @@ var_dump($a);
?>
--EXPECTF--
--> read access:
Notice: Trying to get property of non-object in %sbug44660.php on line 6
Notice: Trying to get property 'p' of non-object in %sbug44660.php on line 6
--> direct assignment:
Warning: Attempt to assign property of non-object in %sbug44660.php on line 9
Warning: Attempt to assign property 'p' of non-object in %sbug44660.php on line 9
--> increment:
Warning: Attempt to increment/decrement property of non-object in %sbug44660.php on line 12
Warning: Attempt to increment/decrement property 'p' of non-object in %sbug44660.php on line 12
--> reference assignment:
Warning: Attempt to modify property of non-object in %sbug44660.php on line 15
Warning: Attempt to modify property 'p' of non-object in %sbug44660.php on line 15
--> reference assignment:
Warning: Attempt to modify property of non-object in %sbug44660.php on line 18
Warning: Attempt to modify property 'p' of non-object in %sbug44660.php on line 18
--> indexed assignment:
Warning: Attempt to modify property of non-object in %sbug44660.php on line 21
Warning: Attempt to modify property 'p' of non-object in %sbug44660.php on line 21
--> Confirm assignments have had no impact:
bool(true)
+1 -1
View File
@@ -7,5 +7,5 @@ $a->{"a"."b"};
--EXPECTF--
Notice: Undefined variable: a in %sbug47109.php on line 2
Notice: Trying to get property of non-object in %sbug47109.php on line 2
Notice: Trying to get property 'ab' of non-object in %sbug47109.php on line 2
+1 -1
View File
@@ -20,7 +20,7 @@ class B {
try {
$b = new B();
} catch(Exception $e) {
echo $e->getMessage() . "\n";;
echo $e->getMessage() . "\n";
}
?>
--EXPECT--
+1 -1
View File
@@ -8,5 +8,5 @@ var_dump($data);
?>
--EXPECTF--
Warning: Attempt to modify property of non-object in %sbug52237.php on line 3
Warning: Attempt to modify property 'info' of non-object in %sbug52237.php on line 3
string(4) "test"
+1 -1
View File
@@ -11,7 +11,7 @@ echo "ok\n";
--EXPECTF--
bool(false)
Warning: Attempt to modify property of non-object in %sbug54262.php on line 4
Warning: Attempt to modify property 'a' of non-object in %sbug54262.php on line 4
Warning: Cannot use a scalar value as an array in %sbug54262.php on line 5
ok
+2 -2
View File
@@ -6,7 +6,7 @@ define('OBJECT_COUNT', 10000);
$containers = array();
class Object {
class ObjectOne {
protected $_guid = 0;
public function __construct() {
global $containers;
@@ -20,7 +20,7 @@ class Object {
}
for ($i = 0; $i < OBJECT_COUNT; ++$i) {
new Object();
new ObjectOne();
}
// You probably won't see this because of the "zend_mm_heap corrupted"
+20 -4
View File
@@ -53,27 +53,43 @@ string(3) "1st"
string(3) "2nd"
NULL
string(3) "4th"
array(3) {
array(4) {
[0]=>
string(3) "1st"
[1]=>
&string(3) "2nd"
[2]=>
NULL
[3]=>
string(3) "4th"
}
array(2) {
array(4) {
[0]=>
NULL
[1]=>
string(3) "2nd"
[2]=>
NULL
[3]=>
string(3) "4th"
}
array(2) {
array(4) {
[0]=>
NULL
[1]=>
&string(3) "2nd"
[2]=>
NULL
[3]=>
string(3) "4th"
}
array(1) {
array(4) {
[0]=>
NULL
[1]=>
NULL
[2]=>
NULL
[3]=>
string(3) "4th"
}
+2 -2
View File
@@ -11,7 +11,7 @@ var_dump($b);
?>
--EXPECTF--
Warning: Attempt to modify property of non-object in %sbug72911.php on line %d
Warning: Attempt to modify property 'b' of non-object in %sbug72911.php on line %d
Warning: Attempt to assign property of non-object in %sbug72911.php on line %d
Warning: Attempt to assign property 'i' of non-object in %sbug72911.php on line %d
NULL
+15
View File
@@ -0,0 +1,15 @@
--TEST--
Bug #73900: Use After Free in unserialize() SplFixedArray
--FILE--
<?php
$a = new stdClass;
$b = new SplFixedArray(1);
$b[0] = $a;
$c = &$b[0];
var_dump($c);
?>
--EXPECT--
object(stdClass)#1 (0) {
}
+1
View File
@@ -0,0 +1 @@
0=0&~2000000000
+15
View File
@@ -0,0 +1,15 @@
--TEST--
Bug #74603 (PHP INI Parsing Stack Buffer Overflow Vulnerability)
--SKIPIF--
<?php
if (PHP_INT_MAX !== 2147483647)
die('skip for 32-bit only');
--FILE--
<?php
var_dump(parse_ini_file(__DIR__ . "/bug74603.ini", true, INI_SCANNER_NORMAL));
?>
--EXPECT--
array(1) {
[0]=>
string(1) "0"
}
+25
View File
@@ -0,0 +1,25 @@
--TEST--
Bug #74810: Something odd about ordering of func_get_args() result in 7.2
--FILE--
<?php
function test_slice1() {
var_dump(array_slice(func_get_args(), 1));
}
function test_slice5() {
var_dump(array_slice(func_get_args(), 5));
}
test_slice1(1, 2, 3);
test_slice5(1, 2, 3);
?>
--EXPECT--
array(2) {
[0]=>
int(2)
[1]=>
int(3)
}
array(0) {
}
+33
View File
@@ -0,0 +1,33 @@
--TEST--
Bug #74836 (isset on zero-prefixed numeric indexes in array broken)
--FILE--
<?php
$s = "1234567890a";
$a[10] = "42";
$i = "010";
var_dump($s["10"], isset($s["10"]));
var_dump($s["010"], isset($s["010"]));
var_dump($s[$i], isset($s[$i]));
var_dump($a["10"], isset($a["10"]));
var_dump($a["010"], isset($a["010"]));
var_dump($a[$i], isset($a[$i]));
?>
--EXPECTF--
string(1) "a"
bool(true)
string(1) "a"
bool(true)
string(1) "a"
bool(true)
string(2) "42"
bool(true)
Notice: Undefined index: 010 in %s on line %d
NULL
bool(false)
Notice: Undefined index: 010 in %s on line %d
NULL
bool(false)
+21
View File
@@ -0,0 +1,21 @@
--TEST--
Bug #74840: Opcache overwrites argument of GENERATOR_RETURN within finally
--FILE--
<?php
$g = (function($a) {
try {
return $a + 1;
} finally {
$b = $a + 2;
var_dump($b);
}
yield; // Generator
})(1);
$g->next();
var_dump($g->getReturn());
?>
--EXPECT--
int(3)
int(2)
+12
View File
@@ -0,0 +1,12 @@
--TEST--
Bug #74947 (Segfault in scanner on INF number)
--FILE--
<?php
echo 200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
echo -200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
?>
--EXPECTF--
INF-INF
+2 -2
View File
@@ -27,8 +27,8 @@ var_dump($h);
?>
--EXPECTF--
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property 'a' of non-object in %s on line %d
NULL
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property 'b' of non-object in %s on line %d
NULL
+22
View File
@@ -0,0 +1,22 @@
--TEST--
Dtor may throw exception furing FE_FETCH assignment
--FILE--
<?php
$v = new class {
function __destruct() {
throw new Exception("foo");
}
};
try {
foreach ([1, 2] as $v) {
var_dump($v);
}
} catch (Exception $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
foo
+45
View File
@@ -0,0 +1,45 @@
--TEST--
Bug #74954 (crash after update of generator yielding from finished generator)
--FILE--
<?php
function from() {
yield 1;
throw new Exception();
}
function gen($gen) {
try {
var_dump(yield from $gen);
} catch (Exception $e) { print "Caught exception!\n$e\n"; }
}
$gen = from();
$gens[] = gen($gen);
$gens[] = gen($gen);
foreach ($gens as $g) {
$g->current();
}
do {
foreach ($gens as $i => $g) {
$g->next();
}
} while($gens[0]->valid());
?>
--EXPECTF--
Caught exception!
Exception in %s:%d
Stack trace:
#0 %s(%d): from()
#1 [internal function]: gen(Object(Generator))
#2 %s(%d): Generator->next()
#3 {main}
Caught exception!
ClosedGeneratorException: Generator yielded from aborted, no return value available in %s:%d
Stack trace:
#0 [internal function]: gen(Object(Generator))
#1 %s(%d): Generator->next()
#2 {main}
+1 -1
View File
@@ -33,7 +33,7 @@ Notice: Undefined variable: c in %s on line %d
Notice: Undefined variable: d in %s on line %d
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property '' of non-object in %s on line %d
bool(false)
bool(true)
bool(false)
@@ -0,0 +1,10 @@
--TEST--
Object type can only default to null
--FILE--
<?php
function test(object $obj = 42) { }
?>
--EXPECTF--
Fatal error: Default value for parameters with an object type can only be NULL in %s on line %d
@@ -0,0 +1,15 @@
--TEST--
Missing class method a object return type during inheritance
--FILE--
<?php
class One {
public function a() : object {}
}
class Two extends One {
public function a() {}
}
--EXPECTF--
Fatal error: Declaration of Two::a() must be compatible with One::a(): object in %s on line 9
@@ -0,0 +1,15 @@
--TEST--
Missing interface method a object return type during inheritance
--FILE--
<?php
interface One {
public function a() : object;
}
interface Two extends One {
public function a();
}
--EXPECTF--
Fatal error: Declaration of Two::a() must be compatible with One::a(): object in %s on line %d
@@ -0,0 +1,26 @@
--TEST--
Adding a class method object return type
--FILE--
<?php
interface One {
public function a() : object;
}
class Two implements One {
public function a() : object {}
}
$three = new class extends Two {
public function a() : object {
return 12345;
}
};
$three->a();
--EXPECTF--
Fatal error: Uncaught TypeError: Return value of class@anonymous::a() must be an object, integer returned in %s:13
Stack trace:
#0 %s(16): class@anonymous->a()
#1 {main}
thrown in %s on line 13
@@ -0,0 +1,16 @@
--TEST--
Adding a function object return type
--FILE--
<?php
function a() : object {
return 12345;
}
a();
--EXPECTF--
Fatal error: Uncaught TypeError: Return value of a() must be an object, integer returned in %s:4
Stack trace:
#0 %s(6): a()
#1 {main}
thrown in %s on line 4
@@ -0,0 +1,26 @@
--TEST--
Adding class method a object return type during inheritance is allowed
--FILE--
<?php
class One {
public function a() {}
}
class Two extends One {
public function a() : object {}
}
$three = new class extends Two {
public function a() : object {
return 12345;
}
};
$three->a();
--EXPECTF--
Fatal error: Uncaught TypeError: Return value of class@anonymous::a() must be an object, integer returned in %s:13
Stack trace:
#0 %s(16): class@anonymous->a()
#1 {main}
thrown in %s on line 13
@@ -0,0 +1,26 @@
--TEST--
Adding interface method a object return type during inheritance is allowed
--FILE--
<?php
interface One {
public function a();
}
interface Two extends One {
public function a() : object;
}
$three = new class implements Two {
public function a() : object {
return 12345;
}
};
$three->a();
--EXPECTF--
Fatal error: Uncaught TypeError: Return value of class@anonymous::a() must be an object, integer returned in %s:13
Stack trace:
#0 %s(16): class@anonymous->a()
#1 {main}
thrown in %s on line 13
@@ -0,0 +1,31 @@
--TEST--
Reflecting object return type
--FILE--
<?php
interface One {
public function a() : object;
}
class Two implements One {
public function a() : object {}
}
function a() : object {}
$returnTypeOne = (new ReflectionClass(One::class))->getMethod('a')->getReturnType();
var_dump($returnTypeOne->isBuiltin(), (string)$returnTypeOne);
$returnTypeTwo = (new ReflectionClass(Two::class))->getMethod('a')->getReturnType();
var_dump($returnTypeTwo->isBuiltin(), (string)$returnTypeTwo);
$returnTypea = (new ReflectionFunction('a'))->getReturnType();
var_dump($returnTypea->isBuiltin(), (string)$returnTypea);
--EXPECTF--
bool(true)
string(6) "object"
bool(true)
string(6) "object"
bool(true)
string(6) "object"
@@ -0,0 +1,19 @@
--TEST--
Adding a class method object type hint
--FILE--
<?php
class One {
public function a(object $obj) {}
}
$one = new One();
$one->a(new One());
$one->a(123);
--EXPECTF--
Fatal error: Uncaught TypeError: Argument 1 passed to One::a() must be an object, integer given, called in %s:4
Stack trace:
#0 %s(9): One->a(123)
#1 {main}
thrown in %s on line 4
@@ -0,0 +1,17 @@
--TEST--
Adding a function object type hint
--FILE--
<?php
class A {}
function a(object $obj) {}
a(new A());
a(123);
--EXPECTF--
Fatal error: Uncaught TypeError: Argument 1 passed to a() must be an object, integer given, called in %s.php on line 7 and defined in %s:4
Stack trace:
#0 %s(7): a(123)
#1 {main}
thrown in %s on line 4
@@ -0,0 +1,31 @@
--TEST--
Reflecting object type hint
--FILE--
<?php
interface One {
public function a(object $obj);
}
class Two implements One {
public function a(object $obj) {}
}
function a(object $obj) {}
$typeHintOne = (new ReflectionClass(One::class))->getMethod('a')->getParameters()[0]->getType();
var_dump($typeHintOne->isBuiltin(), (string)$typeHintOne);
$typeHintTwo = (new ReflectionClass(Two::class))->getMethod('a')->getParameters()[0]->getType();
var_dump($typeHintTwo->isBuiltin(), (string)$typeHintTwo);
$typeHinta = (new ReflectionFunction('a'))->getParameters()[0]->getType();
var_dump($typeHinta->isBuiltin(), (string)$typeHinta);
--EXPECTF--
bool(true)
string(6) "object"
bool(true)
string(6) "object"
bool(true)
string(6) "object"
+17
View File
@@ -0,0 +1,17 @@
--TEST--
Attempt to free invalid structure (result of ROPE_INIT is not a zval)
--FILE--
<?php
set_error_handler(function () {
throw new Exception();
});
$a = [];
$b = "";
try {
echo "$a$b\n";
} catch (Exception $ex) {
}
?>
DONE
--EXPECT--
DONE
+16
View File
@@ -0,0 +1,16 @@
--TEST--
Live ranges should be ordered according to "start" position
--FILE--
<?php
set_error_handler(function($no, $msg) { throw new Exception; });
try {
$a = [];
$str = "$a${"y$a$a"}y";
} catch (Exception $e) {
}
?>
DONE
--EXPECT--
DONE
@@ -7,4 +7,4 @@ Cannot take property of a string
?>
--EXPECTF--
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property 'bar' of non-object in %s on line %d
+8 -49
View File
@@ -638,7 +638,6 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals) /* {{
zend_get_windows_version_info(&executor_globals->windows_version_info);
#endif
executor_globals->flags = EG_FLAGS_INITIAL;
executor_globals->valid_symbol_table = 0;
}
/* }}} */
@@ -718,6 +717,10 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) /
extern zend_php_scanner_globals language_scanner_globals;
#endif
#ifdef ZEND_WIN32
php_win32_cp_set_by_id(65001);
#endif
start_memory_manager();
virtual_cwd_startup(); /* Could use shutdown to free the main cwd but it would just slow it down for CGI */
@@ -770,7 +773,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) /
zend_compile_file = compile_file;
zend_execute_ex = execute_ex;
zend_execute_internal = NULL;
#endif /* HAVE_SYS_SDT_H */
#endif /* HAVE_DTRACE */
zend_compile_string = compile_string;
zend_throw_exception_hook = NULL;
@@ -889,13 +892,9 @@ void zend_post_startup(void) /* {{{ */
}
free(EG(zend_constants));
virtual_cwd_deactivate();
executor_globals_ctor(executor_globals);
global_persistent_list = &EG(persistent_list);
zend_copy_ini_directives();
#else
virtual_cwd_deactivate();
#endif
}
/* }}} */
@@ -903,31 +902,6 @@ void zend_post_startup(void) /* {{{ */
void zend_shutdown(void) /* {{{ */
{
zend_destroy_rsrc_list(&EG(persistent_list));
if (EG(active))
{
/*
* The order of destruction is important here.
* See bugs #65463 and 66036.
*/
zend_function *func;
zend_class_entry *ce;
ZEND_HASH_REVERSE_FOREACH_PTR(GLOBAL_FUNCTION_TABLE, func) {
if (func->type == ZEND_USER_FUNCTION) {
zend_cleanup_op_array_data((zend_op_array *) func);
}
} ZEND_HASH_FOREACH_END();
ZEND_HASH_REVERSE_FOREACH_PTR(GLOBAL_CLASS_TABLE, ce) {
if (ce->type == ZEND_USER_CLASS) {
zend_cleanup_user_class_data(ce);
} else {
break;
}
} ZEND_HASH_FOREACH_END();
zend_cleanup_internal_classes();
zend_hash_reverse_apply(GLOBAL_FUNCTION_TABLE, (apply_func_t) clean_non_persistent_function_full);
zend_hash_reverse_apply(GLOBAL_CLASS_TABLE, (apply_func_t) clean_non_persistent_class_full);
}
zend_destroy_modules();
virtual_cwd_deactivate();
@@ -1127,8 +1101,6 @@ ZEND_API ZEND_COLD void zend_error(int type, const char *format, ...) /* {{{ */
static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list args)
#endif
{
char *str;
int len;
#if !defined(HAVE_NORETURN) || defined(HAVE_NORETURN_ALIAS)
va_list args;
#endif
@@ -1257,24 +1229,9 @@ static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list a
break;
default:
/* Handle the error in user space */
/* va_copy() is __va_copy() in old gcc versions.
* According to the autoconf manual, using
* memcpy(&dst, &src, sizeof(va_list))
* gives maximum portability. */
#ifndef va_copy
# ifdef __va_copy
# define va_copy(dest, src) __va_copy((dest), (src))
# else
# define va_copy(dest, src) memcpy(&(dest), &(src), sizeof(va_list))
# endif
#endif
va_copy(usr_copy, args);
len = (int)zend_vspprintf(&str, 0, format, usr_copy);
ZVAL_NEW_STR(&params[1], zend_string_init(str, len, 0));
efree(str);
#ifdef va_copy
ZVAL_STR(&params[1], zend_vstrpprintf(0, format, usr_copy));
va_end(usr_copy);
#endif
ZVAL_LONG(&params[0], type);
@@ -1589,4 +1546,6 @@ void free_estring(char **str_p) /* {{{ */
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -336,4 +336,6 @@ ZEND_API void zend_restore_error_handling(zend_error_handling *saved);
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+91 -69
View File
@@ -2055,17 +2055,19 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module) /
zend_string_release(lcname);
return NULL;
}
zend_string_release(lcname);
module = module_ptr;
EG(current_module) = module;
if (module->functions && zend_register_functions(NULL, module->functions, NULL, module->type)==FAILURE) {
zend_hash_del(&module_registry, lcname);
zend_string_release(lcname);
EG(current_module) = NULL;
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load", module->name);
return NULL;
}
EG(current_module) = NULL;
zend_string_release(lcname);
return module;
}
/* }}} */
@@ -3241,14 +3243,86 @@ get_function_via_handler:
}
/* }}} */
ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error) /* {{{ */
static zend_string *zend_create_method_string(zend_string *class_name, zend_string *method_name) {
zend_string *callable_name = zend_string_alloc(
ZSTR_LEN(class_name) + ZSTR_LEN(method_name) + sizeof("::") - 1, 0);
char *ptr = ZSTR_VAL(callable_name);
memcpy(ptr, ZSTR_VAL(class_name), ZSTR_LEN(class_name));
ptr += ZSTR_LEN(class_name);
memcpy(ptr, "::", sizeof("::") - 1);
ptr += sizeof("::") - 1;
memcpy(ptr, ZSTR_VAL(method_name), ZSTR_LEN(method_name) + 1);
return callable_name;
}
ZEND_API zend_string *zend_get_callable_name_ex(zval *callable, zend_object *object) /* {{{ */
{
try_again:
switch (Z_TYPE_P(callable)) {
case IS_STRING:
if (object) {
return zend_create_method_string(object->ce->name, Z_STR_P(callable));
}
return zend_string_copy(Z_STR_P(callable));
case IS_ARRAY:
{
zval *method = NULL;
zval *obj = NULL;
if (zend_hash_num_elements(Z_ARRVAL_P(callable)) == 2) {
obj = zend_hash_index_find_deref(Z_ARRVAL_P(callable), 0);
method = zend_hash_index_find_deref(Z_ARRVAL_P(callable), 1);
}
if (obj == NULL || method == NULL || Z_TYPE_P(method) != IS_STRING) {
return zend_string_init("Array", sizeof("Array")-1, 0);
}
if (Z_TYPE_P(obj) == IS_STRING) {
return zend_create_method_string(Z_STR_P(obj), Z_STR_P(method));
} else if (Z_TYPE_P(obj) == IS_OBJECT) {
return zend_create_method_string(Z_OBJCE_P(obj)->name, Z_STR_P(method));
} else {
return zend_string_init("Array", sizeof("Array")-1, 0);
}
}
case IS_OBJECT:
{
zend_class_entry *calling_scope;
zend_function *fptr;
zend_object *object;
if (Z_OBJ_HANDLER_P(callable, get_closure)
&& Z_OBJ_HANDLER_P(callable, get_closure)(callable, &calling_scope, &fptr, &object) == SUCCESS) {
zend_class_entry *ce = Z_OBJCE_P(callable);
zend_string *callable_name = zend_string_alloc(
ZSTR_LEN(ce->name) + sizeof("::__invoke") - 1, 0);
memcpy(ZSTR_VAL(callable_name), ZSTR_VAL(ce->name), ZSTR_LEN(ce->name));
memcpy(ZSTR_VAL(callable_name) + ZSTR_LEN(ce->name), "::__invoke", sizeof("::__invoke"));
return callable_name;
}
return zval_get_string(callable);
}
case IS_REFERENCE:
callable = Z_REFVAL_P(callable);
goto try_again;
default:
return zval_get_string(callable);
}
}
/* }}} */
ZEND_API zend_string *zend_get_callable_name(zval *callable) /* {{{ */
{
return zend_get_callable_name_ex(callable, NULL);
}
/* }}} */
static zend_bool zend_is_callable_impl(zval *callable, zend_object *object, uint32_t check_flags, zend_fcall_info_cache *fcc, char **error) /* {{{ */
{
zend_bool ret;
zend_fcall_info_cache fcc_local;
if (callable_name) {
*callable_name = NULL;
}
if (fcc == NULL) {
fcc = &fcc_local;
}
@@ -3262,32 +3336,14 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint
fcc->function_handler = NULL;
fcc->object = NULL;
if (object &&
(!EG(objects_store).object_buckets ||
!IS_OBJ_VALID(EG(objects_store).object_buckets[object->handle]))) {
return 0;
}
again:
switch (Z_TYPE_P(callable)) {
case IS_STRING:
if (object) {
fcc->object = object;
fcc->calling_scope = object->ce;
if (callable_name) {
char *ptr;
*callable_name = zend_string_alloc(ZSTR_LEN(fcc->calling_scope->name) + Z_STRLEN_P(callable) + sizeof("::") - 1, 0);
ptr = ZSTR_VAL(*callable_name);
memcpy(ptr, ZSTR_VAL(fcc->calling_scope->name), ZSTR_LEN(fcc->calling_scope->name));
ptr += ZSTR_LEN(fcc->calling_scope->name);
memcpy(ptr, "::", sizeof("::") - 1);
ptr += sizeof("::") - 1;
memcpy(ptr, Z_STRVAL_P(callable), Z_STRLEN_P(callable) + 1);
}
} else if (callable_name) {
*callable_name = zend_string_copy(Z_STR_P(callable));
}
if (check_flags & IS_CALLABLE_CHECK_SYNTAX_ONLY) {
fcc->called_scope = fcc->calling_scope;
return 1;
@@ -3329,19 +3385,6 @@ again:
ZVAL_DEREF(obj);
if (Z_TYPE_P(obj) == IS_STRING) {
if (callable_name) {
char *ptr;
*callable_name = zend_string_alloc(Z_STRLEN_P(obj) + Z_STRLEN_P(method) + sizeof("::") - 1, 0);
ptr = ZSTR_VAL(*callable_name);
memcpy(ptr, Z_STRVAL_P(obj), Z_STRLEN_P(obj));
ptr += Z_STRLEN_P(obj);
memcpy(ptr, "::", sizeof("::") - 1);
ptr += sizeof("::") - 1;
memcpy(ptr, Z_STRVAL_P(method), Z_STRLEN_P(method) + 1);
}
if (check_flags & IS_CALLABLE_CHECK_SYNTAX_ONLY) {
return 1;
}
@@ -3351,27 +3394,11 @@ again:
}
} else if (Z_TYPE_P(obj) == IS_OBJECT) {
if (!EG(objects_store).object_buckets ||
!IS_OBJ_VALID(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(obj)])) {
return 0;
}
fcc->calling_scope = Z_OBJCE_P(obj); /* TBFixed: what if it's overloaded? */
fcc->object = Z_OBJ_P(obj);
if (callable_name) {
char *ptr;
*callable_name = zend_string_alloc(ZSTR_LEN(fcc->calling_scope->name) + Z_STRLEN_P(method) + sizeof("::") - 1, 0);
ptr = ZSTR_VAL(*callable_name);
memcpy(ptr, ZSTR_VAL(fcc->calling_scope->name), ZSTR_LEN(fcc->calling_scope->name));
ptr += ZSTR_LEN(fcc->calling_scope->name);
memcpy(ptr, "::", sizeof("::") - 1);
ptr += sizeof("::") - 1;
memcpy(ptr, Z_STRVAL_P(method), Z_STRLEN_P(method) + 1);
}
if (check_flags & IS_CALLABLE_CHECK_SYNTAX_ONLY) {
fcc->called_scope = fcc->calling_scope;
return 1;
@@ -3405,42 +3432,35 @@ again:
} else {
if (error) zend_spprintf(error, 0, "array must have exactly two members");
}
if (callable_name) {
*callable_name = zend_string_init("Array", sizeof("Array")-1, 0);
}
}
return 0;
case IS_OBJECT:
if (Z_OBJ_HANDLER_P(callable, get_closure) && Z_OBJ_HANDLER_P(callable, get_closure)(callable, &fcc->calling_scope, &fcc->function_handler, &fcc->object) == SUCCESS) {
fcc->called_scope = fcc->calling_scope;
if (callable_name) {
zend_class_entry *ce = Z_OBJCE_P(callable); /* TBFixed: what if it's overloaded? */
*callable_name = zend_string_alloc(ZSTR_LEN(ce->name) + sizeof("::__invoke") - 1, 0);
memcpy(ZSTR_VAL(*callable_name), ZSTR_VAL(ce->name), ZSTR_LEN(ce->name));
memcpy(ZSTR_VAL(*callable_name) + ZSTR_LEN(ce->name), "::__invoke", sizeof("::__invoke"));
}
fcc->initialized = 1;
return 1;
}
if (callable_name) {
*callable_name = zval_get_string(callable);
}
if (error) zend_spprintf(error, 0, "no array or string given");
return 0;
case IS_REFERENCE:
callable = Z_REFVAL_P(callable);
goto again;
default:
if (callable_name) {
*callable_name = zval_get_string(callable);
}
if (error) zend_spprintf(error, 0, "no array or string given");
return 0;
}
}
/* }}} */
ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error) /* {{{ */
{
zend_bool ret = zend_is_callable_impl(callable, object, check_flags, fcc, error);
if (callable_name) {
*callable_name = zend_get_callable_name_ex(callable, object);
}
return ret;
}
ZEND_API zend_bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name) /* {{{ */
{
return zend_is_callable_ex(callable, NULL, check_flags, callable_name, NULL, NULL);
@@ -4308,4 +4328,6 @@ ZEND_API zend_bool zend_is_iterable(zval *iterable) /* {{{ */
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+8 -4
View File
@@ -107,12 +107,12 @@ typedef struct _zend_fcall_info_cache {
#define ZEND_ARG_VARIADIC_TYPE_INFO(pass_by_ref, name, type_hint, allow_null) { #name, ZEND_TYPE_ENCODE(type_hint, allow_null), pass_by_ref, 1 },
#define ZEND_ARG_VARIADIC_OBJ_INFO(pass_by_ref, name, classname, allow_null) { #name, ZEND_TYPE_ENCODE_CLASS_CONST(#classname, allow_null), pass_by_ref, 1 },
#define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(name, return_reference, required_num_args, classname, allow_null) \
#define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(name, return_reference, required_num_args, class_name, allow_null) \
static const zend_internal_arg_info name[] = { \
{ (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_ENCODE_CLASS_CONST(#classname, allow_null), return_reference, 0 },
{ (const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_ENCODE_CLASS_CONST(#class_name, allow_null), return_reference, 0 },
#define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO(name, class_name, allow_null) \
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, 0, -1, class_name, allow_null)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(name, 0, -1, class_name, allow_null)
#define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \
static const zend_internal_arg_info name[] = { \
@@ -323,6 +323,8 @@ ZEND_API ZEND_COLD void zend_wrong_param_count(void);
#define IS_CALLABLE_STRICT (IS_CALLABLE_CHECK_IS_STATIC)
ZEND_API zend_string *zend_get_callable_name_ex(zval *callable, zend_object *object);
ZEND_API zend_string *zend_get_callable_name(zval *callable);
ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error);
ZEND_API zend_bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name);
ZEND_API zend_bool zend_make_callable(zval *callable, zend_string **callable_name);
@@ -1321,4 +1323,6 @@ END_EXTERN_C()
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+4 -2
View File
@@ -1880,7 +1880,7 @@ ZEND_API size_t zend_mm_gc(zend_mm_heap *heap)
if (free_counter == bin_elements[i]) {
has_free_pages = 1;
}
chunk->map[page_num] = ZEND_MM_SRUN_EX(i, free_counter);;
chunk->map[page_num] = ZEND_MM_SRUN_EX(i, free_counter);
p = p->next_free_slot;
}
@@ -1907,7 +1907,7 @@ ZEND_API size_t zend_mm_gc(zend_mm_heap *heap)
ZEND_ASSERT(ZEND_MM_SRUN_BIN_NUM(info) == i);
if (ZEND_MM_SRUN_FREE_COUNTER(info) == bin_elements[i]) {
/* remove from cache */
p = p->next_free_slot;;
p = p->next_free_slot;
*q = p;
} else {
q = &p->next_free_slot;
@@ -2837,4 +2837,6 @@ ZEND_API void * __zend_realloc(void *p, size_t len)
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -402,4 +402,6 @@ END_EXTERN_C()
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+10
View File
@@ -62,3 +62,13 @@
_(29, 3072, 4, 3, x, y)
#endif /* ZEND_ALLOC_SIZES_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -120,4 +120,6 @@ static zend_always_inline void zend_arena_release(zend_arena **arena_ptr, void *
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+10
View File
@@ -1721,3 +1721,13 @@ ZEND_API zend_string *zend_ast_export(const char *prefix, zend_ast *ast, const c
smart_str_0(&str);
return str.s;
}
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+10
View File
@@ -275,3 +275,13 @@ static zend_always_inline zend_ast *zend_ast_list_rtrim(zend_ast *ast) {
return ast;
}
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+10
View File
@@ -245,6 +245,14 @@ static inline int zend_bitset_last(zend_bitset set, uint32_t len)
} \
} while (0)
static inline int zend_bitset_pop_first(zend_bitset set, uint32_t len) {
int i = zend_bitset_first(set, len);
if (i >= 0) {
zend_bitset_excl(set, i);
}
return i;
}
#endif /* _ZEND_BITSET_H_ */
/*
@@ -253,4 +261,6 @@ static inline int zend_bitset_last(zend_bitset set, uint32_t len)
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+10
View File
@@ -44,3 +44,13 @@
#define ZEND_BUILD_EXTRA
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+20 -21
View File
@@ -454,7 +454,7 @@ ZEND_FUNCTION(func_get_args)
{
zval *p, *q;
uint32_t arg_count, first_extra_arg;
uint32_t i, n;
uint32_t i;
zend_execute_data *ex = EX(prev_execute_data);
if (ZEND_CALL_INFO(ex) & ZEND_CALL_CODE) {
@@ -474,7 +474,6 @@ ZEND_FUNCTION(func_get_args)
zend_hash_real_init(Z_ARRVAL_P(return_value), 1);
ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(return_value)) {
i = 0;
n = 0;
p = ZEND_CALL_ARG(ex, 1);
if (arg_count > first_extra_arg) {
while (i < first_extra_arg) {
@@ -484,7 +483,8 @@ ZEND_FUNCTION(func_get_args)
if (Z_OPT_REFCOUNTED_P(q)) {
Z_ADDREF_P(q);
}
n++;
} else {
q = &EG(uninitialized_zval);
}
ZEND_HASH_FILL_ADD(q);
p++;
@@ -499,14 +499,15 @@ ZEND_FUNCTION(func_get_args)
if (Z_OPT_REFCOUNTED_P(q)) {
Z_ADDREF_P(q);
}
n++;
} else {
q = &EG(uninitialized_zval);
}
ZEND_HASH_FILL_ADD(q);
p++;
i++;
}
} ZEND_HASH_FILL_END();
Z_ARRVAL_P(return_value)->nNumOfElements = n;
Z_ARRVAL_P(return_value)->nNumOfElements = arg_count;
}
}
/* }}} */
@@ -1592,7 +1593,6 @@ ZEND_FUNCTION(trigger_error)
ZEND_FUNCTION(set_error_handler)
{
zval *error_handler;
zend_string *error_handler_name = NULL;
zend_long error_type = E_ALL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &error_handler, &error_type) == FAILURE) {
@@ -1600,13 +1600,13 @@ ZEND_FUNCTION(set_error_handler)
}
if (Z_TYPE_P(error_handler) != IS_NULL) { /* NULL == unset */
if (!zend_is_callable(error_handler, 0, &error_handler_name)) {
if (!zend_is_callable(error_handler, 0, NULL)) {
zend_string *error_handler_name = zend_get_callable_name(error_handler);
zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback",
get_active_function_name(), error_handler_name?ZSTR_VAL(error_handler_name):"unknown");
zend_string_release(error_handler_name);
return;
}
zend_string_release(error_handler_name);
}
if (Z_TYPE(EG(user_error_handler)) != IS_UNDEF) {
@@ -1661,20 +1661,19 @@ ZEND_FUNCTION(restore_error_handler)
ZEND_FUNCTION(set_exception_handler)
{
zval *exception_handler;
zend_string *exception_handler_name = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &exception_handler) == FAILURE) {
return;
}
if (Z_TYPE_P(exception_handler) != IS_NULL) { /* NULL == unset */
if (!zend_is_callable(exception_handler, 0, &exception_handler_name)) {
if (!zend_is_callable(exception_handler, 0, NULL)) {
zend_string *exception_handler_name = zend_get_callable_name(exception_handler);
zend_error(E_WARNING, "%s() expects the argument (%s) to be a valid callback",
get_active_function_name(), exception_handler_name?ZSTR_VAL(exception_handler_name):"unknown");
zend_string_release(exception_handler_name);
return;
}
zend_string_release(exception_handler_name);
}
if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) {
@@ -2122,7 +2121,6 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
array_init_size(arg_array, num_args);
if (num_args) {
uint32_t i = 0;
uint32_t n = 0;
zval *p = ZEND_CALL_ARG(call, 1);
zend_hash_real_init(Z_ARRVAL_P(arg_array), 1);
@@ -2145,12 +2143,9 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
if (Z_OPT_REFCOUNTED_P(arg)) {
Z_ADDREF_P(arg);
}
n++;
ZEND_HASH_FILL_ADD(arg);
} else {
zval tmp;
ZVAL_UNDEF(&tmp);
ZEND_HASH_FILL_ADD(&tmp);
ZEND_HASH_FILL_ADD(&EG(uninitialized_zval));
}
i++;
}
@@ -2160,9 +2155,10 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
if (Z_OPT_REFCOUNTED_P(p)) {
Z_ADDREF_P(p);
}
n++;
ZEND_HASH_FILL_ADD(p);
} else {
ZEND_HASH_FILL_ADD(&EG(uninitialized_zval));
}
ZEND_HASH_FILL_ADD(p);
p++;
i++;
}
@@ -2175,14 +2171,15 @@ static void debug_backtrace_get_args(zend_execute_data *call, zval *arg_array) /
if (Z_OPT_REFCOUNTED_P(p)) {
Z_ADDREF_P(p);
}
n++;
ZEND_HASH_FILL_ADD(p);
} else {
ZEND_HASH_FILL_ADD(&EG(uninitialized_zval));
}
ZEND_HASH_FILL_ADD(p);
p++;
i++;
}
} ZEND_HASH_FILL_END();
Z_ARRVAL_P(arg_array)->nNumOfElements = n;
Z_ARRVAL_P(arg_array)->nNumOfElements = num_args;
}
}
/* }}} */
@@ -2707,4 +2704,6 @@ ZEND_FUNCTION(get_extension_funcs)
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -36,4 +36,6 @@ END_EXTERN_C()
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -726,4 +726,6 @@ void zend_closure_bind_var(zval *closure_zv, zend_string *var_name, zval *var) /
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -45,4 +45,6 @@ END_EXTERN_C()
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+13 -5
View File
@@ -162,6 +162,7 @@ static const struct reserved_class_name reserved_class_names[] = {
{ZEND_STRL("true")},
{ZEND_STRL("void")},
{ZEND_STRL("iterable")},
{ZEND_STRL("object")},
{NULL, 0}
};
@@ -207,6 +208,7 @@ static const builtin_type_info builtin_types[] = {
{ZEND_STRL("bool"), _IS_BOOL},
{ZEND_STRL("void"), IS_VOID},
{ZEND_STRL("iterable"), IS_ITERABLE},
{ZEND_STRL("object"), IS_OBJECT},
{NULL, 0, IS_UNDEF}
};
@@ -2218,6 +2220,7 @@ ZEND_API int zend_is_smart_branch(zend_op *opline) /* {{{ */
case ZEND_IS_SMALLER:
case ZEND_IS_SMALLER_OR_EQUAL:
case ZEND_CASE:
case ZEND_ISSET_ISEMPTY_CV:
case ZEND_ISSET_ISEMPTY_VAR:
case ZEND_ISSET_ISEMPTY_DIM_OBJ:
case ZEND_ISSET_ISEMPTY_PROP_OBJ:
@@ -4288,8 +4291,7 @@ void zend_compile_unset(zend_ast *ast) /* {{{ */
if (is_this_fetch(var_ast)) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot unset $this");
} else if (zend_try_compile_cv(&var_node, var_ast) == SUCCESS) {
opline = zend_emit_op(NULL, ZEND_UNSET_VAR, &var_node, NULL);
opline->extended_value = ZEND_FETCH_LOCAL | ZEND_QUICK_SET;
opline = zend_emit_op(NULL, ZEND_UNSET_CV, &var_node, NULL);
} else {
opline = zend_compile_simple_var_no_cv(NULL, var_ast, BP_VAR_UNSET, 0);
opline->opcode = ZEND_UNSET_VAR;
@@ -5565,6 +5567,11 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
"with iterable type can only be an array or NULL");
}
break;
case IS_OBJECT:
zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
"with an object type can only be NULL");
break;
default:
if (!ZEND_SAME_FAKE_TYPE(ZEND_TYPE_CODE(arg_info->type), Z_TYPE(default_node.u.constant))) {
@@ -7462,8 +7469,7 @@ void zend_compile_isset_or_empty(znode *result, zend_ast *ast) /* {{{ */
if (is_this_fetch(var_ast)) {
opline = zend_emit_op(result, ZEND_ISSET_ISEMPTY_THIS, NULL, NULL);
} else if (zend_try_compile_cv(&var_node, var_ast) == SUCCESS) {
opline = zend_emit_op(result, ZEND_ISSET_ISEMPTY_VAR, &var_node, NULL);
opline->extended_value = ZEND_FETCH_LOCAL | ZEND_QUICK_SET;
opline = zend_emit_op(result, ZEND_ISSET_ISEMPTY_CV, &var_node, NULL);
} else {
opline = zend_compile_simple_var_no_cv(result, var_ast, BP_VAR_IS, 0);
opline->opcode = ZEND_ISSET_ISEMPTY_VAR;
@@ -7838,7 +7844,7 @@ static void zend_compile_encaps_list(znode *result, zend_ast *ast) /* {{{ */
GET_NODE(result, opline->result);
} else {
uint32_t var;
uint32_t range = zend_start_live_range(CG(active_op_array), rope_init_lineno);
uint32_t range = zend_start_live_range_ex(CG(active_op_array), rope_init_lineno);
init_opline->extended_value = j;
opline->opcode = ZEND_ROPE_END;
@@ -8649,4 +8655,6 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2 -5
View File
@@ -779,12 +779,8 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle);
ZEND_API void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size);
ZEND_API void destroy_op_array(zend_op_array *op_array);
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle);
ZEND_API void zend_cleanup_user_class_data(zend_class_entry *ce);
ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce);
ZEND_API void zend_cleanup_internal_classes(void);
ZEND_API void zend_cleanup_op_array_data(zend_op_array *op_array);
ZEND_API int clean_non_persistent_function_full(zval *zv);
ZEND_API int clean_non_persistent_class_full(zval *zv);
ZEND_API void destroy_zend_function(zend_function *function);
ZEND_API void zend_function_dtor(zval *zv);
@@ -910,7 +906,6 @@ void zend_assert_valid_class_name(const zend_string *const_name);
#define ZEND_ISSET 0x02000000
#define ZEND_ISEMPTY 0x01000000
#define ZEND_ISSET_ISEMPTY_MASK (ZEND_ISSET | ZEND_ISEMPTY)
#define ZEND_QUICK_SET 0x00800000
#define ZEND_FETCH_ARG_MASK 0x000fffff
@@ -1061,4 +1056,6 @@ ZEND_API zend_bool zend_binary_op_produces_numeric_string_error(uint32_t opcode,
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -86,4 +86,6 @@ typedef unsigned int uint;
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -90,4 +90,6 @@ typedef unsigned int uint;
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2 -24
View File
@@ -69,20 +69,6 @@ void zend_copy_constants(HashTable *target, HashTable *source)
}
static int clean_non_persistent_constant(zval *zv)
{
zend_constant *c = Z_PTR_P(zv);
return (c->flags & CONST_PERSISTENT) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE;
}
static int clean_non_persistent_constant_full(zval *zv)
{
zend_constant *c = Z_PTR_P(zv);
return (c->flags & CONST_PERSISTENT) ? 0 : 1;
}
static int clean_module_constant(zval *el, void *arg)
{
zend_constant *c = (zend_constant *)Z_PTR_P(el);
@@ -152,16 +138,6 @@ int zend_shutdown_constants(void)
return SUCCESS;
}
void clean_non_persistent_constants(void)
{
if (EG(full_tables_cleanup)) {
zend_hash_apply(EG(zend_constants), clean_non_persistent_constant_full);
} else {
zend_hash_reverse_apply(EG(zend_constants), clean_non_persistent_constant);
}
}
ZEND_API void zend_register_null_constant(const char *name, size_t name_len, int flags, int module_number)
{
zend_constant c;
@@ -540,4 +516,6 @@ ZEND_API int zend_register_constant(zend_constant *c)
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2 -1
View File
@@ -64,7 +64,6 @@ void free_zend_constant(zval *zv);
int zend_startup_constants(void);
int zend_shutdown_constants(void);
void zend_register_standard_constants(void);
void clean_non_persistent_constants(void);
ZEND_API int zend_verify_const_access(zend_class_constant *c, zend_class_entry *ce);
ZEND_API zval *zend_get_constant(zend_string *name);
ZEND_API zval *zend_get_constant_str(const char *name, size_t name_len);
@@ -90,4 +89,6 @@ END_EXTERN_C()
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -43,4 +43,6 @@ ZEND_API void zend_register_default_classes(void)
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+9
View File
@@ -115,3 +115,12 @@ ZEND_API void dtrace_execute_internal(zend_execute_data *execute_data, zval *ret
#endif /* HAVE_DTRACE */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+10
View File
@@ -46,3 +46,13 @@ ZEND_API void dtrace_execute_internal(zend_execute_data *execute_data, zval *ret
#endif
#endif /* _ZEND_DTRACE_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -49,4 +49,6 @@
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -1049,4 +1049,6 @@ ZEND_API ZEND_COLD void zend_throw_exception_object(zval *exception) /* {{{ */
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -88,4 +88,6 @@ END_EXTERN_C()
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+35 -84
View File
@@ -648,7 +648,6 @@ static ZEND_COLD void zend_verify_type_error_common(
{
zend_bool is_interface = 0;
*fname = ZSTR_VAL(zf->common.function_name);
if (zf->common.scope) {
*fsep = "::";
*fclass = ZSTR_VAL(zf->common.scope->name);
@@ -674,6 +673,10 @@ static ZEND_COLD void zend_verify_type_error_common(
}
} else {
switch (ZEND_TYPE_CODE(arg_info->type)) {
case IS_OBJECT:
*need_msg = "be an ";
*need_kind = "object";
break;
case IS_CALLABLE:
*need_msg = "be callable";
*need_kind = "";
@@ -1667,16 +1670,9 @@ fetch_from_array:
zend_error(E_NOTICE, "Indirect modification of overloaded element of %s has no effect", ZSTR_VAL(ce->name));
} else if (EXPECTED(retval && Z_TYPE_P(retval) != IS_UNDEF)) {
if (!Z_ISREF_P(retval)) {
if (Z_REFCOUNTED_P(retval) &&
Z_REFCOUNT_P(retval) > 1) {
if (Z_TYPE_P(retval) != IS_OBJECT) {
Z_DELREF_P(retval);
ZVAL_DUP(result, retval);
retval = result;
} else {
ZVAL_COPY_VALUE(result, retval);
retval = result;
}
if (result != retval) {
ZVAL_COPY(result, retval);
retval = result;
}
if (Z_TYPE_P(retval) != IS_OBJECT) {
zend_class_entry *ce = Z_OBJCE_P(container);
@@ -1890,7 +1886,9 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c
object_init(container);
} else {
if (container_op_type != IS_VAR || EXPECTED(!Z_ISERROR_P(container))) {
zend_error(E_WARNING, "Attempt to modify property of non-object");
zend_string *property_name = zval_get_string(prop_ptr);
zend_error(E_WARNING, "Attempt to modify property '%s' of non-object", ZSTR_VAL(property_name));
zend_string_release(property_name);
}
ZVAL_ERROR(result);
return;
@@ -2242,88 +2240,35 @@ static zend_always_inline void i_init_code_execute_data(zend_execute_data *execu
}
/* }}} */
static zend_always_inline void i_init_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value) /* {{{ */
ZEND_API void zend_init_func_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value) /* {{{ */
{
ZEND_ASSERT(EX(func) == (zend_function*)op_array);
EX(opline) = op_array->opcodes;
EX(call) = NULL;
EX(return_value) = return_value;
if (EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE) {
zend_attach_symbol_table(execute_data);
} else {
uint32_t first_extra_arg, num_args;
/* Handle arguments */
first_extra_arg = op_array->num_args;
num_args = EX_NUM_ARGS();
if (UNEXPECTED(num_args > first_extra_arg)) {
if (EXPECTED(!(op_array->fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE))) {
zval *end, *src, *dst;
uint32_t type_flags = 0;
if (EXPECTED((op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) == 0)) {
/* Skip useless ZEND_RECV and ZEND_RECV_INIT opcodes */
EX(opline) += first_extra_arg;
}
/* move extra args into separate array after all CV and TMP vars */
end = EX_VAR_NUM(first_extra_arg - 1);
src = end + (num_args - first_extra_arg);
dst = src + (op_array->last_var + op_array->T - first_extra_arg);
if (EXPECTED(src != dst)) {
do {
type_flags |= Z_TYPE_INFO_P(src);
ZVAL_COPY_VALUE(dst, src);
ZVAL_UNDEF(src);
src--;
dst--;
} while (src != end);
} else {
do {
type_flags |= Z_TYPE_INFO_P(src);
src--;
} while (src != end);
}
ZEND_ADD_CALL_FLAG(execute_data, ((type_flags >> Z_TYPE_FLAGS_SHIFT) & IS_TYPE_REFCOUNTED));
}
} else if (EXPECTED((op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) == 0)) {
/* Skip useless ZEND_RECV and ZEND_RECV_INIT opcodes */
EX(opline) += num_args;
}
/* Initialize CV variables (skip arguments) */
if (EXPECTED((int)num_args < op_array->last_var)) {
zval *var = EX_VAR_NUM(num_args);
zval *end = EX_VAR_NUM(op_array->last_var);
do {
ZVAL_UNDEF(var);
var++;
} while (var != end);
}
}
EX(prev_execute_data) = EG(current_execute_data);
if (!op_array->run_time_cache) {
if (op_array->function_name) {
op_array->run_time_cache = zend_arena_alloc(&CG(arena), op_array->cache_size);
} else {
op_array->run_time_cache = emalloc(op_array->cache_size);
}
op_array->run_time_cache = zend_arena_alloc(&CG(arena), op_array->cache_size);
memset(op_array->run_time_cache, 0, op_array->cache_size);
}
EX_LOAD_RUN_TIME_CACHE(op_array);
EX_LOAD_LITERALS(op_array);
i_init_func_execute_data(execute_data, op_array, return_value);
}
/* }}} */
EG(current_execute_data) = execute_data;
ZEND_API void zend_init_code_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value) /* {{{ */
{
EX(prev_execute_data) = EG(current_execute_data);
if (!op_array->run_time_cache) {
op_array->run_time_cache = emalloc(op_array->cache_size);
memset(op_array->run_time_cache, 0, op_array->cache_size);
}
i_init_code_execute_data(execute_data, op_array, return_value);
}
/* }}} */
ZEND_API void zend_init_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value) /* {{{ */
{
EX(prev_execute_data) = EG(current_execute_data);
i_init_execute_data(execute_data, op_array, return_value);
if (EX_CALL_INFO() & ZEND_CALL_HAS_SYMBOL_TABLE) {
zend_init_code_execute_data(execute_data, op_array, return_value);
} else {
zend_init_func_execute_data(execute_data, op_array, return_value);
}
}
/* }}} */
@@ -3081,16 +3026,20 @@ ZEND_API zval *zend_get_zval_ptr(int op_type, const znode_op *node, const zend_e
case IS_CONST:
ret = EX_CONSTANT(*node);
*should_free = NULL;
break;
case IS_TMP_VAR:
case IS_VAR:
ret = EX_VAR(node->var);
*should_free = ret;
break;
case IS_CV:
ret = EX_VAR(node->var);
*should_free = NULL;
break;
default:
ret = NULL;
*should_free = ret;
break;
}
return ret;
}
@@ -3113,4 +3062,6 @@ ZEND_API int ZEND_FASTCALL zend_check_arg_type(zend_function *zf, uint32_t arg_n
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+4
View File
@@ -37,6 +37,8 @@ void init_executor(void);
void shutdown_executor(void);
void shutdown_destructors(void);
ZEND_API void zend_init_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value);
ZEND_API void zend_init_func_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value);
ZEND_API void zend_init_code_execute_data(zend_execute_data *execute_data, zend_op_array *op_array, zval *return_value);
ZEND_API void zend_execute(zend_op_array *op_array, zval *return_value);
ZEND_API void execute_ex(zend_execute_data *execute_data);
ZEND_API void execute_internal(zend_execute_data *execute_data, zval *return_value);
@@ -377,4 +379,6 @@ END_EXTERN_C()
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+119 -169
View File
@@ -100,28 +100,21 @@ static void zend_extension_deactivator(zend_extension *extension) /* {{{ */
}
/* }}} */
static int clean_non_persistent_function(zval *zv) /* {{{ */
static int clean_non_persistent_constant_full(zval *zv) /* {{{ */
{
zend_function *function = Z_PTR_P(zv);
return (function->type == ZEND_INTERNAL_FUNCTION) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE;
zend_constant *c = Z_PTR_P(zv);
return (c->flags & CONST_PERSISTENT) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
}
/* }}} */
ZEND_API int clean_non_persistent_function_full(zval *zv) /* {{{ */
static int clean_non_persistent_function_full(zval *zv) /* {{{ */
{
zend_function *function = Z_PTR_P(zv);
return (function->type == ZEND_INTERNAL_FUNCTION) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
}
/* }}} */
static int clean_non_persistent_class(zval *zv) /* {{{ */
{
zend_class_entry *ce = Z_PTR_P(zv);
return (ce->type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE;
}
/* }}} */
ZEND_API int clean_non_persistent_class_full(zval *zv) /* {{{ */
static int clean_non_persistent_class_full(zval *zv) /* {{{ */
{
zend_class_entry *ce = Z_PTR_P(zv);
return (ce->type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
@@ -153,7 +146,6 @@ void init_executor(void) /* {{{ */
zend_vm_stack_init();
zend_hash_init(&EG(symbol_table), 64, NULL, ZVAL_PTR_DTOR, 0);
EG(valid_symbol_table) = 1;
zend_llist_apply(&zend_extensions, (llist_apply_func_t) zend_extension_activator);
@@ -162,6 +154,7 @@ void init_executor(void) /* {{{ */
EG(ticks_count) = 0;
ZVAL_UNDEF(&EG(user_error_handler));
ZVAL_UNDEF(&EG(user_exception_handler));
EG(current_execute_data) = NULL;
@@ -253,126 +246,116 @@ void shutdown_destructors(void) /* {{{ */
void shutdown_executor(void) /* {{{ */
{
zend_function *func;
zend_class_entry *ce;
zend_try {
/* Removed because this can not be safely done, e.g. in this situation:
Object 1 creates object 2
Object 3 holds reference to object 2.
Now when 1 and 2 are destroyed, 3 can still access 2 in its destructor, with
very problematic results */
/* zend_objects_store_call_destructors(&EG(objects_store)); */
/* Moved after symbol table cleaners, because some of the cleaners can call
destructors, which would use EG(symtable_cache_ptr) and thus leave leaks */
/* while (EG(symtable_cache_ptr)>=EG(symtable_cache)) {
zend_hash_destroy(*EG(symtable_cache_ptr));
efree(*EG(symtable_cache_ptr));
EG(symtable_cache_ptr)--;
}
*/
zend_llist_apply(&zend_extensions, (llist_apply_func_t) zend_extension_deactivator);
if (CG(unclean_shutdown)) {
EG(symbol_table).pDestructor = zend_unclean_zval_ptr_dtor;
}
zend_hash_graceful_reverse_destroy(&EG(symbol_table));
} zend_end_try();
EG(valid_symbol_table) = 0;
zend_try {
zval *zeh;
/* remove error handlers before destroying classes and functions,
* so that if handler used some class, crash would not happen */
if (Z_TYPE(EG(user_error_handler)) != IS_UNDEF) {
zeh = &EG(user_error_handler);
zval_ptr_dtor(zeh);
ZVAL_UNDEF(&EG(user_error_handler));
}
if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) {
zeh = &EG(user_exception_handler);
zval_ptr_dtor(zeh);
ZVAL_UNDEF(&EG(user_exception_handler));
}
zend_stack_clean(&EG(user_error_handlers_error_reporting), NULL, 1);
zend_stack_clean(&EG(user_error_handlers), (void (*)(void *))ZVAL_PTR_DTOR, 1);
zend_stack_clean(&EG(user_exception_handlers), (void (*)(void *))ZVAL_PTR_DTOR, 1);
} zend_end_try();
zend_try {
/* Cleanup static data for functions and arrays.
* We need a separate cleanup stage because of the following problem:
* Suppose we destroy class X, which destroys the class's function table,
* and in the function table we have function foo() that has static $bar.
* Now if an object of class X is assigned to $bar, its destructor will be
* called and will fail since X's function table is in mid-destruction.
* So we want first of all to clean up all data and then move to tables destruction.
* Note that only run-time accessed data need to be cleaned up, pre-defined data can
* not contain objects and thus are not probelmatic */
if (EG(full_tables_cleanup)) {
ZEND_HASH_FOREACH_PTR(EG(function_table), func) {
if (func->type == ZEND_USER_FUNCTION) {
zend_cleanup_op_array_data((zend_op_array *) func);
}
} ZEND_HASH_FOREACH_END();
ZEND_HASH_REVERSE_FOREACH_PTR(EG(class_table), ce) {
if (ce->type == ZEND_USER_CLASS) {
zend_cleanup_user_class_data(ce);
} else {
zend_cleanup_internal_class_data(ce);
}
} ZEND_HASH_FOREACH_END();
} else {
ZEND_HASH_REVERSE_FOREACH_PTR(EG(function_table), func) {
if (func->type != ZEND_USER_FUNCTION) {
break;
}
zend_cleanup_op_array_data((zend_op_array *) func);
} ZEND_HASH_FOREACH_END();
ZEND_HASH_REVERSE_FOREACH_PTR(EG(class_table), ce) {
if (ce->type != ZEND_USER_CLASS) {
break;
}
zend_cleanup_user_class_data(ce);
} ZEND_HASH_FOREACH_END();
zend_cleanup_internal_classes();
}
} zend_end_try();
zend_string *key;
zval *zv;
#if ZEND_DEBUG
zend_bool fast_shutdown = 0;
#else
zend_bool fast_shutdown = is_zend_mm() && !EG(full_tables_cleanup);
#endif
zend_try {
zend_llist_destroy(&CG(open_files));
} zend_end_try();
zend_try {
clean_non_persistent_constants();
} zend_end_try();
zend_try {
zend_close_rsrc_list(&EG(regular_list));
} zend_end_try();
#if ZEND_DEBUG
if (GC_G(gc_enabled) && !CG(unclean_shutdown)) {
gc_collect_cycles();
}
#endif
zend_objects_store_free_object_storage(&EG(objects_store), fast_shutdown);
/* All resources and objects are destroyed. */
/* No PHP callback functions may be called after this point. */
EG(active) = 0;
zend_try {
zend_objects_store_free_object_storage(&EG(objects_store));
zend_llist_apply(&zend_extensions, (llist_apply_func_t) zend_extension_deactivator);
} zend_end_try();
if (fast_shutdown) {
/* Fast Request Shutdown
* =====================
* Zend Memory Manager frees memory by its own. We don't have to free
* each allocated block separately.
*/
ZEND_HASH_REVERSE_FOREACH_VAL(EG(zend_constants), zv) {
zend_constant *c = Z_PTR_P(zv);
if (c->flags & CONST_PERSISTENT) {
break;
}
} ZEND_HASH_FOREACH_END_DEL();
ZEND_HASH_REVERSE_FOREACH_VAL(EG(function_table), zv) {
zend_function *func = Z_PTR_P(zv);
if (func->type == ZEND_INTERNAL_FUNCTION) {
break;
}
} ZEND_HASH_FOREACH_END_DEL();
ZEND_HASH_REVERSE_FOREACH_VAL(EG(class_table), zv) {
zend_class_entry *ce = Z_PTR_P(zv);
if (ce->type == ZEND_INTERNAL_CLASS) {
break;
}
} ZEND_HASH_FOREACH_END_DEL();
} else {
zend_hash_graceful_reverse_destroy(&EG(symbol_table));
#if ZEND_DEBUG
if (GC_G(gc_enabled) && !CG(unclean_shutdown)) {
gc_collect_cycles();
}
#endif
/* remove error handlers before destroying classes and functions,
* so that if handler used some class, crash would not happen */
if (Z_TYPE(EG(user_error_handler)) != IS_UNDEF) {
zval_ptr_dtor(&EG(user_error_handler));
ZVAL_UNDEF(&EG(user_error_handler));
}
if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) {
zval_ptr_dtor(&EG(user_exception_handler));
ZVAL_UNDEF(&EG(user_exception_handler));
}
zend_stack_clean(&EG(user_error_handlers_error_reporting), NULL, 1);
zend_stack_clean(&EG(user_error_handlers), (void (*)(void *))ZVAL_PTR_DTOR, 1);
zend_stack_clean(&EG(user_exception_handlers), (void (*)(void *))ZVAL_PTR_DTOR, 1);
zend_vm_stack_destroy();
/* Destroy all op arrays */
if (EG(full_tables_cleanup)) {
zend_hash_reverse_apply(EG(zend_constants), clean_non_persistent_constant_full);
zend_hash_reverse_apply(EG(function_table), clean_non_persistent_function_full);
zend_hash_reverse_apply(EG(class_table), clean_non_persistent_class_full);
} else {
zend_hash_reverse_apply(EG(function_table), clean_non_persistent_function);
zend_hash_reverse_apply(EG(class_table), clean_non_persistent_class);
ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL(EG(zend_constants), key, zv) {
zend_constant *c = Z_PTR_P(zv);
if (c->flags & CONST_PERSISTENT) {
break;
}
zval_ptr_dtor(&c->value);
if (c->name) {
zend_string_release(c->name);
}
efree(c);
zend_string_release(key);
} ZEND_HASH_FOREACH_END_DEL();
ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL(EG(function_table), key, zv) {
zend_function *func = Z_PTR_P(zv);
if (func->type == ZEND_INTERNAL_FUNCTION) {
break;
}
destroy_op_array(&func->op_array);
zend_string_release(key);
} ZEND_HASH_FOREACH_END_DEL();
ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL(EG(class_table), key, zv) {
zend_class_entry *ce = Z_PTR_P(zv);
if (ce->type == ZEND_INTERNAL_CLASS) {
break;
}
destroy_zend_class(zv);
zend_string_release(key);
} ZEND_HASH_FOREACH_END_DEL();
}
while (EG(symtable_cache_ptr)>=EG(symtable_cache)) {
@@ -380,12 +363,6 @@ void shutdown_executor(void) /* {{{ */
FREE_HASHTABLE(*EG(symtable_cache_ptr));
EG(symtable_cache_ptr)--;
}
} zend_end_try();
zend_try {
#if 0&&ZEND_DEBUG
signal(SIGSEGV, original_sigsegv_handler);
#endif
zend_hash_destroy(&EG(included_files));
@@ -397,9 +374,11 @@ void shutdown_executor(void) /* {{{ */
zend_hash_destroy(EG(in_autoload));
FREE_HASHTABLE(EG(in_autoload));
}
} zend_end_try();
zend_shutdown_fpu();
if (EG(ht_iterators) != EG(ht_iterators_slots)) {
efree(EG(ht_iterators));
}
}
#if ZEND_DEBUG
if (EG(ht_iterators_used) && !CG(unclean_shutdown)) {
@@ -408,11 +387,10 @@ void shutdown_executor(void) /* {{{ */
#endif
EG(ht_iterators_used) = 0;
if (EG(ht_iterators) != EG(ht_iterators_slots)) {
efree(EG(ht_iterators));
}
EG(active) = 0;
zend_cleanup_internal_classes();
zend_shutdown_fpu();
}
/* }}} */
@@ -724,19 +702,18 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
}
if (!fci_cache || !fci_cache->initialized) {
zend_string *callable_name;
char *error = NULL;
if (!fci_cache) {
fci_cache = &fci_cache_local;
}
if (!zend_is_callable_ex(&fci->function_name, fci->object, IS_CALLABLE_CHECK_SILENT, &callable_name, fci_cache, &error)) {
if (!zend_is_callable_ex(&fci->function_name, fci->object, IS_CALLABLE_CHECK_SILENT, NULL, fci_cache, &error)) {
if (error) {
zend_string *callable_name
= zend_get_callable_name_ex(&fci->function_name, fci->object);
zend_error(E_WARNING, "Invalid callback %s, %s", ZSTR_VAL(callable_name), error);
efree(error);
}
if (callable_name) {
zend_string_release(callable_name);
}
if (EG(current_execute_data) == &dummy_execute_data) {
@@ -751,16 +728,12 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
zend_error(E_DEPRECATED, "%s", error);
efree(error);
if (UNEXPECTED(EG(exception))) {
if (callable_name) {
zend_string_release(callable_name);
}
if (EG(current_execute_data) == &dummy_execute_data) {
EG(current_execute_data) = dummy_execute_data.prev_execute_data;
}
return FAILURE;
}
}
zend_string_release(callable_name);
}
func = fci_cache->function_handler;
@@ -769,38 +742,19 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
call = zend_vm_stack_push_call_frame(ZEND_CALL_TOP_FUNCTION | ZEND_CALL_DYNAMIC,
func, fci->param_count, fci_cache->called_scope, fci->object);
if (fci->object &&
(!EG(objects_store).object_buckets ||
!IS_OBJ_VALID(EG(objects_store).object_buckets[fci->object->handle]))) {
zend_vm_stack_free_call_frame(call);
if (EG(current_execute_data) == &dummy_execute_data) {
EG(current_execute_data) = dummy_execute_data.prev_execute_data;
}
return FAILURE;
}
if (func->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) {
if (func->common.fn_flags & ZEND_ACC_ABSTRACT) {
zend_throw_error(NULL, "Cannot call abstract method %s::%s()", ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name));
if (UNEXPECTED(func->common.fn_flags & ZEND_ACC_DEPRECATED)) {
zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
func->common.scope ? ZSTR_VAL(func->common.scope->name) : "",
func->common.scope ? "::" : "",
ZSTR_VAL(func->common.function_name));
if (UNEXPECTED(EG(exception))) {
zend_vm_stack_free_call_frame(call);
if (EG(current_execute_data) == &dummy_execute_data) {
EG(current_execute_data) = dummy_execute_data.prev_execute_data;
}
return FAILURE;
}
if (func->common.fn_flags & ZEND_ACC_DEPRECATED) {
zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
func->common.scope ? ZSTR_VAL(func->common.scope->name) : "",
func->common.scope ? "::" : "",
ZSTR_VAL(func->common.function_name));
if (UNEXPECTED(EG(exception))) {
zend_vm_stack_free_call_frame(call);
if (EG(current_execute_data) == &dummy_execute_data) {
EG(current_execute_data) = dummy_execute_data.prev_execute_data;
}
return FAILURE;
}
}
}
for (i=0; i<fci->param_count; i++) {
@@ -859,7 +813,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
int call_via_handler = (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) != 0;
const zend_op *current_opline_before_exception = EG(opline_before_exception);
zend_init_execute_data(call, &func->op_array, fci->retval);
zend_init_func_execute_data(call, &func->op_array, fci->retval);
zend_execute_ex(call);
EG(opline_before_exception) = current_opline_before_exception;
if (call_via_handler) {
@@ -881,12 +835,6 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
EG(current_execute_data) = call->prev_execute_data;
zend_vm_stack_free_args(call);
/* We shouldn't fix bad extensions here,
because it can break proper ones (Bug #34045)
if (!EX(function_state).function->common.return_reference)
{
INIT_PZVAL(f->retval);
}*/
if (EG(exception)) {
zval_ptr_dtor(fci->retval);
ZVAL_UNDEF(fci->retval);
@@ -1693,7 +1641,7 @@ ZEND_API int zend_set_local_var(zend_string *name, zval *value, int force) /* {{
if (force) {
zend_array *symbol_table = zend_rebuild_symbol_table();
if (symbol_table) {
return zend_hash_update(symbol_table, name, value) ? SUCCESS : FAILURE;;
return zend_hash_update(symbol_table, name, value) ? SUCCESS : FAILURE;
}
}
} else {
@@ -1735,7 +1683,7 @@ ZEND_API int zend_set_local_var_str(const char *name, size_t len, zval *value, i
if (force) {
zend_array *symbol_table = zend_rebuild_symbol_table();
if (symbol_table) {
return zend_hash_str_update(symbol_table, name, len, value) ? SUCCESS : FAILURE;;
return zend_hash_str_update(symbol_table, name, len, value) ? SUCCESS : FAILURE;
}
}
} else {
@@ -1766,4 +1714,6 @@ ZEND_API int zend_forbid_dynamic_call(const char *func_name) /* {{{ */
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+18 -3
View File
@@ -29,8 +29,6 @@ int zend_load_extension(const char *path)
{
#if ZEND_EXTENSIONS_SUPPORT
DL_HANDLE handle;
zend_extension *new_extension;
zend_extension_version_info *extension_version_info;
handle = DL_LOAD(path);
if (!handle) {
@@ -43,6 +41,22 @@ int zend_load_extension(const char *path)
#endif
return FAILURE;
}
return zend_load_extension_handle(handle, path);
#else
fprintf(stderr, "Extensions are not supported on this platform.\n");
/* See http://support.microsoft.com/kb/190351 */
#ifdef ZEND_WIN32
fflush(stderr);
#endif
return FAILURE;
#endif
}
int zend_load_extension_handle(DL_HANDLE handle, const char *path)
{
#if ZEND_EXTENSIONS_SUPPORT
zend_extension *new_extension;
zend_extension_version_info *extension_version_info;
extension_version_info = (zend_extension_version_info *) DL_FETCH_SYMBOL(handle, "extension_version_info");
if (!extension_version_info) {
@@ -62,7 +76,6 @@ int zend_load_extension(const char *path)
return FAILURE;
}
/* allow extension to proclaim compatibility with any Zend version */
if (extension_version_info->zend_extension_api_no != ZEND_EXTENSION_API_NO &&(!new_extension->api_no_check || new_extension->api_no_check(ZEND_EXTENSION_API_NO) != SUCCESS)) {
if (extension_version_info->zend_extension_api_no > ZEND_EXTENSION_API_NO) {
@@ -327,4 +340,6 @@ ZEND_API size_t zend_extensions_op_array_persist(zend_op_array *op_array, void *
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+4 -1
View File
@@ -46,7 +46,7 @@ You can use the following macro to check the extension API version for compatibi
/* The first number is the engine version and the rest is the date (YYYYMMDD).
* This way engine 2/3 API no. is always greater than engine 1 API no.. */
#define ZEND_EXTENSION_API_NO 320160731
#define ZEND_EXTENSION_API_NO 320170718
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
@@ -145,6 +145,7 @@ void zend_shutdown_extensions(void);
BEGIN_EXTERN_C()
ZEND_API int zend_load_extension(const char *path);
ZEND_API int zend_load_extension_handle(DL_HANDLE handle, const char *path);
ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle);
ZEND_API zend_extension *zend_get_extension(const char *extension_name);
ZEND_API size_t zend_extensions_op_array_persist_calc(zend_op_array *op_array);
@@ -159,4 +160,6 @@ END_EXTERN_C()
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+10
View File
@@ -56,3 +56,13 @@ ZEND_API void zend_ensure_fpu_mode(void) /* {{{ */
XPFPA_SWITCH_DOUBLE();
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+10
View File
@@ -418,3 +418,13 @@ END_EXTERN_C()
#endif /* FPU CONTROL */
#endif
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+17 -26
View File
@@ -379,9 +379,7 @@ tail_call:
zend_object_get_gc_t get_gc;
zend_object *obj = (zend_object*)ref;
ZEND_ASSERT(EG(objects_store).object_buckets != NULL);
if (EXPECTED(!(GC_FLAGS(ref) & IS_OBJ_FREE_CALLED) &&
IS_OBJ_VALID(EG(objects_store).object_buckets[obj->handle]) &&
(get_gc = obj->handlers->get_gc) != NULL)) {
int n;
zval *zv, *end;
@@ -491,9 +489,7 @@ tail_call:
zend_object_get_gc_t get_gc;
zend_object *obj = (zend_object*)ref;
ZEND_ASSERT(EG(objects_store).object_buckets != NULL);
if (EXPECTED(!(GC_FLAGS(ref) & IS_OBJ_FREE_CALLED) &&
IS_OBJ_VALID(EG(objects_store).object_buckets[obj->handle]) &&
(get_gc = obj->handlers->get_gc) != NULL)) {
int n;
zval *zv, *end;
@@ -606,9 +602,7 @@ tail_call:
zend_object_get_gc_t get_gc;
zend_object *obj = (zend_object*)ref;
ZEND_ASSERT(EG(objects_store).object_buckets != NULL);
if (EXPECTED(!(GC_FLAGS(ref) & IS_OBJ_FREE_CALLED) &&
IS_OBJ_VALID(EG(objects_store).object_buckets[obj->handle]) &&
(get_gc = obj->handlers->get_gc) != NULL)) {
int n;
zval *zv, *end;
@@ -770,9 +764,7 @@ tail_call:
zend_object_get_gc_t get_gc;
zend_object *obj = (zend_object*)ref;
ZEND_ASSERT(EG(objects_store).object_buckets != NULL);
if (EXPECTED(!(GC_FLAGS(ref) & IS_OBJ_FREE_CALLED) &&
IS_OBJ_VALID(EG(objects_store).object_buckets[obj->handle]) &&
(get_gc = obj->handlers->get_gc) != NULL)) {
int n;
zval *zv, *end;
@@ -964,9 +956,7 @@ tail_call:
zend_object_get_gc_t get_gc;
zend_object *obj = (zend_object*)ref;
ZEND_ASSERT(EG(objects_store).object_buckets != NULL);
if (EXPECTED(!(GC_FLAGS(ref) & IS_OBJ_FREE_CALLED) &&
IS_OBJ_VALID(EG(objects_store).object_buckets[obj->handle]) &&
(get_gc = obj->handlers->get_gc) != NULL)) {
int n;
zval *zv, *end;
@@ -1122,11 +1112,12 @@ ZEND_API int zend_gc_collect_cycles(void)
if (GC_TYPE(p) == IS_OBJECT) {
zend_object *obj = (zend_object*)p;
if (IS_OBJ_VALID(EG(objects_store).object_buckets[obj->handle]) &&
!(GC_FLAGS(obj) & IS_OBJ_DESTRUCTOR_CALLED)) {
if (!(GC_FLAGS(obj) & IS_OBJ_DESTRUCTOR_CALLED)) {
GC_TRACE_REF(obj, "calling destructor");
GC_FLAGS(obj) |= IS_OBJ_DESTRUCTOR_CALLED;
if (obj->handlers->dtor_obj) {
if (obj->handlers->dtor_obj
&& (obj->handlers->dtor_obj != zend_objects_destroy_object
|| obj->ce->destructor)) {
GC_REFCOUNT(obj)++;
obj->handlers->dtor_obj(obj);
GC_REFCOUNT(obj)--;
@@ -1158,21 +1149,19 @@ ZEND_API int zend_gc_collect_cycles(void)
if (GC_TYPE(p) == IS_OBJECT) {
zend_object *obj = (zend_object*)p;
if (IS_OBJ_VALID(EG(objects_store).object_buckets[obj->handle])) {
EG(objects_store).object_buckets[obj->handle] = SET_OBJ_INVALID(obj);
GC_TYPE(obj) = IS_NULL;
if (!(GC_FLAGS(obj) & IS_OBJ_FREE_CALLED)) {
GC_FLAGS(obj) |= IS_OBJ_FREE_CALLED;
if (obj->handlers->free_obj) {
GC_REFCOUNT(obj)++;
obj->handlers->free_obj(obj);
GC_REFCOUNT(obj)--;
}
EG(objects_store).object_buckets[obj->handle] = SET_OBJ_INVALID(obj);
GC_TYPE(obj) = IS_NULL;
if (!(GC_FLAGS(obj) & IS_OBJ_FREE_CALLED)) {
GC_FLAGS(obj) |= IS_OBJ_FREE_CALLED;
if (obj->handlers->free_obj) {
GC_REFCOUNT(obj)++;
obj->handlers->free_obj(obj);
GC_REFCOUNT(obj)--;
}
SET_OBJ_BUCKET_NUMBER(EG(objects_store).object_buckets[obj->handle], EG(objects_store).free_list_head);
EG(objects_store).free_list_head = obj->handle;
p = current->ref = (zend_refcounted*)(((char*)obj) - obj->handlers->offset);
}
SET_OBJ_BUCKET_NUMBER(EG(objects_store).object_buckets[obj->handle], EG(objects_store).free_list_head);
EG(objects_store).free_list_head = obj->handle;
p = current->ref = (zend_refcounted*)(((char*)obj) - obj->handlers->offset);
} else if (GC_TYPE(p) == IS_ARRAY) {
zend_array *arr = (zend_array*)p;
@@ -1223,6 +1212,8 @@ ZEND_API int zend_gc_collect_cycles(void)
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*
* vim:noexpandtab:
*/
+2
View File
@@ -167,4 +167,6 @@ static zend_always_inline void gc_check_possible_root(zend_refcounted *ref)
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+4 -4
View File
@@ -753,15 +753,13 @@ failure:
ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */
{
zend_generator *generator;
zend_generator *generator = zend_generator_get_current(orig_generator);
/* The generator is already closed, thus can't resume */
if (UNEXPECTED(!orig_generator->execute_data)) {
if (UNEXPECTED(!generator->execute_data)) {
return;
}
generator = zend_generator_get_current(orig_generator);
try_again:
if (generator->flags & ZEND_GENERATOR_CURRENTLY_RUNNING) {
zend_throw_error(NULL, "Cannot resume an already running generator");
@@ -1261,4 +1259,6 @@ void zend_register_generator_ce(void) /* {{{ */
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -143,4 +143,6 @@ END_EXTERN_C()
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2 -1
View File
@@ -208,7 +208,6 @@ struct _zend_executor_globals {
struct _zend_module_entry *current_module;
zend_bool active;
zend_bool valid_symbol_table;
zend_uchar flags;
zend_long assertions;
@@ -303,4 +302,6 @@ struct _zend_php_scanner_globals {
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2
View File
@@ -76,4 +76,6 @@ END_EXTERN_C()
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+2 -1
View File
@@ -281,7 +281,6 @@ static uint32_t zend_array_recalc_elements(HashTable *ht)
uint32_t num = ht->nNumOfElements;
ZEND_HASH_FOREACH_VAL(ht, val) {
if (Z_TYPE_P(val) == IS_UNDEF) continue;
if (Z_TYPE_P(val) == IS_INDIRECT) {
if (UNEXPECTED(Z_TYPE_P(Z_INDIRECT_P(val)) == IS_UNDEF)) {
num--;
@@ -2602,4 +2601,6 @@ convert:
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
+61 -4
View File
@@ -772,6 +772,33 @@ static zend_always_inline void *zend_hash_index_find_ptr(const HashTable *ht, ze
}
}
static zend_always_inline zval *zend_hash_index_find_deref(HashTable *ht, zend_ulong h)
{
zval *zv = zend_hash_index_find(ht, h);
if (zv) {
ZVAL_DEREF(zv);
}
return zv;
}
static zend_always_inline zval *zend_hash_find_deref(HashTable *ht, zend_string *str)
{
zval *zv = zend_hash_find(ht, str);
if (zv) {
ZVAL_DEREF(zv);
}
return zv;
}
static zend_always_inline zval *zend_hash_str_find_deref(HashTable *ht, const char *str, size_t len)
{
zval *zv = zend_hash_str_find(ht, str, len);
if (zv) {
ZVAL_DEREF(zv);
}
return zv;
}
static zend_always_inline void *zend_symtable_str_find_ptr(HashTable *ht, const char *str, size_t len)
{
zend_ulong idx;
@@ -800,8 +827,9 @@ static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht,
zend_hash_get_current_data_ptr_ex(ht, &(ht)->nInternalPointer)
#define ZEND_HASH_FOREACH(_ht, indirect) do { \
Bucket *_p = (_ht)->arData; \
Bucket *_end = _p + (_ht)->nNumUsed; \
HashTable *__ht = (_ht); \
Bucket *_p = __ht->arData; \
Bucket *_end = _p + __ht->nNumUsed; \
for (; _p != _end; _p++) { \
zval *_z = &_p->val; \
if (indirect && Z_TYPE_P(_z) == IS_INDIRECT) { \
@@ -810,9 +838,10 @@ static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht,
if (UNEXPECTED(Z_TYPE_P(_z) == IS_UNDEF)) continue;
#define ZEND_HASH_REVERSE_FOREACH(_ht, indirect) do { \
HashTable *__ht = (_ht); \
uint32_t _idx; \
for (_idx = (_ht)->nNumUsed; _idx > 0; _idx--) { \
Bucket *_p = (_ht)->arData + _idx - 1; \
for (_idx = __ht->nNumUsed; _idx > 0; _idx--) { \
Bucket *_p = __ht->arData + (_idx - 1); \
zval *_z = &_p->val; \
if (indirect && Z_TYPE_P(_z) == IS_INDIRECT) { \
_z = Z_INDIRECT_P(_z); \
@@ -823,6 +852,27 @@ static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht,
} \
} while (0)
#define ZEND_HASH_FOREACH_END_DEL() \
__ht->nNumOfElements--; \
do { \
uint32_t j = HT_IDX_TO_HASH(_idx - 1); \
uint32_t nIndex = _p->h | __ht->nTableMask; \
uint32_t i = HT_HASH(__ht, nIndex); \
if (j != i) { \
Bucket *prev = HT_HASH_TO_BUCKET(__ht, i); \
while (Z_NEXT(prev->val) != j) { \
i = Z_NEXT(prev->val); \
prev = HT_HASH_TO_BUCKET(__ht, i); \
} \
Z_NEXT(prev->val) = Z_NEXT(_p->val); \
} else { \
HT_HASH(__ht, nIndex) = Z_NEXT(_p->val); \
} \
} while (0); \
} \
__ht->nNumUsed = _idx; \
} while (0)
#define ZEND_HASH_FOREACH_BUCKET(ht, _bucket) \
ZEND_HASH_FOREACH(ht, 0); \
_bucket = _p;
@@ -911,6 +961,11 @@ static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht,
ZEND_HASH_REVERSE_FOREACH(ht, 1); \
_val = _z;
#define ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL(ht, _key, _val) \
ZEND_HASH_REVERSE_FOREACH(ht, 0); \
_key = _p->key; \
_val = _z;
#define ZEND_HASH_REVERSE_FOREACH_KEY_VAL(ht, _h, _key, _val) \
ZEND_HASH_REVERSE_FOREACH(ht, 0); \
_h = _p->h; \
@@ -1032,4 +1087,6 @@ static zend_always_inline void _zend_hash_append_ind(HashTable *ht, zend_string
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
Loaded 100 of 722 files, more files were not shown because too many files have changed in this diff. Show more