Compare commits

...
340 Commits
Author SHA1 Message Date
Joe Watkins 5c34a30bdb Revert "fixed bug #50989 (DOM support for LIBXML_NOXMLDECL)"
This reverts commit 2fcf1259c6.
2017-02-01 19:18:18 +00:00
Joe Watkins 8a0c388e11 Revert "fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454)"
This reverts commit 62938bf088.
2017-02-01 19:17:50 +00:00
Joe Watkins 49e9ae1fc1 Revert "Inheritance checks should not ignore parents if these implement an interface"
This reverts commit b67eb3440b.
2017-02-01 18:35:33 +00:00
Joe Watkins 76b2f2ff5d Revert "Added tests demonstrating the same effect with abstracts"
This reverts commit c11b2b809d.
2017-02-01 18:35:03 +00:00
Remi Collet d699a81277 fix test for 32bits (int -> float) 2017-02-01 11:19:39 +00:00
Joe Watkins 892f2e5120 prepare 7.1.2RC1 2017-01-31 12:44:09 +00:00
Joe Watkins 390134e6c5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  removed additional ";" from run-tests.php
2017-01-31 05:36:16 +00:00
Rodrigo Prado 543141ae3b removed additional ";" from run-tests.php 2017-01-31 05:35:58 +00:00
Anatol Belski 6a8e7d5408 update NEWS 2017-01-30 22:35:46 +01:00
Anatol Belski 7a89dd8067 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update NEWS
2017-01-30 22:35:14 +01:00
Anatol Belski f39cabe610 update NEWS 2017-01-30 22:34:14 +01:00
Sara Golemon 3475c0c035 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Securely zero the hash context key
2017-01-30 09:02:42 -08:00
Sara Golemon bf0f53270f Securely zero the hash context key 2017-01-30 08:57:17 -08:00
Anatol Belski de64adeb1d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73983 crash on finish work with phar in cli + opcache
2017-01-30 12:46:11 +01:00
Anatol Belski 368958b3e4 Fixed bug #73983 crash on finish work with phar in cli + opcache
The file_cache_only option causes the storage to be per process,
furthermore the arena is destroyed per request. Thus, zend_string's
can't survive between request and the permanent flag should not
be set. This is already done with the file cache part, but the
persistency part is used in various scenarios and should respect
this case as well. In this particular bug, the pcre pattern cache
needs to survive between requests and uses pattern strings as hash
keys. One more case relevant here would be various situations where
the flow disables the use of shared memory.
2017-01-30 12:44:21 +01:00
Joe Watkins e6bc4f39a2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454)
2017-01-30 11:26:37 +00:00
Joe Watkins dd227c2b23 Merge branch 'pull-request/2348' into PHP-7.0
* pull-request/2348:
  fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454)
2017-01-30 11:26:02 +00:00
jhdxr 62938bf088 fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454) 2017-01-30 11:25:04 +00:00
Anatol Belski f2c99e201e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  move id initialization into ctor
2017-01-30 11:41:59 +01:00
Anatol Belski 4b1afc829c move id initialization into ctor 2017-01-30 11:40:23 +01:00
Anatol Belski 2a5a310446 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix system id initialization for multiple threads
2017-01-30 01:57:27 +01:00
Anatol Belski 2b7e5468c9 fix system id initialization for multiple threads 2017-01-30 01:54:36 +01:00
Jakub Zelenka 1dab39b9aa Merge branch 'PHP-7.0' into PHP-7.1 2017-01-29 20:44:51 +00:00
Jakub Zelenka df16579642 Try fpm path for testing in sbin as it is default target 2017-01-29 20:43:58 +00:00
Joe Watkins 366f838483 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fixed bug #50989 (DOM support for LIBXML_NOXMLDECL)
2017-01-28 08:27:53 +00:00
jhdxr 2fcf1259c6 fixed bug #50989 (DOM support for LIBXML_NOXMLDECL) 2017-01-28 08:27:05 +00:00
Joe Watkins 19fff2ece6 [ci skip] news entry for Fixed bug #73987 2017-01-28 06:46:43 +00:00
Pedro Magalhães c11b2b809d Added tests demonstrating the same effect with abstracts 2017-01-28 06:28:14 +00:00
Pedro Magalhães b67eb3440b Inheritance checks should not ignore parents if these implement an interface 2017-01-28 06:28:10 +00:00
Joe Watkins bf914ff75a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix 00version.phpt when commit message has multiple lines.
2017-01-26 11:36:36 +00:00
Mitch Hagstrand a3d3f76827 Fix 00version.phpt when commit message has multiple lines.
The environment variable "TRAVIS_COMMIT_MESSAGE" can contain multiple lines.

An example can be seen here https://travis-ci.org/php/php-src/jobs/195465293
2017-01-26 11:36:24 +00:00
Joe Watkins 2d339fa4d1 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #73973 - debug_zval_dump() assertion error for resource consts with --enable-debug
2017-01-26 09:04:25 +00:00
andrewnester f65ae82c55 Fixed #73973 - debug_zval_dump() assertion error for resource consts with --enable-debug 2017-01-26 09:03:47 +00:00
Joe Watkins 76a7470160 Fixed bug #73994 incorrect arginfo for unpack 2017-01-26 06:58:08 +00:00
Joe Watkins e5a6de6b9d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] news entry for PR #2337
2017-01-26 05:51:35 +00:00
Joe Watkins a15c1990eb [ci skip] news entry for PR #2337 2017-01-26 05:50:46 +00:00
Joe Watkins f6f2855ecd Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #54382 (getAttributeNodeNS doesn't get xmlns* attributes)
  Added (failing) testcase for bug #54382
2017-01-25 20:59:37 +00:00
Arnout Boks 721a189742 Fix bug #54382 (getAttributeNodeNS doesn't get xmlns* attributes)
The fix is based on the same strategy for handling namespace
declarations as used by getAttributeNode. Note that this strategy makes
these methods not return a DOMAttr for xmlns* attributes, but an
instance of the (undocumented) class DOMNameSpaceNode. This is not
really ideal, but at least this fix makes the behavior of
getAttributeNode and getAttributeNodeNS consistent.

A follow-up action would be to investigate whether DOMNameSpaceNode can
be made into a subclass of DOMAttr (which may be hard due to the way
libxml treats namespace declarations) or document this deviating return
value for xmlns* attributes.
2017-01-25 20:59:25 +00:00
Arnout Boks 737ee0661c Added (failing) testcase for bug #54382 2017-01-25 20:59:23 +00:00
Jakub Zelenka 519b0dc886 Fix bug #73978 (openssl_decrypt triggers bug in PDO) 2017-01-25 19:55:05 +00:00
Bob Weinand d0272ef1ef Merge branch 'PHP-7.0' into PHP-7.1 2017-01-25 13:01:10 +01:00
Bob Weinand c44efbbbb1 Fix copying too much leading to potential segfault 2017-01-25 13:00:48 +01:00
Anatol Belski ec78507bd4 dirname() should not normalize paths
This is the BC piece with the case where dirname() is used with an URL.
2017-01-24 17:56:00 +01:00
Anatol Belski 403f352482 make length check more robust 2017-01-24 13:24:11 +01:00
Joe Watkins 9aad38038e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix Bug #69865 php-fpm does not close stderr when using syslog
2017-01-23 16:56:08 +00:00
Michael Wallner 80a851b4dd Fix Bug #69865 php-fpm does not close stderr when using syslog 2017-01-23 16:55:15 +00:00
Antony Dovgal 9d7054693e use correct shift and fix slowlog bt in 7.1 2017-01-23 14:50:09 +03:00
Joe Watkins 5589df128c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  move decl to correct place
2017-01-23 05:34:21 +00:00
Joe Watkins d636467937 move decl to correct place 2017-01-23 05:33:58 +00:00
Joe Watkins 8bda542064 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #73969 - Fixed segmentation fault when debug_print_backtrace called
2017-01-22 16:11:57 +00:00
andrewnester 6f912f7c04 Fixed #73969 - Fixed segmentation fault when debug_print_backtrace called 2017-01-22 16:11:25 +00:00
Christoph M. Becker 4af464a0df Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add regression test for bug #47946
2017-01-22 15:02:59 +01:00
Christoph M. Becker 71efe9d8fd Add regression test for bug #47946
This bug had already been fixed, but apparently there's no regression
test yet, so we add one.

Note that the expected image has black pixel artifacts, which are
another issue (perhaps bug #40158), and would have to be adressed
separately.
2017-01-22 15:01:01 +01:00
Joe Watkins 55393e26a5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix intermittent segfault in GD library
2017-01-22 06:41:07 +00:00
Mitch Hagstrand e56fe7e5e7 Fix intermittent segfault in GD library
The gdIOCtx struct should be zero filled with ecalloc.
emalloc does not zero fill the struct.
2017-01-22 06:40:55 +00:00
Christoph M. Becker 722375c603 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add myself as primary maintainer of GD
2017-01-21 18:53:43 +01:00
Christoph M. Becker 42d53f3bc0 Add myself as primary maintainer of GD 2017-01-21 18:52:34 +01:00
Christoph M. Becker 7a2497b2c5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix #73968: Premature failing of XBM reading
2017-01-21 13:18:54 +01:00
Christoph M. Becker f67d599a01 Fix #73968: Premature failing of XBM reading
We must take into account the line padding, when we're reading XBM
files.

We deliberately ignore the potential integer overflow here, because
that would be caught by gdImageCreate() or even earlier if `bytes==0`,
what happens in libgd00094.phpt which we adapt accordingly.
2017-01-21 13:04:36 +01:00
Joe Watkins 1ff27053f9 Fix bug #73961 environmental build dependency in hash sha3 source 2017-01-21 07:45:28 +00:00
Anatol Belski 3020be675a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  backport 51e1da6ea1 into 7.0
2017-01-21 02:57:54 +01:00
Anatol Belski 8da8756312 backport 51e1da6ea1 into 7.0 2017-01-21 02:56:15 +01:00
Anatol Belski 51e1da6ea1 exclude debug code 2017-01-21 02:17:06 +01:00
Anatol Belski 6b6122a957 ensure the string for conversion is \0 terminated and integrade
additional path length check
2017-01-21 02:11:24 +01:00
Anatol Belski 95406c878a Fixed bug #73962 bug with symlink related to cyrillic directory 2017-01-20 23:45:08 +01:00
Joe Watkins d6feb2edbd Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #73959 - lastInsertId fails to throw an exception in pdsql
2017-01-20 20:11:49 +00:00
andrewnester 21ac79e94b Fixed #73959 - lastInsertId fails to throw an exception in pdsql 2017-01-20 20:10:55 +00:00
Remi Collet d6c9f91e2e NEWS 2017-01-20 17:46:41 +01:00
Remi Collet 7ea7d3d829 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  NEWS
  Fixed bug #73965 DTrace reported as enabled when disabled
2017-01-20 17:46:24 +01:00
Remi Collet 2e3d68ed1b NEWS 2017-01-20 17:46:11 +01:00
Remi Collet f81b7df618 Fixed bug #73965 DTrace reported as enabled when disabled 2017-01-20 17:45:15 +01:00
SjonHortensius 631861e1fa Update comment, incorrect since 224aaf94
In 224aaf94; the warning was enabled; making the comment above incorrect. I've updated the comment to reflect the current code
2017-01-19 10:48:54 +00:00
Xinchen Hui 5e09031144 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed another part in ldap (bug #73933)
2017-01-19 12:23:56 +08:00
Xinchen Hui cad2598fcb Fixed another part in ldap (bug #73933) 2017-01-19 12:23:23 +08:00
Ferenc Kovacs 2efb63bf00 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-19 01:22:10 +01:00
Ferenc Kovacs 8c75dbc498 Merge branch 'PHP-5.6' into PHP-7.0 2017-01-19 01:20:57 +01:00
Ferenc Kovacs cf649f59cb update NEWS 2017-01-19 01:16:31 +01:00
Nikita Popov fec3a65ba4 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-18 21:20:00 +01:00
Mitch Hagstrand 8ba6d622e5 Removing zmemcheck from .gdbinit
It doesn't seem to make sense anymore
2017-01-18 21:19:48 +01:00
Joe Watkins 6d89640d55 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #73949 leak in mysqli_fetch_object
2017-01-18 18:23:59 +00:00
Joe Watkins f9226f9bf3 Fix bug #73949 leak in mysqli_fetch_object 2017-01-18 18:22:57 +00:00
Joe Watkins bbe21ccf38 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Remove remnants of TSMRLS_* macro calls
2017-01-18 17:46:11 +00:00
Thomas Punt fb8486f3bd Remove remnants of TSMRLS_* macro calls 2017-01-18 17:42:45 +00:00
Joe Watkins bce548d8e6 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  DNS CAA record type implementation and tests for https://bugs.php.net/bug.php?id=73850
2017-01-18 17:23:29 +00:00
Marcus Bointon 280e9cb28d DNS CAA record type implementation and tests for https://bugs.php.net/bug.php?id=73850 2017-01-18 17:23:08 +00:00
Leigh 85589ca660 Add php_openssl_store_errors to bailouts 2017-01-18 15:02:52 +00:00
Leigh d2f07edf71 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-18 14:47:49 +00:00
Leigh e7e96fe2e0 Change free to OPENSSL_free 2017-01-18 14:45:41 +00:00
Remi Collet 7673c9847b NEWS 2017-01-18 13:02:33 +01:00
Remi Collet 2ce8a4cf87 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  NEWS
  Fix #73956 Link use CC instead of CXX
2017-01-18 13:02:19 +01:00
Remi Collet 6af7753e36 NEWS 2017-01-18 13:02:03 +01:00
Remi Collet 6af22d0d3e Fix #73956 Link use CC instead of CXX 2017-01-18 13:00:49 +01:00
Thomas Punt 9977bdf9b3 Remove more TSRMLS_CC macros 2017-01-18 10:00:15 +00:00
Joe Watkins 43612e9593 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix ce comparison
2017-01-18 05:06:07 +00:00
Thomas Punt a22f181736 Fix ce comparison 2017-01-18 05:05:53 +00:00
Joe Watkins 4edaa3f1e7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  updates to release docs
2017-01-17 20:33:44 +00:00
Joe Watkins e00c2f335c updates to release docs 2017-01-17 20:33:25 +00:00
Joe Watkins 13e6dacb6b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixes in .gdbinit for ZE 3
2017-01-17 17:07:53 +00:00
Mitch Hagstrand db894fa6aa Fixes in .gdbinit for ZE 3
1. Fixed print_pi function
2. Fixed printing properties in ____printzv_contents
3. Added optional max length parameter in ____print_str
2017-01-17 17:07:31 +00:00
Anatol Belski 1e225a6115 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] sync NEWS
2017-01-17 10:57:56 +01:00
Anatol Belski 3f960255f4 [ci skip] sync NEWS 2017-01-17 10:56:17 +01:00
Anatol Belski cea050b8da Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix #73869: Signed Integer Overflow gd_io.c
  Fix #73868: DOS vulnerability in gdImageCreateFromGd2Ctx()
2017-01-17 09:35:26 +01:00
Anatol Belski 5d07438cb3 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix #73869: Signed Integer Overflow gd_io.c
  Fix #73868: DOS vulnerability in gdImageCreateFromGd2Ctx()
2017-01-17 09:33:51 +01:00
Christoph M. Becker d2274b01cb Fix #73869: Signed Integer Overflow gd_io.c
GD2 stores the number of horizontal and vertical chunks as words (i.e. 2
byte unsigned). These values are multiplied and assigned to an int when
reading the image, what can cause integer overflows. We have to avoid
that, and also make sure that either chunk count is actually greater
than zero. If illegal chunk counts are detected, we bail out from
reading the image.

(cherry picked from commit 5b5d9db3988b829e0b121b74bb3947f01c2796a1)
2017-01-17 09:30:58 +01:00
Christoph M. Becker f1b2afc9d9 Fix #73868: DOS vulnerability in gdImageCreateFromGd2Ctx()
We must not pretend that there are image data if there are none. Instead
we fail reading the image file gracefully.

(cherry picked from commit cdb648dc4115ce0722f3cc75e6a65115fc0e56ab)
2017-01-17 09:30:43 +01:00
Xinchen Hui abe094dde8 Update NEWS 2017-01-17 15:35:29 +08:00
Xinchen Hui e180e45a18 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73933 (error/segfault with ldap_mod_replace and opcache)
2017-01-17 15:35:06 +08:00
Xinchen Hui b28c2e20ca Fixed bug #73933 (error/segfault with ldap_mod_replace and opcache) 2017-01-17 15:34:19 +08:00
Stanislav Malyshev 05f2f730e6 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #73648 - integer overflow in substr
2017-01-16 12:14:03 -08:00
Stanislav Malyshev d1d002fc4d Fix bug #73648 - integer overflow in substr 2017-01-16 12:11:50 -08:00
Nikita Popov 29433f9fd5 Make unserialize() ref unwrapping compatible with 7.0
Also fix output difference in merged test (unrelated).
2017-01-16 14:25:58 +01:00
Nikita Popov 590ef15f6a Merge branch 'PHP-7.0' into PHP-7.1 2017-01-16 14:12:10 +01:00
Nikita Popov e0ca519a8b Merge branch 'PHP-5.6' into PHP-7.0 2017-01-16 14:11:41 +01:00
Nikita Popov 6477bb724e Add additional serialize tests for fixed bugs
These have been fixed as a side-effect of the delayed __wakeup
patch.
2017-01-16 13:24:13 +01:00
Stanislav Malyshev 34d6b63501 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #73634 - grapheme_strpos illegal memory access
  Fix typo
2017-01-16 01:18:50 -08:00
Stanislav Malyshev 6736527aeb Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix typo
2017-01-16 01:18:38 -08:00
Stanislav Malyshev 8c44d07fd4 Fix bug #73634 - grapheme_strpos illegal memory access 2017-01-16 01:18:16 -08:00
Stanislav Malyshev 50b38322b9 Fix typo 2017-01-16 00:23:06 -08:00
Joe Watkins bac4c97602 Fix bug #73939 memory allocation in signal handler when HAVE_STRUCT_SIGINFO_T 2017-01-16 04:32:27 +00:00
Joe Watkins d11bed5909 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add test ini_set with invalid time zone
2017-01-16 04:13:26 +00:00
Niklas Keller cc9893eb44 Add test ini_set with invalid time zone
Wasn't covered before according to gcov.php.net.
2017-01-16 04:13:01 +00:00
Stanislav Malyshev ca6f679417 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix test
2017-01-15 18:42:44 -08:00
Stanislav Malyshev 2c7909697a Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix test
2017-01-15 18:42:33 -08:00
Stanislav Malyshev 814966ad33 Fix test 2017-01-15 18:42:22 -08:00
Stanislav Malyshev 19e80ef496 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Update more functions with path check
2017-01-15 17:32:37 -08:00
Stanislav Malyshev 43d0f2abc5 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Update more functions with path check
2017-01-15 17:32:26 -08:00
Stanislav Malyshev 0ab1af7d3e Update more functions with path check 2017-01-15 17:31:08 -08:00
Anatol Belski bd0569e287 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix AppVeyor failures with Opcache enabled
2017-01-15 21:18:48 +01:00
Anatol Belski 4f19bb7af6 fix AppVeyor failures with Opcache enabled
opcache_reset() only schedules the restart. Under circumstances,
the follow up requests might run uncached, until the restart
condition is met. To mitigate the false positives caused by this
behavior, any tests using opcache_reset() should not be put in
between other tests. Thus, moving the corresponding test to be
executed last.
2017-01-15 21:13:15 +01:00
Nikita Popov 6674f81027 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-14 14:13:42 +01:00
Yordan Gigov 60aff0bd30 Fixed bug #69993 2017-01-14 14:13:15 +01:00
Tom Sommer e77a1dbe40 Fix bug #69061
Make mail.log append correct PHP_EOL and remove timestamp when
sending to syslog.
2017-01-14 13:53:09 +01:00
Andrey Andreev 4bf7ef0806 Add hash_hkdf() 2017-01-14 13:28:21 +01:00
Joe Watkins 687b02789e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Added test for "opcache: print restart reason" to basic_logging.phpt
2017-01-14 07:33:08 +00:00
Mitch Hagstrand fbf655afbd Added test for "opcache: print restart reason" to basic_logging.phpt 2017-01-14 07:32:55 +00:00
Alexander Polyakov a4accc0e3e opcache: print restart reason 2017-01-13 21:34:11 +00:00
Alexander Polyakov d79b82d8ae opcache: print restart reason 2017-01-13 21:33:58 +00:00
Anatol Belski 929819aaac Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix remaining tests for Opcache runs
2017-01-13 17:21:01 +01:00
Anatol Belski aaaef22db6 fix remaining tests for Opcache runs
The fail reason here is the TMP change while both top and test
run same binary with opcache enabled.
2017-01-13 17:16:15 +01:00
Anatol Belski a7b20894e5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  ensure the end path wouldn't contain double slashes
2017-01-13 16:54:10 +01:00
Anatol Belski 8e993b427c ensure the end path wouldn't contain double slashes 2017-01-13 16:50:05 +01:00
Anatol Belski 2ae5f2d1a5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  templatize the resource number
2017-01-13 15:48:33 +01:00
Anatol Belski 3500262b7d templatize the resource number 2017-01-13 15:45:35 +01:00
Anatol Belski e7c3f44958 refix test 2017-01-13 15:31:10 +01:00
Anatol Belski 8d1aab2aee fix test
Same as before actulaly - the host process running with Opcache
enabled, all the intermediate scripts land in cache. So the count
can be variable, maybe even better to just test for > 0.
2017-01-13 14:40:31 +01:00
Anatol Belski 527bf4d8e6 Fix test runs with Opcache enabled PHP on top
Writing to the same file, while it's cached, is an issue.
2017-01-13 14:37:37 +01:00
Joe Watkins 19363de12f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Increase wait time for tests involving sockets to improve Travis relability
2017-01-13 06:45:17 +00:00
Mitch Hagstrand fd92b91188 Increase wait time for tests involving sockets to improve Travis relability
1. Increased sleep time from 25ms to 50ms
2. Added sleep to shutdown handlers
2017-01-13 06:45:04 +00:00
Xinchen Hui b25be216c1 Remove redundant reference handling 2017-01-13 13:05:22 +08:00
Xinchen Hui 18f4ff4131 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73916 (zend_print_flat_zval_r doesn't consider reference)
2017-01-13 13:04:53 +08:00
Xinchen Hui 04379bcb1d Fixed bug #73916 (zend_print_flat_zval_r doesn't consider reference) 2017-01-13 13:04:37 +08:00
Anatol Belski e6632ce377 update NEWS 2017-01-12 22:45:18 +01:00
Anatol Belski aacba43056 Fixed #72898 PHP_FCGI_CHILDREN is not included in phpinfo() 2017-01-12 22:06:03 +01:00
Nikita Popov da5e09ad03 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-12 21:15:57 +01:00
rfussenegger bd75f9e613 Fix bug #69899 2017-01-12 21:13:39 +01:00
Anatol Belski af2de536d3 update NEWS 2017-01-12 18:59:36 +01:00
Leigh 4f7b498d12 Fixed bug #73374
Add "0b" prefix detection to intval($str, 0). The implementation
is relatively complicated because we need to handle whitespace and
sign.
2017-01-12 18:53:28 +01:00
Anatol Belski e65760f878 Fixed bug #73904 php-cgi fails to load -c specified php.ini file 2017-01-12 17:25:26 +01:00
Mitch Hagstrand 1ee1f79e27 Fixed bug #72680 gdbinit print_cvs not prepared for PHP 7 2017-01-12 09:10:12 +00:00
Joe Watkins 6fbd61a819 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  added a note to opache.fast_shutdown why its not enabled by default in php.ini
2017-01-11 11:18:26 +00:00
Markus Staab ef42f49470 added a note to opache.fast_shutdown why its not enabled by default in php.ini 2017-01-11 11:18:10 +00:00
Joe Watkins b2782c6dc5 Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src:
  Fixed bug #67707 IV not needed for ECB encryption mode, but it returns a warning
  Fixed #73907 (nextSibling property not included in var_dump of DOMNode)
  Fixed bug #61858 (DOMAttr debug info generates E_WARNING)
  Fix glob-wrapper.phpt to not fail in Windows
  Fix #73893: A hidden danger of death cycle in a function of gd
2017-01-11 08:12:51 +00:00
Joe Watkins 6d797630ab Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1
* 'PHP-7.1' of git.php.net:/php-src:
  Fixed bug #67707 IV not needed for ECB encryption mode, but it returns a warning
  Add support for "xfail" to phpt SKIPIF sections
  Fixed #73907 (nextSibling property not included in var_dump of DOMNode)
  Fixed bug #61858 (DOMAttr debug info generates E_WARNING)
  Fix glob-wrapper.phpt to not fail in Windows
  Set a session path for this test
  Fix #73893: A hidden danger of death cycle in a function of gd
  Missing %s
  Ok, maybe Nikita is right. We should default this on.
  Missed one. This needs gc as well
  These tests expect gc to be enabled
2017-01-11 08:12:40 +00:00
Joe Watkins d5553b97d2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #71219 configure script incorrectly checks for ttyname_r
2017-01-11 08:10:47 +00:00
Joe Watkins 51d487786c Fixed bug #71219 configure script incorrectly checks for ttyname_r 2017-01-11 08:09:10 +00:00
Nikita Popov 5999874886 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-10 23:44:45 +01:00
Robrecht Plaisier d9cd2876d9 Fixed bug #67707 IV not needed for ECB encryption mode, but it returns a warning 2017-01-10 23:42:44 +01:00
Nikita Popov 5cee9dfe9a Add support for "xfail" to phpt SKIPIF sections
If SKIPIF output starts with "xfail" instead of "skip", the test
will be marked as XFAIL with the following message. Example:

    --TEST--
    Test xfailif feature
    --SKIPIF--
    <?php
    if (some_cond()) die('xfail Expected to fail!');
    ?>
    --FILE--
    ...
2017-01-10 23:32:03 +01:00
Nikita Popov 908ad3cc80 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-10 23:29:43 +01:00
Arnout Boks 13edec75a3 Fixed #73907 (nextSibling property not included in var_dump of DOMNode) 2017-01-10 23:29:02 +01:00
Nikita Popov 79c0cef8ca Merge branch 'PHP-7.0' into PHP-7.1 2017-01-10 23:25:07 +01:00
Arnout Boks 07340553a5 Fixed bug #61858 (DOMAttr debug info generates E_WARNING)
It seems fair to remove this warning, given that:

* it is not documented in the official documentation
* the $specified property, which has a similar 'not implemented' status,
  also does not trigger a warning
* it apparently hinders quite a lot of people during debugging, judging by
  the number of votes on the bug
2017-01-10 23:24:34 +01:00
Nikita Popov d1bb306530 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-10 23:19:30 +01:00
Nikita Popov 291e3f0762 Merge branch 'PHP-5.6' into PHP-7.0 2017-01-10 23:19:19 +01:00
Mitch Hagstrand ad9c552b12 Fix glob-wrapper.phpt to not fail in Windows 2017-01-10 23:18:52 +01:00
Rasmus Lerdorf c7ef178e86 Set a session path for this test 2017-01-10 15:18:26 -05:00
Christoph M. Becker fc46003666 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix #73893: A hidden danger of death cycle in a function of gd
2017-01-10 20:13:16 +01:00
Christoph M. Becker 15837bab8c Fix #73893: A hidden danger of death cycle in a function of gd
We remove the unused, but potentially dangerous functions.
2017-01-10 19:52:06 +01:00
Rasmus Lerdorf 9fce263f3b Missing %s 2017-01-10 13:50:49 -05:00
Rasmus Lerdorf 08c7ff0df4 Ok, maybe Nikita is right. We should default this on. 2017-01-10 12:16:45 -05:00
Rasmus Lerdorf ffd870f63d Missed one. This needs gc as well 2017-01-10 12:07:47 -05:00
Rasmus Lerdorf 47fcb75a90 These tests expect gc to be enabled 2017-01-10 11:54:49 -05:00
Joe Watkins 3c23d1b6d5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  pull-request/1807: 	test for dns_get_record
2017-01-10 13:56:49 +00:00
Joe Watkins 6a9efa2d3e Merge branch 'pull-request/1807' into PHP-7.0
* pull-request/1807:
  test for dns_get_record
2017-01-10 13:56:26 +00:00
marcosptf dcaed51ba0 pull-request/1807:
test for dns_get_record
2017-01-10 13:55:31 +00:00
Joe Watkins 4cddc85c1f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Prevent fd leak in readdir_r that causes false negative on readdir_r implementation when compiled with AddressSanitizer
2017-01-10 11:51:39 +00:00
Ondřej Surý 1bdffee820 Prevent fd leak in readdir_r that causes false negative on readdir_r implementation when compiled with AddressSanitizer 2017-01-10 11:51:27 +00:00
Joe Watkins aadc84f6f7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #73902 mention router support in usage output for php-cli
2017-01-10 06:20:56 +00:00
Joe Watkins 125ee6a68e Fixed #73902 mention router support in usage output for php-cli 2017-01-10 06:19:34 +00:00
Sara Golemon 005ba2001d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix open_basedir check for glob:// opendir wrapper
2017-01-09 16:08:08 -08:00
Sara Golemon 69fbe3a9ad Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix open_basedir check for glob:// opendir wrapper
2017-01-09 16:07:33 -08:00
Nikita Popov 9cc34c4e3e Merge branch 'PHP-7.0' into PHP-7.1 2017-01-10 00:09:02 +01:00
Nikita Popov 69058f35f8 Un-XFAIL serialization test 2017-01-10 00:07:38 +01:00
Nikita Popov aab3f784d0 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-09 23:29:33 +01:00
Leigh 14c72cc582 Fix check for linux getrandom syscall 2017-01-09 23:29:07 +01:00
Nikita Popov 61af3ed38a Merge branch 'PHP-7.0' into PHP-7.1 2017-01-09 23:22:59 +01:00
Mitch Hagstrand 9ad3413190 Add print zend string function to gdbinit 2017-01-09 23:22:49 +01:00
Nikita Popov 4d18591e59 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-09 23:20:29 +01:00
Dmitry Stogov 9a159f37e1 Improved GENERATOR_CREATE opcode handler. 2017-01-09 22:24:21 +03:00
Sara Golemon 7e49e8e797 Fix open_basedir check for glob:// opendir wrapper
php_check_open_basedir() expects a local filesystem path,
but we're handing it a `glob://...` URI instead.

Move the check to after the path trim so that we're checking
a meaningful pathspec.
2017-01-09 11:02:50 -08:00
Joe Watkins 28f2959b83 Revert "set more suitable defaults for opcache in ini and code"
This reverts commit b655f2d632.

This has been deemed unsuitable for 7.0
2017-01-09 17:08:07 +00:00
Joe Watkins c2f25bd188 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update release process notes
2017-01-09 16:21:21 +00:00
Joe Watkins f1ad170a15 update release process notes 2017-01-09 16:20:48 +00:00
Joe Watkins c6ba284496 Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1
* 'PHP-7.1' of git.php.net:/php-src:
  Fixed bug #73896 (spl_autoload() crashes when calls magic _call())
2017-01-09 15:59:40 +00:00
Joe Watkins add4f43f0e Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src:
  Fixed bug #73896 (spl_autoload() crashes when calls magic _call())
2017-01-09 15:59:21 +00:00
Joe Watkins 2992f4164d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix stub to accept user properly
2017-01-09 15:58:09 +00:00
Joe Watkins ef7e5e0d69 fix stub to accept user properly 2017-01-09 15:57:46 +00:00
Dmitry Stogov 5753a753c7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73896 (spl_autoload() crashes when calls magic _call())
2017-01-09 15:12:22 +03:00
Dmitry Stogov 4f1b24d974 Fixed bug #73896 (spl_autoload() crashes when calls magic _call()) 2017-01-09 15:11:33 +03:00
Joe Watkins 71fe529afc merge PR #2290: enable opcache in CLI in 7.1+ 2017-01-09 11:00:05 +00:00
Joe Watkins 9727e37cae Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  set more suitable defaults for opcache in ini and code
2017-01-09 10:56:54 +00:00
Joe Watkins 63e08cbef7 Merge branch 'pull-request/2291' into PHP-7.0
* pull-request/2291:
  set more suitable defaults for opcache in ini and code
2017-01-09 10:54:57 +00:00
Markus Staab b655f2d632 set more suitable defaults for opcache in ini and code 2017-01-09 10:53:23 +00:00
Xinchen Hui 697809d425 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73854 (Always true condition in php_openssl_sockop_io)
2017-01-09 16:30:48 +08:00
Xinchen Hui f7cb79431f Fixed bug #73854 (Always true condition in php_openssl_sockop_io) 2017-01-09 16:30:00 +08:00
Joe Watkins bf6eb65673 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72979 money_format stores wrong length on AIX
2017-01-09 05:32:50 +00:00
Joe Watkins 8dd523a216 Fixed bug #72979 money_format stores wrong length on AIX 2017-01-09 05:31:41 +00:00
Joe Watkins 0738a78c59 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update ip2long_varation2 test to skip for AIX, see bug #72973
2017-01-09 05:25:17 +00:00
Joe Watkins 8c653c163a update ip2long_varation2 test to skip for AIX, see bug #72973 2017-01-09 05:24:44 +00:00
Joe Watkins 6166a0d68d [ci skip] news entry for issue #72974 2017-01-09 05:20:42 +00:00
Joe Watkins c39f71ba9f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #72974 imap is undefined service on AIX
2017-01-09 05:15:34 +00:00
Joe Watkins b8215c0817 Fixed #72974 imap is undefined service on AIX 2017-01-09 05:15:21 +00:00
Joe Watkins 3b8dc330bf Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix FTP tests for Travis CI.
2017-01-09 00:36:57 +00:00
Mitch Hagstrand 47007455dc Fix FTP tests for Travis CI.
This suppresses the errors from stream_socket_server() until
server.inc will not make anymore attempts.
2017-01-09 00:36:39 +00:00
Anatol Belski d454730407 improve and generalize the recognition of a cli sapi 2017-01-08 23:54:58 +01:00
Joe Watkins c846daef28 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Use proper file extension for the README
2017-01-08 21:05:24 +00:00
Markus Staab 5b5483dc8e Use proper file extension for the README 2017-01-08 21:05:06 +00:00
Joe Watkins 230b387e8a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix 404 links in Litespeed README - Bug 73890
2017-01-08 20:28:05 +00:00
Peter Kokot 7f1247004e Fix 404 links in Litespeed README - Bug 73890 2017-01-08 20:27:48 +00:00
Anatol Belski 9a4a023771 update NEWS 2017-01-08 20:13:27 +01:00
Anatol Belski 1aa792b44b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update NEWS
2017-01-08 20:12:53 +01:00
Anatol Belski c75287dc85 update NEWS 2017-01-08 20:11:02 +01:00
Joe Watkins 8961c78524 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  improve FPM tests (mostly for systemd build)
2017-01-08 19:03:10 +00:00
Remi Collet eb02876e74 improve FPM tests (mostly for systemd build) 2017-01-08 19:02:50 +00:00
Anatol Belski 1f22daeb0f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ast] Fix exporting **= in expansion of assign op
2017-01-08 18:54:28 +01:00
Sara Golemon 5df97b339e [ast] Fix exporting **= in expansion of assign op
(cherry picked from commit 9c3865eb6a)
2017-01-08 18:43:47 +01:00
Nikita Popov b38e6a54cf Merge branch 'PHP-7.0' into PHP-7.1 2017-01-08 13:48:48 +01:00
Nikita Popov b36f4ac708 deflate_add(): Don't add unnecessary +1 to size
zend_string_realloc will do this by itself.
2017-01-08 13:47:20 +01:00
Anatol Belski 329d487e68 update NEWS 2017-01-08 01:22:00 +01:00
Anatol Belski 43b92ed5a8 move various places to the centralized OpenSSL setup routine 2017-01-08 00:25:47 +01:00
Anatol Belski bf14ecc0d8 use the new API for opaque symbol in OpenSSL 1.1.x 2017-01-08 00:25:46 +01:00
Anatol Belski df1e1fdcb9 implement basic config support for OpenSSL 1.1.x 2017-01-08 00:25:46 +01:00
Nikita Popov ac46909162 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-08 00:02:33 +01:00
Nikita Popov ec1b7b933d Fix OOB read introduced by previous commit
Ooops...
2017-01-08 00:01:05 +01:00
Nikita Popov d48ff0f3f5 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-07 23:55:48 +01:00
Rowan Collins 5146d9f8ac http_fopen_wrapper.c - Handle HTTP headers with varying white space
The stream handler assumed all HTTP headers contained exactly one space,
but the standard says there may be zero or more. Should fix Bug #47021,
and any other edge cases caused by a web server sending unusual spacing,
e.g. the MIME type discovered from Content-Type: can no longer contain
leading whitespace.

We strip trailing whitespace from the headers added into
$http_response_header as well.
2017-01-07 23:54:57 +01:00
Nikita Popov bb2ab75555 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-07 22:54:16 +01:00
Nikita Popov a46bbdda2e Fixed bug #67583
As fcgi_request is an opaque struct as of PHP 7, expose a new API
function fcgi_end() which does fcgi_flush() with end=1 and checks/
sets the ->ended flag.
2017-01-07 22:53:28 +01:00
Nikita Popov f346bd6ee6 Rename fcgi_request.closed to .ended
"closed" refers to whether FCGI_END_REQUEST has been sent, while
the "close" operation does something entirely different. It gets
extra confusing when fcgi_is_closed() does not actually return
fcgi_request.closed...
2017-01-07 22:45:19 +01:00
Joe Watkins 201e56cd04 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Adapts the readme to the new test-possibility
2017-01-07 16:46:01 +00:00
Joe Watkins 2cb8950cc2 Merge branch '1391' into PHP-7.0
* 1391:
  Adapts the readme to the new test-possibility
2017-01-07 16:45:33 +00:00
Andreas Heigl fc777296bf Adapts the readme to the new test-possibility
This commit introduces a way to use a vagrant setup to test against a
known LDAP without the need to setup an LDAP on your own machine
2017-01-07 16:45:10 +00:00
Anatol Belski 901a551bda Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Implement github PR #1736
2017-01-07 15:40:00 +01:00
Anatol Belski 486fc0424a Implement github PR #1736
This fixes leak issues on *BSD systems, as described in the PR.
2017-01-07 15:36:14 +01:00
Anatol Belski 2fed175780 update UPGRADING 2017-01-07 12:46:45 +01:00
Anatol Belski 9845155aa2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix wrong version
  extend UPGRADING
2017-01-07 12:44:56 +01:00
Anatol Belski 80a5ae4f53 fix wrong version 2017-01-07 12:43:56 +01:00
Anatol Belski 49a0c166f3 extend UPGRADING 2017-01-07 12:43:19 +01:00
Anatol Belski bba09d56e5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  add 'e' flag for fopen() to enable CLOEXEC
2017-01-07 12:36:09 +01:00
Evgeniy Makhrov d0279242ce add 'e' flag for fopen() to enable CLOEXEC 2017-01-07 12:10:51 +01:00
Joe Watkins 5ae45ef993 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix memleaks from #1755 and some pre-existing ones
2017-01-07 10:15:15 +00:00
Joe Watkins b351ec8baf Merge branch 'pull-request/2283' into PHP-7.0
* pull-request/2283:
  Fix memleaks from #1755 and some pre-existing ones
2017-01-07 10:14:36 +00:00
Leigh 21f287915c Remove superfluous variable reinit 2017-01-07 09:43:05 +00:00
Joe Watkins 58273f631b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  PR #2211 don't supress warnings in tests
2017-01-07 08:08:09 +00:00
Joe Watkins 574f7bc3d4 Merge branch '2211' into PHP-7.0
* pull-request/2211:
  PR #2211 don't supress warnings in DOM tests
2017-01-07 08:07:17 +00:00
Craig Duncan 98c2cd4311 PR #2211 don't supress warnings in tests 2017-01-07 08:06:38 +00:00
Joe Watkins f60ebd13b3 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixes for session and fpm tests in PHP7.0 branch
2017-01-07 07:10:46 +00:00
Joe Watkins 41c1d0291c Merge branch 'pull-request/2284' into PHP-7.0
* pull-request/2284:
  Fixes for session and fpm tests in PHP7.0 branch
2017-01-07 07:10:23 +00:00
Mitch Hagstrand 3401f553b9 Fixes for session and fpm tests in PHP7.0 branch
1. Increased the timeout on sapi/fpm tests to match the cli server
2. Disabled session GC in session_set_save_handler_basic.phpt
3. Fixed GC in save_handler.inc to delete files based on age
2017-01-06 19:55:57 -08:00
Anatol Belski 22ed374c9a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  /guard is also a security flag
2017-01-07 02:48:14 +01:00
Anatol Belski f98d8f6c15 /guard is also a security flag 2017-01-07 02:25:00 +01:00
Anatol Belski f7bb3b5cbd Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Revert "Test request47456.phpt for PR 1303" on PHP-7.0 and PHP-7.1
2017-01-07 02:05:37 +01:00
Mitch Hagstrand 4568618030 Revert "Test request47456.phpt for PR 1303" on PHP-7.0 and PHP-7.1
This reverts commit e55e93a1e3.
This change should only apply to master. Not PHP-7.0 or PHP-7.1
2017-01-07 02:04:03 +01:00
Anatol Belski b716a1fbef fix edge case leak 2017-01-07 01:15:49 +01:00
Anatol Belski 0f410f8087 Fixed bug #73877 readlink() returns garbage for UTF-8 paths 2017-01-07 01:09:17 +01:00
Anatol Belski f8518ba1a1 fix typo 2017-01-06 18:55:12 +01:00
Anatol Belski 043d10c345 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix typo
2017-01-06 18:54:50 +01:00
Anatol Belski 71e84e2c36 fix typo 2017-01-06 18:53:30 +01:00
Anatol Belski dccfd8ee18 update NEWS and UPGRADING 2017-01-06 18:39:47 +01:00
Anatol Belski 841689cafe Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update NEWS and UPGRADING
2017-01-06 18:37:50 +01:00
Anatol Belski 1516132167 update NEWS and UPGRADING 2017-01-06 18:32:33 +01:00
Anatol Belski 847e1f97da Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Return integer field types as native integers instead of strings
2017-01-06 18:12:52 +01:00
Dorin Marcoci 826122fa8e Return integer field types as native integers instead of strings
Use another define for better compatibility

Test case for #72583 Feature. Small optimisations.

Adjust conditional directives according to coding standards

Add more compatibility for "end of line" on multiple environements

Updated execute.phpt test after switching to integer mapping
2017-01-06 17:43:46 +01:00
Joe Watkins c50f61b9b0 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Test request47456.phpt for PR 1303
2017-01-06 16:22:58 +00:00
Mitch Hagstrand e55e93a1e3 Test request47456.phpt for PR 1303
After merging PR 1303 unmatched subpatterns are set to NULL
2017-01-06 16:22:11 +00:00
Joe Watkins 699ab98f9d fix build broken by #2124 2017-01-06 16:18:24 +00:00
Joe Watkins 46c800948e fix acinclude, messed up by bad merge #2124 2017-01-06 16:13:21 +00:00
Joe Watkins 91cf3269c2 Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1
* 'PHP-7.1' of git.php.net:/php-src:
  Fix #70103: Fix bug 70103 when ZTS is enabled
2017-01-06 16:07:12 +00:00
Joe Watkins e114e94c5f fix broken build scripts #2124 2017-01-06 16:06:48 +00:00
Leigh 62e9e1fecd Some commentary, change free method 2017-01-06 15:49:15 +00:00
Leigh 9a0dac124e Conditionally free depending on how assignment happened 2017-01-06 15:24:37 +00:00
Leigh 053b966134 Fix memleaks from #1755 and some pre-existing ones 2017-01-06 14:58:54 +00:00
Christoph M. Becker cc75e8bca5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix #70103: Fix bug 70103 when ZTS is enabled
2017-01-06 15:44:31 +01:00
Mitch Hagstrand ad08aa3956 Fix #70103: Fix bug 70103 when ZTS is enabled
Used snprintf to copy the basename string before it is freed
2017-01-06 15:26:17 +01:00
Joe Watkins ec0daf7913 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Use AX_CHECK_COMPILE_FLAG macro to check for -fvisibility=hidden
2017-01-06 08:14:29 +00:00
Joe Watkins ba0751a915 Merge branch 'pull-request/1809'
* pull-request/1809:
  test for function curl_multi_info_read();
2017-01-06 08:06:38 +00:00
Joe Watkins 3d50172e9e Merge branch 'pull-request/1809'
* pull-request/1809:
  test for function curl_multi_info_read();
2017-01-06 08:06:10 +00:00
Joe Watkins 2d42423953 Merge branch 'pull-request/1755'
* pull-request/1755:
  Fix bug #71519 Add 'serialNumberHex' variable to openssl_x509_parse
2017-01-06 07:43:59 +00:00
Joe Watkins 0884cffb67 Merge branch 'pull-request/1755'
* pull-request/1755:
  Fix bug #71519 Add 'serialNumberHex' variable to openssl_x509_parse
2017-01-06 07:42:57 +00:00
Joe Watkins 1c40eaaee4 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  add stream_socket_sendto test from PR #1804
2017-01-06 07:28:56 +00:00
Joe Watkins 3a79f35fdc add stream_socket_sendto test from PR #1804 2017-01-06 07:27:31 +00:00
Joe Watkins e86d355c4c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #69442 closing of fd incorrect when PTS enabled
2017-01-06 06:58:56 +00:00
Joe Watkins ff6b309c6f Merge branch 'pull-request/1588' into PHP-7.0
* pull-request/1588:
  Fixed #69442 closing of fd incorrect when PTS enabled
2017-01-06 06:56:50 +00:00
Joe Watkins 811dfaa57b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #69582 session not readable by root in CLI
2017-01-06 06:07:17 +00:00
Joe Watkins b0ff9ee688 Merge branch 'pull-request/1360' into PHP-7.0
* pull-request/1360:
  Fixed bug #69582 session not readable by root in CLI
  news entry for PR #1360
2017-01-06 06:05:17 +00:00
Joe Watkins de3649e2a3 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix inappropriate warning in FPM log
2017-01-06 05:55:14 +00:00
Joe Watkins 6a03b43e5f Merge branch 'pull-request/1311' into PHP-7.0
* pull-request/1311:
  fix inappropriate warning in FPM log
2017-01-06 05:54:42 +00:00
Joe Watkins 3f89aec716 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix #70103: ZipArchive::addGlob ignores remove_all_path option
  news entry for PR #1430
2017-01-06 05:40:41 +00:00
Joe Watkins a49aaf9ab0 Merge branch 'pull-request/1430' into PHP-7.0
* pull-request/1430:
  Fix #70103: ZipArchive::addGlob ignores remove_all_path option
  news entry for PR 1430
2017-01-06 05:39:48 +00:00
Joe Watkins a1ff6e7201 Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1
* 'PHP-7.1' of git.php.net:/php-src:
  add skip when json not loaded
2017-01-06 05:33:22 +00:00
Joe Watkins 12bbeaa45e Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src:
  add skip when json not loaded
2017-01-06 05:32:55 +00:00
Joe Watkins d5a1c5a96b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Increase realpath_cache_size default value
  add UPGRADING note for realpath_cache_size
2017-01-06 05:31:29 +00:00
Joe Watkins 8e39a27b76 Merge branch 'realpath_cache_size_update' into PHP-7.0
* realpath_cache_size_update:
  Increase realpath_cache_size default value
  add UPGRADING note regarding realpath_cache_size
2017-01-06 05:29:50 +00:00
Remi Collet d18d3e7825 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  add skip when json not loaded
2017-01-06 06:27:25 +01:00
Remi Collet 4f1335cd4c Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  add skip when json not loaded
2017-01-06 06:27:08 +01:00
Joe Watkins bebfdec0a2 Merge branch 'realpath_cache_size_update' into PHP-7.0
* realpath_cache_size_update:
  Increase realpath_cache_size default value
2017-01-06 05:25:49 +00:00
Markus Staab 49b2cbf763 Update php.ini-development 2017-01-06 05:25:13 +00:00
Markus Staab 81fb61f97c Update php.ini-production 2017-01-06 05:25:10 +00:00
Markus Staab 782b84c6d5 updated default per proposal
TODO: adjust php.ini defaults
2017-01-06 05:25:08 +00:00
Markus Staab 66b698c3cf Increase realpath_cache_size default value 2017-01-06 05:25:04 +00:00
Remi Collet db890956ec add skip when json not loaded 2017-01-06 06:23:59 +01:00
Anatol Belski 1f6a9060f9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix deps dir for test data preparations
2017-01-06 02:37:10 +01:00
Anatol Belski a7c444b939 fix deps dir for test data preparations 2017-01-06 02:34:03 +01:00
Ferenc Kovacs 1ed188011a Merge branch 'PHP-7.0' into PHP-7.1 2017-01-06 01:50:08 +01:00
Ferenc Kovacs a43a3798d3 Merge branch 'PHP-5.6' into PHP-7.0 2017-01-06 01:48:24 +01:00
Ferenc Kovacs 3b14d7b84b 5.6.31 is next 2017-01-06 01:43:11 +01:00
Anatol Belski 460247c742 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  don't use separate deps for release branches
2017-01-06 01:29:45 +01:00
Anatol Belski 372144508c don't use separate deps for release branches 2017-01-06 01:24:41 +01:00
Christoph M. Becker e7ce861def Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix #70417: PharData::compress() doesn't close temp file
2017-01-05 18:51:04 +01:00
Christoph M. Becker 183a34a5cf Merge branch 'pull-request/2278' into PHP-7.0
* pull-request/2278:
  Fix #70417: PharData::compress() doesn't close temp file
2017-01-05 18:49:52 +01:00
Joe Watkins 4cce1e9a94 wrong version 2017-01-05 17:00:40 +00:00
Joe Watkins 3b741353e1 I am bad at counting (wrong date in news) 2017-01-05 16:56:26 +00:00
Joe Watkins e627aa9841 bump version after release 2017-01-05 16:50:52 +00:00
Christoph M. Becker 995ecffbb2 Fix #70417: PharData::compress() doesn't close temp file
According to the comment, it has not been deemed necessary to close compressed
files. However, we don't want to keep unclosed file handles to save ressources.
So we're also closing compressed archives, if they're not aliased.
2017-01-05 14:12:31 +01:00
Joshua Thijssen e7f23e164b Implemented fix for incorrect filedescriptor closing 2015-10-21 13:21:03 +02:00
Christoph M. Becker c36ce04dd3 Fix #70103: ZipArchive::addGlob ignores remove_all_path option
When the remove_all_path option is set, but no add_path option, remove_all_path
is simply ignored. This patch fixes this.
2015-08-13 21:04:36 +02:00
Evgeniy Spinov 650e073f7a *[Sessions]: Now session is accessible if process is ran by root. Fixing bug: https://bugs.php.net/bug.php?id=69582
*[Sessions]: Replaced fstat with zend_fstat
2015-06-28 12:02:57 +04:00
EvgeniySpinov 2edf296a92 Merge pull request #1 from php/master
Merging upstream
2015-06-28 12:00:38 +04:00
Evgeniy Spinov a2c461d58a *[Sessions]: Now session is accessible if process is ran by root. Fixing bug: https://bugs.php.net/bug.php?id=69582 2015-06-24 15:26:25 +04:00
redfoxli 2ece3ea699 improperlog 2015-05-30 14:37:41 +08:00
197 changed files with 3118 additions and 702 deletions

No files matched your search

+69 -98
View File
@@ -29,22 +29,33 @@ document ____executor_globals
end
define print_cvs
____executor_globals
set $p = $eg.current_execute_data.CVs
set $c = $eg.current_execute_data.op_array.last_var
set $v = $eg.current_execute_data.op_array.vars
set $i = 0
printf "Compiled variables count: %d\n", $c
while $i < $c
printf "%d = %s\n", $i, $v[$i].name
if $p[$i] != 0
printzv *$p[$i]
else
printf "*uninitialized*\n"
end
set $i = $i + 1
if $argc == 0
____executor_globals
set $cv_ex_ptr = $eg.current_execute_data
else
set $cv_ex_ptr = (zend_execute_data *)$arg0
end
set $cv_count = $cv_ex_ptr.func.op_array.last_var
set $cv = $cv_ex_ptr.func.op_array.vars
set $cv_idx = 0
set $callFrameSize = (sizeof(zend_execute_data) + sizeof(zval) - 1) / sizeof(zval)
printf "Compiled variables count: %d\n\n", $cv_count
while $cv_idx < $cv_count
printf "[%d] '%s'\n", $cv_idx, $cv[$cv_idx].val
set $zvalue = ((zval *) $cv_ex_ptr) + $callFrameSize + $cv_idx
printzv $zvalue
set $cv_idx = $cv_idx + 1
end
end
document print_cvs
Prints the compiled variables and their values.
If a zend_execute_data pointer is set this will print the compiled
variables of that scope. If no parameter is used it will use
current_execute_data for scope.
usage: print_cvs [zend_execute_data *]
end
define dump_bt
@@ -196,12 +207,17 @@ define ____printzv_contents
____executor_globals
set $handle = $zvalue->value.obj.handle
set $handlers = $zvalue->value.obj.handlers
set $zobj = $zvalue->value.obj
set $cname = $zobj->ce->name->val
set $zobj = $zvalue->value.obj
set $cname = $zobj->ce->name->val
printf "(%s) #%d", $cname, $handle
if ! $arg1
if $handlers->get_properties == &zend_std_get_properties
set $ht = $zobj->properties
if $zobj->properties
set $ht = $zobj->properties
else
set $ht = &$zobj->ce->properties_info
end
printf "\nProperties "
if $ht
set $ind = $ind + 1
____print_ht $ht 1
@@ -212,7 +228,7 @@ define ____printzv_contents
set $i = $i - 1
end
else
echo "no properties found"
echo "not found"
end
end
end
@@ -455,9 +471,9 @@ define print_inh
end
define print_pi
set $pi = $arg0
set $pi = (zend_property_info *)$arg0
printf "[%p] {\n", $pi
printf " h = %lu\n", $pi->h
printf " ce = [%p] %s\n", $pi->ce, $pi->ce->name->val
printf " flags = %d (", $pi->flags
if $pi->flags & 0x100
printf "ZEND_ACC_PUBLIC"
@@ -476,16 +492,27 @@ define print_pi
end
printf ")\n"
printf " name = "
____print_str $pi->name $pi->name_length
printf "\n}\n"
print_zstr $pi->name
printf "}\n"
end
document print_pi
Takes a pointer to an object's property and prints the property information
usage: print_pi <ptr>
end
define ____print_str
set $tmp = 0
set $str = $arg0
if $argc > 2
set $maxlen = $arg2
else
set $maxlen = 256
end
printf "\""
while $tmp < $arg1 && $tmp < 256
if $str[$tmp] > 32 && $str[$tmp] < 127
while $tmp < $arg1 && $tmp < $maxlen
if $str[$tmp] > 31 && $str[$tmp] < 127
printf "%c", $str[$tmp]
else
printf "\\%o", $str[$tmp]
@@ -554,6 +581,23 @@ document printzops
dump operands of the current opline
end
define print_zstr
set $zstr = (zend_string *)$arg0
if $argc == 2
set $maxlen = $arg1
else
set $maxlen = $zstr->len
end
printf "string(%d) ", $zstr->len
____print_str $zstr->val $zstr->len $maxlen
printf "\n"
end
document print_zstr
print the length and contents of a zend string
usage: print_zstr <ptr> [max length]
end
define zbacktrace
____executor_globals
dump_bt $eg.current_execute_data
@@ -566,79 +610,6 @@ document zbacktrace
> (gdb) dump_bt $eg.current_execute_data
end
define zmemcheck
set $p = alloc_globals.head
set $stat = "?"
set $total_size = 0
if $arg0 != 0
set $not_found = 1
else
set $not_found = 0
end
printf " block size status file:line\n"
printf "-------------------------------------------------------------------------------\n"
while $p
set $aptr = $p + sizeof(struct _zend_mem_header) + sizeof(align_test)
if $arg0 == 0 || (void *)$aptr == (void *)$arg0
if $p->magic == 0x7312f8dc
set $stat = "OK"
end
if $p->magic == 0x99954317
set $stat = "FREED"
end
if $p->magic == 0xfb8277dc
set $stat = "CACHED"
end
set $filename = strrchr($p->filename->val, '/')
if !$filename
set $filename = $p->filename->val
else
set $filename = $filename + 1
end
printf " %p ", $aptr
if $p->size == sizeof(struct _zval_struct) && ((struct _zval_struct *)$aptr)->type >= 0 && ((struct _zval_struct *)$aptr)->type < 10
printf "ZVAL?(%-2d) ", $p->size
else
printf "%-9d ", $p->size
end
set $total_size = $total_size + $p->size
printf "%-06s %s:%d", $stat, $filename, $p->lineno
if $p->orig_filename
set $orig_filename = strrchr($p->orig_filename, '/')
if !$orig_filename
set $orig_filename = $p->orig_filename
else
set $orig_filename = $orig_filename + 1
end
printf " <= %s:%d\n", $orig_filename, $p->orig_lineno
else
printf "\n"
end
if $arg0 != 0
set $p = 0
set $not_found = 0
else
set $p = $p->pNext
end
else
set $p = $p->pNext
end
end
if $not_found
printf "no such block that begins at %p.\n", $aptr
end
if $arg0 == 0
printf "-------------------------------------------------------------------------------\n"
printf " total: %d bytes\n", $total_size
end
end
document zmemcheck
show status of a memory block.
usage: zmemcheck [ptr].
if ptr is 0, all blocks will be listed.
end
define lookup_root
set $found = 0
if gc_globals->roots
+1 -1
View File
@@ -286,7 +286,7 @@ MAINTENANCE: Odd fixes
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: gd
PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>
PRIMARY MAINTAINER: Pierre-Alain Joye <pajoye@php.net>, Christoph M. Becker <cmb@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
+96 -1
View File
@@ -1,6 +1,101 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2017, PHP 7.1.1
02 Feb 2017, PHP 7.1.2RC1
- Core:
. Improved GENERATOR_CREATE opcode handler. (Bob, Dmitry)
. Fixed bug #73877 (readlink() returns garbage for UTF-8 paths). (Anatol)
. Fixed bug #73876 (Crash when exporting **= in expansion of assign op).
(Sara)
. Fixed bug #73962 (bug with symlink related to cyrillic directory). (Anatol)
. Fixed bug #73969 (segfault in debug_print_backtrace). (andrewnester)
. Fixed bug #73994 (arginfo incorrect for unpack). (krakjoe)
. Fixed bug #73973 (assertion error in debug_zval_dump). (andrewnester)
- DOM:
. Fixed bug #54382 (getAttributeNodeNS doesn't get xmlns* attributes).
(aboks)
- DTrace:
. Fixed bug #73965 (DTrace reported as enabled when disabled). (Remi)
- FCGI:
. Fixed bug #73904 (php-cgi fails to load -c specified php.ini file). (Anatol)
. Fixed bug #72898 (PHP_FCGI_CHILDREN is not included in phpinfo()). (Anatol)
- FPM:
. Fixed bug #69865 (php-fpm does not close stderr when using syslog).
(m6w6)
- GD:
. Fixed bug #73968 (Premature failing of XBM reading). (cmb)
- GMP:
. Fixed bug #69993 (test for gmp.h needs to test machine includes).
(Jordan Gigov)
- Hash:
. Added hash_hkdf() function. (Andrey Andreev)
. Fixed bug #73961 (environmental build dependency in hash sha3 source).
(krakjoe)
- Intl:
. Fix bug #73956 (Link use CC instead of CXX). (Remi)
- LDAP:
. Fixed bug #73933 (error/segfault with ldap_mod_replace and opcache).
(Laruence)
- MySQLi:
. Fixed bug #73949 (leak in mysqli_fetch_object). (krakjoe)
- Mysqlnd:
. Fixed bug #69899 (segfault on close() after free_result() with mysqlnd).
(Richard Fussenegger)
- Opcache:
. Fixed bug #73983 (crash on finish work with phar in cli + opcache).
(Anatol)
- OpenSSL:
. Fixed bug #71519 (add serial hex to return value array). (xrobau)
. Fixed bug #73692 (Compile ext/openssl with openssl 1.1.0 on Win). (Anatol)
. Fixed bug #73978 (openssl_decrypt triggers bug in PDO). (Jakub Zelenka)
- PDO_Firebird:
. Implemented FR #72583 (All data are fetched as strings). (Dorin Marcoci)
- PDO_PgSQL:
. Fixed bug #73959 (lastInsertId fails to throw an exception for wrong
sequence name). (andrewnester)
- Phar:
. Fixed bug #70417 (PharData::compress() doesn't close temp file). (cmb)
- posix:
. Fixed bug #71219 (configure script incorrectly checks for ttyname_r). (atoh)
- Session:
. Fixed bug #69582 (session not readable by root in CLI). (EvgeniySpinov)
- SPL:
. Fixed bug #73896 (spl_autoload() crashes when calls magic _call()). (Dmitry)
- Standard:
. Fixed bug #69442 (closing of fd incorrect when PTS enabled). (jaytaph)
. Fixed bug #47021 (SoapClient stumbles over WSDL delivered with
"Transfer-Encoding: chunked"). (Rowan Collins)
. Fixed bug #72974 (imap is undefined service on AIX). (matthieu.sarter)
. Fixed bug #72979 (money_format stores wrong length AIX). (matthieu.sarter)
. Fixed bug #73374 (intval() with base 0 should detect binary). (Leigh)
. Fixed bug #69061 (mail.log = syslog contains double information).
(Tom Sommer)
- ZIP:
. Fixed bug #70103 (ZipArchive::addGlob ignores remove_all_path option). (cmb,
Mitch Hagstrand)
19 Jan 2017, PHP 7.1.1
- Core:
. Fixed bug #73792 (invalid foreach loop hangs script). (Dmitry)
+12 -9
View File
@@ -93,24 +93,27 @@ Commit the changes to the main branch.
12. run: ``PHPROOT=. ./makedist 5.4.2RC2``, this will export the tree, create configure
and build three tarballs (gz, bz2 and xz).
13. Copy those tarballs (scp, rsync) to downloads.php.net, in your homedir there should be a
13. run ``scripts/dev/gen_verify_stub <version> [identity]``, this will sign the tarballs
and output verification information to be included in announcement email
14. Copy those tarballs (scp, rsync) to downloads.php.net, in your homedir there should be a
directory "downloads/". Copy them into there, so that the system can generate
MD5 sums. If you do not have this directory, talk to Derick or Dan.
14. Now the RC can be found on http://downloads.php.net/yourname,
15. Now the RC can be found on http://downloads.php.net/yourname,
f.e. http://downloads.php.net/derick/
15. Once the release has been tagged, contact the PHP Windows development team
16. Once the release has been tagged, contact the PHP Windows development team
(internals-win@lists.php.net) so that Windows binaries can be created. Once
those are made, they should be placed into the same directory as the source snapshots.
Getting the non stable release (alpha/beta/RC) announced
--------------------------------------------------------
1. Send an email (see example here: http://news.php.net/php.internals/19486)
**To** ``internals@lists.php.net`` and ``php-general@lists.php.net`` lists
pointing out "the location of the release" and "the possible release date of
either the next RC, or the final release".
1. Send an email **To** ``internals@lists.php.net`` and ``php-general@lists.php.net``
lists pointing out "the location of the release" and "the possible release date of
either the next RC, or the final release". Include in this information the verification
information output by ``gen_verify_stub``.
2. Send an email (see example here http://news.php.net/php.pear.qa/5201) **To**
``php-qa@lists.php.net`` and ``primary-qa-tester@lists.php.net``.
@@ -190,8 +193,8 @@ Check if the pear files are updated (phar).
This is to fetch the last commit id from php-distributions.git and commit this
last commit id to web/php.git, then, mirrors will now sync
12. Once the release has been tagged, contact the PHP Windows development team
(internals-win@lists.php.net) so that Windows binaries can be created.
12. Once the release has been tagged, contact release managers, windows builders, and package maintainers
so that they can build releases. Do not send this announcement to any public lists.
Getting the stable release announced
------------------------------------
+19
View File
@@ -239,6 +239,10 @@ PHP 7.1 UPGRADE NOTES
- output_reset_rewrite_vars() no longer reset session URL rewrite vars.
- the lasinsertid() in pdo_pgsql extension triggers an error, when no nextval()
were called in in the current session.
- fopen()
Since 7.1.2, mode 'e' was added, which sets the close-on-exec flag
on the opened file descriptor. This mode is only available in PHP compiled on
POSIX.1-2008 conform systems.
========================================
@@ -254,6 +258,11 @@ PHP 7.1 UPGRADE NOTES
. Added curl_share_strerror() to convert error code to error message text
describing the error.
- Hash:
. In PHP 7.1.2: Added hash_hkdf() function, which implements the HMAC-based
Key Derivation Function (HKDF) algorithm according to RFC 5869. The
implementation combines the Extract and Expand steps.
- pcntl:
. Added pcntl_signal_get_handler() that returns the current signal handler
for a particular signal.
@@ -339,6 +348,13 @@ PHP 7.1 UPGRADE NOTES
. Attempting to read an invalid or write to a readonly property will throw
an instance of Error instead of resulting in a fatal error.
- PDO_Firebird
As of PHP 7.1.2, the fetched data for integer fields is aware of the Firebird
datatypes. Previously all integers was fetched as strings, starting with
aforementioned PHP version integer fields are translated to the PHP integer
datatype. The 64-bit integers are still fetched as strings in 32-bit PHP
builds.
- Reflection:
. Failure to retrieve a reflection object or retrieve an object property
will now throw an instance of Error instead of resulting in a fatal error.
@@ -415,6 +431,9 @@ PHP 7.1 UPGRADE NOTES
. If the value is set to -1, then the dtoa mode 0 is used. No changes
in default value which is still 14.
- realpath_cache_size
. Set to 4096k by default
========================================
12. Windows Support
========================================
+11
View File
@@ -0,0 +1,11 @@
--TEST--
ZEND_POW_ASSIGN
--INI--
zend.assertions=1
--FILE--
<?php
assert_options(ASSERT_WARNING);
assert(false && ($a **= 2));
--EXPECTF--
Warning: assert(): assert(false && ($a **= 2)) failed in %s%ezend-pow-assign.php on line %d
+2
View File
@@ -1,5 +1,7 @@
--TEST--
Bug #63734 (Garbage collector can free zvals that are still referenced)
--INI--
zend.enable_gc = 1
--FILE--
<?php
class C {
+2
View File
@@ -1,5 +1,7 @@
--TEST--
Bug #69446 (GC leak relating to removal of nested data after dtors run)
--INI--
zend.enable_gc = 1
--FILE--
<?php
$bar = NULL;
+2
View File
@@ -1,5 +1,7 @@
--TEST--
Bug #69446 (GC leak relating to removal of nested data after dtors run)
--INI--
zend.enable_gc = 1
--FILE--
<?php
$bar = NULL;
+2
View File
@@ -1,5 +1,7 @@
--TEST--
Bug #69534 (Cycle leaks through declared properties on internal classes)
--INI--
zend.enable_gc = 1
--FILE--
<?php
class Node extends SplObjectStorage {
+2
View File
@@ -1,5 +1,7 @@
--TEST--
Bug #70805 (Segmentation faults whilst running Drupal 8 test suite) (Crash)
--INI--
zend.enable_gc = 1
--FILE--
<?php
class A {
+2
View File
@@ -1,5 +1,7 @@
--TEST--
Bug #70805 (Segmentation faults whilst running Drupal 8 test suite) (Memleak)
--INI--
zend.enable_gc = 1
--FILE--
<?php
class A {
+2
View File
@@ -1,5 +1,7 @@
--TEST--
Bug #71818 (Memory leak when array altered in destructor)
--INI--
zend.enable_gc = 1
--FILE--
<?php
class MemoryLeak
+16
View File
@@ -0,0 +1,16 @@
--TEST--
Bug #73916 (zend_print_flat_zval_r doesn't consider reference)
--FILE--
<?php
$a = array('a');
class b{};
$b = new b;
$test[] =& $a;
$test[] =& $b;
test($test);
function test() {
debug_print_backtrace();
}
?>
--EXPECTF--
#0 test(Array ([0] => Array ([0] => a),[1] => b Object ())) called at [%sbug73916.php:%d]
+2
View File
@@ -1,5 +1,7 @@
--TEST--
GC 033: Crash in GC while run with phpspec
--INI--
zend.enable_gc = 1
--FILE--
<?php
$a = new stdClass();
+2
View File
@@ -1,5 +1,7 @@
--TEST--
GC 035: Lost inner-cycles garbage
--INI--
zend.enable_gc = 1
--FILE--
<?php
class A {
@@ -1,5 +1,7 @@
--TEST--
Verify yield from on generators being properly cycle collected
--INI--
zend.enable_gc = 1
--FILE--
<?php
+2 -1
View File
@@ -152,6 +152,7 @@ ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_API zend_utility_values zend_uv;
ZEND_API zend_bool zend_dtrace_enabled;
/* version information */
static char *zend_version_info;
@@ -312,7 +313,6 @@ ZEND_API void zend_print_flat_zval_r(zval *expr) /* {{{ */
static void zend_print_zval_r_to_buf(smart_str *buf, zval *expr, int indent) /* {{{ */
{
ZVAL_DEREF(expr);
switch (Z_TYPE_P(expr)) {
case IS_ARRAY:
smart_str_appends(buf, "Array\n");
@@ -697,6 +697,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) /
char *tmp = getenv("USE_ZEND_DTRACE");
if (tmp && zend_atoi(tmp, 0)) {
zend_dtrace_enabled = 1;
zend_compile_file = dtrace_compile_file;
zend_execute_ex = dtrace_execute_ex;
zend_execute_internal = dtrace_execute_internal;
+2
View File
@@ -281,6 +281,8 @@ extern ZEND_API zend_class_entry *zend_standard_class_def;
extern ZEND_API zend_utility_values zend_uv;
extern ZEND_API zval zval_used_for_init;
/* If DTrace is available and enabled */
extern ZEND_API zend_bool zend_dtrace_enabled;
END_EXTERN_C()
#define ZEND_UV(name) (zend_uv.name)
+1 -1
View File
@@ -1342,7 +1342,7 @@ simple_list:
case ZEND_ASSIGN_BW_OR: BINARY_OP(" |= ", 90, 91, 90);
case ZEND_ASSIGN_BW_AND: BINARY_OP(" &= ", 90, 91, 90);
case ZEND_ASSIGN_BW_XOR: BINARY_OP(" ^= ", 90, 91, 90);
case ZEND_POW: BINARY_OP(" **= ", 90, 91, 90);
case ZEND_ASSIGN_POW: BINARY_OP(" **= ", 90, 91, 90);
EMPTY_SWITCH_DEFAULT_CASE();
}
break;
+12 -14
View File
@@ -879,9 +879,6 @@ static void copy_constant_array(zval *dst, zval *src) /* {{{ */
}
} else if (Z_REFCOUNTED_P(val)) {
Z_ADDREF_P(val);
if (UNEXPECTED(Z_TYPE_INFO_P(val) == IS_RESOURCE_EX)) {
Z_TYPE_INFO_P(new_val) &= ~(IS_TYPE_REFCOUNTED << Z_TYPE_FLAGS_SHIFT);
}
}
} ZEND_HASH_FOREACH_END();
}
@@ -924,12 +921,7 @@ repeat:
case IS_FALSE:
case IS_TRUE:
case IS_NULL:
break;
case IS_RESOURCE:
ZVAL_COPY(&val_free, val);
/* TODO: better solution than this tricky disable dtor on resource? */
Z_TYPE_INFO(val_free) &= ~(IS_TYPE_REFCOUNTED << Z_TYPE_FLAGS_SHIFT);
val = &val_free;
break;
case IS_ARRAY:
if (!Z_IMMUTABLE_P(val)) {
@@ -2446,13 +2438,19 @@ ZEND_FUNCTION(debug_print_backtrace)
object = (Z_TYPE(call->This) == IS_OBJECT) ? Z_OBJ(call->This) : NULL;
if (call->func) {
zend_string *zend_function_name;
func = call->func;
function_name = (func->common.scope &&
func->common.scope->trait_aliases) ?
ZSTR_VAL(zend_resolve_method_name(
(object ? object->ce : func->common.scope), func)) :
(func->common.function_name ?
ZSTR_VAL(func->common.function_name) : NULL);
if (func->common.scope && func->common.scope->trait_aliases) {
zend_function_name = zend_resolve_method_name(object ? object->ce : func->common.scope, func);
} else {
zend_function_name = func->common.function_name;
}
if (zend_function_name != NULL) {
function_name = ZSTR_VAL(zend_function_name);
} else {
function_name = NULL;
}
} else {
func = NULL;
function_name = NULL;
+4 -4
View File
@@ -345,6 +345,10 @@ void shutdown_executor(void) /* {{{ */
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();
@@ -376,10 +380,6 @@ void shutdown_executor(void) /* {{{ */
}
} zend_end_try();
zend_try {
clean_non_persistent_constants();
} zend_end_try();
zend_try {
#if 0&&ZEND_DEBUG
signal(SIGSEGV, original_sigsegv_handler);
+62 -39
View File
@@ -219,10 +219,9 @@ static inline time_t FileTimeToUnixTime(const FILETIME *FileTime)
CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len){ /* {{{ */
HANDLE hFile;
DWORD dwRet;
wchar_t *linkw = php_win32_ioutil_any_to_w(link), targetw[MAXPATHLEN];
size_t _tmp_len;
char *_tmp;
size_t ret_len, targetw_len, offset = 0;
char *ret;
if (!linkw) {
return -1;
@@ -251,46 +250,40 @@ CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len){
with VS2012 and earlier, and seems not to be fixed till
now. Thus, correcting target_len so it's suddenly don't
overflown. */
dwRet = GetFinalPathNameByHandleW(hFile, targetw, MAXPATHLEN, VOLUME_NAME_DOS);
if(dwRet >= target_len || dwRet >= MAXPATHLEN || dwRet == 0) {
targetw_len = GetFinalPathNameByHandleW(hFile, targetw, MAXPATHLEN, VOLUME_NAME_DOS);
if(targetw_len >= target_len || targetw_len >= MAXPATHLEN || targetw_len == 0) {
free(linkw);
CloseHandle(hFile);
return -1;
}
_tmp = php_win32_ioutil_conv_w_to_any(targetw, dwRet, &_tmp_len);
if (!_tmp || _tmp_len >= MAXPATHLEN) {
CloseHandle(hFile);
free(linkw);
return -1;
}
memcpy(target, _tmp, _tmp_len);
free(_tmp);
if(targetw_len > 4) {
/* Skip first 4 characters if they are "\\?\" */
if(targetw[0] == L'\\' && targetw[1] == L'\\' && targetw[2] == L'?' && targetw[3] == L'\\') {
offset = 4;
CloseHandle(hFile);
free(linkw);
if(dwRet > 4) {
/* Skip first 4 characters if they are "\??\" */
if(target[0] == '\\' && target[1] == '\\' && target[2] == '?' && target[3] == '\\') {
char tmp[MAXPATHLEN];
unsigned int offset = 4;
dwRet -= 4;
/* \??\UNC\ */
if (dwRet > 7 && target[4] == 'U' && target[5] == 'N' && target[6] == 'C') {
/* \\?\UNC\ */
if (targetw_len > 7 && targetw[4] == L'U' && targetw[5] == L'N' && targetw[6] == L'C') {
offset += 2;
dwRet -= 2;
target[offset] = '\\';
targetw[offset] = L'\\';
}
memcpy(tmp, target + offset, dwRet);
memcpy(target, tmp, dwRet);
}
}
target[dwRet] = '\0';
return dwRet;
ret = php_win32_ioutil_conv_w_to_any(targetw + offset, targetw_len - offset, &ret_len);
if (!ret || ret_len >= MAXPATHLEN) {
CloseHandle(hFile);
free(linkw);
free(ret);
return -1;
}
memcpy(target, ret, ret_len + 1);
free(ret);
CloseHandle(hFile);
free(linkw);
return ret_len;
}
/* }}} */
@@ -920,9 +913,13 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
int bufindex = 0, isabsolute = 0;
wchar_t * reparsetarget;
BOOL isVolume = FALSE;
char *printname = NULL, *substitutename = NULL;
int substitutename_len;
#if VIRTUAL_CWD_DEBUG
char *printname = NULL;
#endif
char *substitutename = NULL;
size_t substitutename_len;
int substitutename_off = 0;
wchar_t tmpsubstname[MAXPATHLEN];
if(++(*ll) > LINK_MAX) {
free_alloca(tmp, use_heap);
@@ -957,6 +954,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
if(pbuffer->ReparseTag == IO_REPARSE_TAG_SYMLINK) {
reparsetarget = pbuffer->SymbolicLinkReparseBuffer.ReparseTarget;
isabsolute = (pbuffer->SymbolicLinkReparseBuffer.Flags == 0) ? 1 : 0;
#if VIRTUAL_CWD_DEBUG
printname = php_win32_ioutil_w_to_any(reparsetarget + pbuffer->MountPointReparseBuffer.PrintNameOffset / sizeof(WCHAR));
if (!printname) {
free_alloca(pbuffer, use_heap_large);
@@ -964,13 +962,25 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
FREE_PATHW()
return -1;
}
#endif
substitutename_len = pbuffer->MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR);
substitutename = php_win32_ioutil_w_to_any(reparsetarget + pbuffer->MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR));
if (!substitutename) {
if (substitutename_len >= MAXPATHLEN) {
free_alloca(pbuffer, use_heap_large);
free_alloca(tmp, use_heap);
FREE_PATHW()
return -1;
}
memmove(tmpsubstname, reparsetarget + pbuffer->MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR), pbuffer->MountPointReparseBuffer.SubstituteNameLength);
tmpsubstname[substitutename_len] = L'\0';
substitutename = php_win32_cp_conv_w_to_any(tmpsubstname, substitutename_len, &substitutename_len);
if (!substitutename || substitutename_len >= MAXPATHLEN) {
free_alloca(pbuffer, use_heap_large);
free_alloca(tmp, use_heap);
free(substitutename);
#if VIRTUAL_CWD_DEBUG
free(printname);
#endif
FREE_PATHW()
return -1;
}
@@ -978,6 +988,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
else if(pbuffer->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT) {
isabsolute = 1;
reparsetarget = pbuffer->MountPointReparseBuffer.ReparseTarget;
#if VIRTUAL_CWD_DEBUG
printname = php_win32_ioutil_w_to_any(reparsetarget + pbuffer->MountPointReparseBuffer.PrintNameOffset / sizeof(WCHAR));
if (!printname) {
free_alloca(pbuffer, use_heap_large);
@@ -985,14 +996,26 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
FREE_PATHW()
return -1;
}
#endif
substitutename_len = pbuffer->MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR);
substitutename = php_win32_ioutil_w_to_any(reparsetarget + pbuffer->MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR));
if (!substitutename) {
if (substitutename_len >= MAXPATHLEN) {
free_alloca(pbuffer, use_heap_large);
free_alloca(tmp, use_heap);
FREE_PATHW()
return -1;
}
memmove(tmpsubstname, reparsetarget + pbuffer->MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR), pbuffer->MountPointReparseBuffer.SubstituteNameLength);
tmpsubstname[substitutename_len] = L'\0';
substitutename = php_win32_cp_conv_w_to_any(tmpsubstname, substitutename_len, &substitutename_len);
if (!substitutename || substitutename_len >= MAXPATHLEN) {
free_alloca(pbuffer, use_heap_large);
free_alloca(tmp, use_heap);
free(substitutename);
#if VIRTUAL_CWD_DEBUG
free(printname);
#endif
FREE_PATHW()
return -1;
}
@@ -1055,9 +1078,9 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
fprintf(stderr, "reparse: print: %s ", printname);
fprintf(stderr, "sub: %s ", substitutename);
fprintf(stderr, "resolved: %s ", path);
free(printname);
#endif
free_alloca(pbuffer, use_heap_large);
free(printname);
free(substitutename);
if(isabsolute == 1) {
+8 -2
View File
@@ -4093,8 +4093,14 @@ ZEND_VM_HANDLER(41, ZEND_GENERATOR_CREATE, ANY, ANY)
* is allocated on heap.
*/
num_args = EX_NUM_ARGS();
used_stack = (ZEND_CALL_FRAME_SLOT + num_args + EX(func)->op_array.last_var + EX(func)->op_array.T - MIN(EX(func)->op_array.num_args, num_args)) * sizeof(zval);
gen_execute_data = (zend_execute_data*)emalloc(used_stack);
if (EXPECTED(num_args <= EX(func)->op_array.last_var)) {
used_stack = (ZEND_CALL_FRAME_SLOT + EX(func)->op_array.last_var + EX(func)->op_array.T) * sizeof(zval);
gen_execute_data = (zend_execute_data*)emalloc(used_stack);
used_stack = (ZEND_CALL_FRAME_SLOT + EX(func)->op_array.last_var) * sizeof(zval);
} else {
used_stack = (ZEND_CALL_FRAME_SLOT + num_args + EX(func)->op_array.last_var + EX(func)->op_array.T - EX(func)->op_array.num_args) * sizeof(zval);
gen_execute_data = (zend_execute_data*)emalloc(used_stack);
}
memcpy(gen_execute_data, execute_data, used_stack);
/* Save execution context in generator object. */
+8 -2
View File
@@ -1179,8 +1179,14 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GENERATOR_CREATE_SPEC_HANDLER(
* is allocated on heap.
*/
num_args = EX_NUM_ARGS();
used_stack = (ZEND_CALL_FRAME_SLOT + num_args + EX(func)->op_array.last_var + EX(func)->op_array.T - MIN(EX(func)->op_array.num_args, num_args)) * sizeof(zval);
gen_execute_data = (zend_execute_data*)emalloc(used_stack);
if (EXPECTED(num_args <= EX(func)->op_array.last_var)) {
used_stack = (ZEND_CALL_FRAME_SLOT + EX(func)->op_array.last_var + EX(func)->op_array.T) * sizeof(zval);
gen_execute_data = (zend_execute_data*)emalloc(used_stack);
used_stack = (ZEND_CALL_FRAME_SLOT + EX(func)->op_array.last_var) * sizeof(zval);
} else {
used_stack = (ZEND_CALL_FRAME_SLOT + num_args + EX(func)->op_array.last_var + EX(func)->op_array.T - EX(func)->op_array.num_args) * sizeof(zval);
gen_execute_data = (zend_execute_data*)emalloc(used_stack);
}
memcpy(gen_execute_data, execute_data, used_stack);
/* Save execution context in generator object. */
+7 -1
View File
@@ -1376,8 +1376,11 @@ main() {
dir = opendir("/");
if (!dir)
exit(1);
if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0)
if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0) {
close(dir);
exit(0);
}
close(dir);
exit(1);
}
],[
@@ -3109,3 +3112,6 @@ AC_DEFUN([PHP_CHECK_BUILTIN_CTZLL], [
AC_DEFINE_UNQUOTED([PHP_HAVE_BUILTIN_CTZLL], [$have_builtin_ctzll], [Whether the compiler supports __builtin_ctzll])
])
dnl Load the AX_CHECK_COMPILE_FLAG macro from the autoconf archive.
m4_include([build/ax_check_compile_flag.m4])
+2 -2
View File
@@ -17,9 +17,9 @@ if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
set BRANCH=master
set STABILITY=staging
)
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%PHP_SDK_VC%-%PHP_SDK_ARCH%-%APPVEYOR_REPO_BRANCH%
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%PHP_SDK_VC%-%PHP_SDK_ARCH%-%BRANCH%
rem SDK is cached, deps info is cached as well
echo Updating dependencies
echo Updating dependencies in %DEPS_DIR%
call phpsdk_deps --update --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
if %errorlevel% neq 0 exit /b 3
+8 -1
View File
@@ -4,7 +4,14 @@ set NO_INTERACTION=1
set REPORT_EXIT_STATUS=1
set SKIP_IO_CAPTURE_TESTS=1
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%PHP_SDK_VC%-%PHP_SDK_ARCH%-%APPVEYOR_REPO_BRANCH%
if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
set BRANCH=%APPVEYOR_REPO_BRANCH:~4,3%
set STABILITY=stable
) else (
set BRANCH=master
set STABILITY=staging
)
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%PHP_SDK_VC%-%PHP_SDK_ARCH%-%BRANCH%
rem setup MySQL related exts
set MYSQL_PWD=Password12!
+74
View File
@@ -0,0 +1,74 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the current language's compiler
# or gives an error. (Warnings, however, are ignored)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
# force the compiler to issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 4
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
[AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])])
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
AS_VAR_IF(CACHEVAR,yes,
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_COMPILE_FLAGS
+2 -2
View File
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=7
PHP_MINOR_VERSION=1
PHP_RELEASE_VERSION=1
PHP_EXTRA_VERSION="-dev"
PHP_RELEASE_VERSION=2
PHP_EXTRA_VERSION="RC1"
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
+5 -6
View File
@@ -5,12 +5,11 @@ ARG_WITH("curl", "cURL support", "no");
if (PHP_CURL != "no") {
if (CHECK_LIB("libcurl_a.lib;libcurl.lib", "curl", PHP_CURL) &&
CHECK_HEADER_ADD_INCLUDE("curl/easy.h", "CFLAGS_CURL") &&
CHECK_LIB("ssleay32.lib", "curl", PHP_CURL) &&
CHECK_LIB("libeay32.lib", "curl", PHP_CURL)
&& CHECK_LIB("winmm.lib", "curl", PHP_CURL)
&& CHECK_LIB("wldap32.lib", "curl", PHP_CURL)
&& (((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "curl", PHP_CURL))) ||
CHECK_HEADER_ADD_INCLUDE("curl/easy.h", "CFLAGS_CURL") &&
SETUP_OPENSSL("curl", PHP_CURL) > 0 &&
CHECK_LIB("winmm.lib", "curl", PHP_CURL) &&
CHECK_LIB("wldap32.lib", "curl", PHP_CURL) &&
(((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "curl", PHP_CURL))) ||
(PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "curl", PHP_CURL)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED)))
) {
EXTENSION("curl", "interface.c multi.c share.c curl_file.c");
+1 -1
View File
@@ -35,7 +35,7 @@ static void curlfile_ctor(INTERNAL_FUNCTION_PARAMETERS)
size_t fname_len, mime_len, postname_len;
zval *cf = return_value;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|ss", &fname, &fname_len, &mime, &mime_len, &postname, &postname_len) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|ss", &fname, &fname_len, &mime, &mime_len, &postname, &postname_len) == FAILURE) {
return;
}
+2 -2
View File
@@ -17,8 +17,8 @@ var_dump(curl_setopt_array($c, [
CURLOPT_UPLOAD => true,
CURLOPT_INFILE => $f,
CURLOPT_INFILESIZE => filesize(__FILE__),
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_TIMEOUT => 1,
CURLOPT_CONNECTTIMEOUT => 3,
CURLOPT_TIMEOUT => 3,
]));
fclose($f);
var_dump(curl_setopt_array($c, [
+38
View File
@@ -0,0 +1,38 @@
--TEST--
array curl_multi_info_read ( resource $mh [, int &$msgs_in_queue = NULL ] );
--CREDITS--
marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br
--SKIPIF--
<?php
if (getenv("SKIP_ONLINE_TESTS")) { die('skip: online test'); }
if (!extension_loaded('curl')) { print("skip"); }
?>
--FILE--
<?php
$urls = array(
"bugs.php.net",
"pear.php.net"
);
$mh = curl_multi_init();
foreach ($urls as $i => $url) {
$conn[$i] = curl_init($url);
curl_setopt($conn[$i], CURLOPT_RETURNTRANSFER, 1);
curl_multi_add_handle($mh, $conn[$i]);
}
do {
$status = curl_multi_exec($mh, $active);
$info = curl_multi_info_read($mh);
if (false !== $info) {
var_dump(is_array($info));
}
} while ($status === CURLM_CALL_MULTI_PERFORM || $active);
foreach ($urls as $i => $url) {
curl_close($conn[$i]);
}
?>
--EXPECT--
bool(true)
bool(true)
+10 -2
View File
@@ -33,9 +33,9 @@ function curl_cli_server_start() {
// note: even when server prints 'Listening on localhost:8964...Press Ctrl-C to quit.'
// it might not be listening yet...need to wait until fsockopen() call returns
$error = "Unable to connect to servers\n";
$error = "Unable to connect to server\n";
for ($i=0; $i < 60; $i++) {
usleep(25000); // 25ms per try
usleep(50000); // 50ms per try
$status = proc_get_status($handle);
$fp = @fsockopen(PHP_CURL_SERVER_HOSTNAME, PHP_CURL_SERVER_PORT);
// Failure, the server is no longer running
@@ -63,6 +63,14 @@ function curl_cli_server_start() {
register_shutdown_function(
function($handle) use($router) {
proc_terminate($handle);
/* Wait for server to shutdown */
for ($i = 0; $i < 60; $i++) {
$status = proc_get_status($handle);
if (!($status && $status['running'])) {
break;
}
usleep(50000);
}
},
$handle
);
+10
View File
@@ -0,0 +1,10 @@
--TEST--
Test invalid time zone passed to ini_set
--FILE--
<?php
ini_set("date.timezone", "Incorrect/Zone");
?>
--EXPECTF--
Warning: ini_set(): Invalid date.timezone value 'Incorrect/Zone', we selected the timezone 'UTC' for now. in %sini_set_incorrect.php on line %d
+1 -1
View File
@@ -213,7 +213,7 @@ Since: DOM Level 3
*/
int dom_attr_schema_type_info_read(dom_object *obj, zval *retval)
{
php_error_docref(NULL, E_WARNING, "Not yet implemented");
/* TODO */
ZVAL_NULL(retval);
return SUCCESS;
}
+28 -4
View File
@@ -921,7 +921,7 @@ Since: DOM Level 2
PHP_FUNCTION(dom_element_get_attribute_node_ns)
{
zval *id;
xmlNodePtr elemp;
xmlNodePtr elemp, fakeAttrp;
xmlAttrPtr attrp;
dom_object *intern;
size_t uri_len, name_len;
@@ -937,10 +937,34 @@ PHP_FUNCTION(dom_element_get_attribute_node_ns)
attrp = xmlHasNsProp(elemp, (xmlChar *)name, (xmlChar *)uri);
if (attrp == NULL) {
RETURN_NULL();
}
if (xmlStrEqual((xmlChar *) uri, (xmlChar *)DOM_XMLNS_NAMESPACE)) {
xmlNsPtr nsptr;
nsptr = dom_get_nsdecl(elemp, (xmlChar *)name);
if (nsptr != NULL) {
xmlNsPtr curns;
curns = xmlNewNs(NULL, nsptr->href, NULL);
if (nsptr->prefix) {
curns->prefix = xmlStrdup((xmlChar *) nsptr->prefix);
}
if (nsptr->prefix) {
fakeAttrp = xmlNewDocNode(elemp->doc, NULL, (xmlChar *) nsptr->prefix, nsptr->href);
} else {
fakeAttrp = xmlNewDocNode(elemp->doc, NULL, (xmlChar *)"xmlns", nsptr->href);
}
fakeAttrp->type = XML_NAMESPACE_DECL;
fakeAttrp->parent = elemp;
fakeAttrp->ns = curns;
DOM_RET_OBJ((xmlNodePtr) attrp, &ret, intern);
DOM_RET_OBJ(fakeAttrp, &ret, intern);
} else {
RETURN_NULL();
}
} else {
RETURN_NULL();
}
} else {
DOM_RET_OBJ((xmlNodePtr) attrp, &ret, intern);
}
}
/* }}} end dom_element_get_attribute_node_ns */
+2 -1
View File
@@ -549,7 +549,8 @@ int dom_node_next_sibling_read(dom_object *obj, zval *retval)
nextsib = nodep->next;
if (!nextsib) {
return FAILURE;
ZVAL_NULL(retval);
return SUCCESS;
}
php_dom_create_object(nextsib, retval, obj);
+27
View File
@@ -0,0 +1,27 @@
--TEST--
Bug #54382 DOMNode::getAttributeNodeNS doesn't get xmlns* attributes
--SKIPIF--
<?php
require_once('skipif.inc');
?>
--FILE--
<?php
$xmlString = '<?xml version="1.0" encoding="utf-8" ?>
<root xmlns="http://ns" xmlns:ns2="http://ns2">
<ns2:child />
</root>';
$xml=new DOMDocument();
$xml->loadXML($xmlString);
$de = $xml->documentElement;
$ns2 = $de->getAttributeNodeNS("http://www.w3.org/2000/xmlns/", "ns2");
if ($ns2 == NULL) {
echo 'namespace node does not exist.' . "\n";
} else {
echo 'namespace node prefix=' . $ns2->prefix . "\n";
echo 'namespace node namespaceURI=' . $ns2->namespaceURI . "\n";
}
--EXPECT--
namespace node prefix=ns2
namespace node namespaceURI=http://ns2
+24
View File
@@ -0,0 +1,24 @@
--TEST--
Bug #61858 DOMAttr debug info generates E_WARNING
--SKIPIF--
<?php
require_once('skipif.inc');
?>
--FILE--
<?php
$doc = new DOMDocument();
$doc->loadXML('<example a="b">Test</example>');
$example = $doc->getElementsByTagName('example')->item(0);
$attr = $example->getAttributeNode('a');
var_dump($attr);
print_r($attr);
--EXPECTF--
object(DOMAttr)#%d (%d) {
%A
}
DOMAttr Object
(
%A
)
+9 -3
View File
@@ -31,7 +31,7 @@ foreach ($dataNodes AS $node) {
===DONE===
--EXPECTF--
int(3)
object(DOMText)#%d (18) {
object(DOMText)#%d (19) {
["wholeText"]=>
string(3) "
"
@@ -57,6 +57,8 @@ object(DOMText)#%d (18) {
NULL
["previousSibling"]=>
NULL
["nextSibling"]=>
NULL
["attributes"]=>
NULL
["ownerDocument"]=>
@@ -73,7 +75,7 @@ object(DOMText)#%d (18) {
string(3) "
"
}
object(DOMElement)#%d (17) {
object(DOMElement)#%d (18) {
["tagName"]=>
string(5) "form1"
["schemaTypeInfo"]=>
@@ -98,6 +100,8 @@ object(DOMElement)#%d (17) {
string(22) "(object value omitted)"
["previousSibling"]=>
NULL
["nextSibling"]=>
NULL
["attributes"]=>
string(22) "(object value omitted)"
["ownerDocument"]=>
@@ -117,7 +121,7 @@ object(DOMElement)#%d (17) {
Value C
"
}
object(DOMText)#%d (18) {
object(DOMText)#%d (19) {
["wholeText"]=>
string(1) "
"
@@ -143,6 +147,8 @@ object(DOMText)#%d (18) {
NULL
["previousSibling"]=>
NULL
["nextSibling"]=>
NULL
["attributes"]=>
NULL
["ownerDocument"]=>
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #73907 nextSibling property not included in var_dump of DOMNode
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$xmlString = '<?xml version="1.0" encoding="utf-8" ?>
<root>
</root>';
$doc = new DOMDocument();
$doc->loadXML($xmlString);
$attr = $doc->documentElement;
var_dump($attr);
--EXPECTF--
object(DOMElement)#%d (%d) {%A
["nextSibling"]=>
NULL
%A}
-2
View File
@@ -2,8 +2,6 @@
Test: setAttributeNode()
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--INI--
error_reporting = E_ALL & ~E_WARNING
--FILE--
<?php
@@ -47,6 +47,7 @@ DOMDocument Object
[firstChild] => (object value omitted)
[lastChild] => (object value omitted)
[previousSibling] =>
[nextSibling] =>
[attributes] =>
[ownerDocument] =>
[namespaceURI] =>
+1 -1
View File
@@ -4204,7 +4204,7 @@ PHP_FUNCTION(exif_imagetype)
php_stream * stream;
int itype = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &imagefile, &imagefile_len) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &imagefile, &imagefile_len) == FAILURE) {
return;
}
@@ -142,23 +142,23 @@ Warning: exif_imagetype(0.5): failed to open stream: No such file or directory i
bool(false)
-- Iteration 10 --
Warning: exif_imagetype() expects parameter 1 to be string, array given in %s on line %d
Warning: exif_imagetype() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-- Iteration 11 --
Warning: exif_imagetype() expects parameter 1 to be string, array given in %s on line %d
Warning: exif_imagetype() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-- Iteration 12 --
Warning: exif_imagetype() expects parameter 1 to be string, array given in %s on line %d
Warning: exif_imagetype() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-- Iteration 13 --
Warning: exif_imagetype() expects parameter 1 to be string, array given in %s on line %d
Warning: exif_imagetype() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-- Iteration 14 --
Warning: exif_imagetype() expects parameter 1 to be string, array given in %s on line %d
Warning: exif_imagetype() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-- Iteration 15 --
@@ -198,7 +198,7 @@ Warning: exif_imagetype(obj'ct): failed to open stream: No such file or director
bool(false)
-- Iteration 24 --
Warning: exif_imagetype() expects parameter 1 to be string, resource given in %s on line %d
Warning: exif_imagetype() expects parameter 1 to be a valid path, resource given in %s on line %d
NULL
-- Iteration 25 --
+3 -3
View File
@@ -7,9 +7,9 @@ if (PHP_FTP != "no") {
EXTENSION("ftp", "php_ftp.c ftp.c");
if (CHECK_HEADER_ADD_INCLUDE("openssl/ssl.h", "CFLAGS_FTP") &&
CHECK_LIB("ssleay32.lib", "ftp", PHP_FTP) &&
CHECK_LIB("libeay32.lib", "ftp", PHP_FTP)) {
var ret = SETUP_OPENSSL("ftp", PHP_FTP);
if (ret > 0) {
MESSAGE("Enabling SSL support for ext\\ftp");
AC_DEFINE('HAVE_FTP_SSL', 1, 'Have FTP over SSL support');
}
+2 -1
View File
@@ -7,7 +7,7 @@ $context = stream_context_create(array('ssl' => array('local_cert' => dirname(__
for ($i=0; $i<10 && !$socket; ++$i) {
$port = rand(50000, 65535);
$socket = stream_socket_server("tcp://127.0.0.1:$port", $errno, $errstr, STREAM_SERVER_BIND|STREAM_SERVER_LISTEN, $context);
@$socket = stream_socket_server("tcp://127.0.0.1:$port", $errno, $errstr, STREAM_SERVER_BIND|STREAM_SERVER_LISTEN, $context);
}
//set anther random port that is not the same as $port
do{
@@ -15,6 +15,7 @@ do{
}while($pasv_port == $port);
if (!$socket) {
echo "$errstr ($errno)\n";
die("could not start/bind the ftp server\n");
}
+2 -2
View File
@@ -152,7 +152,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
RETURN_FALSE;
}
} else {
ctx = emalloc(sizeof(gdIOCtx));
ctx = ecalloc(1, sizeof(gdIOCtx));
ctx->putC = _php_image_output_putc;
ctx->putBuf = _php_image_output_putbuf;
ctx->gd_free = _php_image_output_ctxfree;
@@ -165,7 +165,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
}
if (!ctx) {
ctx = emalloc(sizeof(gdIOCtx));
ctx = ecalloc(1, sizeof(gdIOCtx));
ctx->putC = _php_image_stream_putc;
ctx->putBuf = _php_image_stream_putbuf;
if (close_stream) {
-2
View File
@@ -693,8 +693,6 @@ void gdImageCopyResampled(gdImagePtr dst, gdImagePtr src, int dstX, int dstY, in
gdImagePtr gdImageRotate90(gdImagePtr src, int ignoretransparent);
gdImagePtr gdImageRotate180(gdImagePtr src, int ignoretransparent);
gdImagePtr gdImageRotate270(gdImagePtr src, int ignoretransparent);
gdImagePtr gdImageRotate45(gdImagePtr src, double dAngle, int clrBack, int ignoretransparent);
gdImagePtr gdImageRotate (gdImagePtr src, double dAngle, int clrBack, int ignoretransparent);
gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, int bgcolor);
void gdImageSetBrush(gdImagePtr im, gdImagePtr brush);
+10 -2
View File
@@ -136,6 +136,10 @@ static int _gd2GetHeader(gdIOCtxPtr in, int *sx, int *sy, int *cs, int *vers, in
GD2_DBG(php_gd_error("%d Chunks vertically", *ncy));
if (gd2_compressed(*fmt)) {
if (*ncx <= 0 || *ncy <= 0 || *ncx > INT_MAX / *ncy) {
GD2_DBG(printf ("Illegal chunk counts: %d * %d\n", *ncx, *ncy));
goto fail1;
}
nc = (*ncx) * (*ncy);
GD2_DBG(php_gd_error("Reading %d chunk index entries", nc));
if (overflow2(sizeof(t_chunk_info), nc)) {
@@ -340,12 +344,16 @@ gdImagePtr gdImageCreateFromGd2Ctx (gdIOCtxPtr in)
for (x = xlo; x < xhi; x++) {
if (im->trueColor) {
if (!gdGetInt(&im->tpixels[y][x], in)) {
im->tpixels[y][x] = 0;
php_gd_error("gd2: EOF while reading\n");
gdImageDestroy(im);
return NULL;
}
} else {
int ch;
if (!gdGetByte(&ch, in)) {
ch = 0;
php_gd_error("gd2: EOF while reading\n");
gdImageDestroy(im);
return NULL;
}
im->pixels[y][x] = ch;
}
-215
View File
@@ -343,218 +343,3 @@ gdImagePtr gdImageRotate270 (gdImagePtr src, int ignoretransparent)
return dst;
}
gdImagePtr gdImageRotate45 (gdImagePtr src, double dAngle, int clrBack, int ignoretransparent)
{
typedef int (*FuncPtr)(gdImagePtr, int, int);
gdImagePtr dst1,dst2,dst3;
FuncPtr f;
double dRadAngle, dSinE, dTan, dShear;
double dOffset; /* Variable skew offset */
int u, iShear, newx, newy;
int clrBackR, clrBackG, clrBackB, clrBackA;
/* See GEMS I for the algorithm details */
dRadAngle = dAngle * ROTATE_DEG2RAD; /* Angle in radians */
dSinE = sin (dRadAngle);
dTan = tan (dRadAngle / 2.0);
newx = (int)(src->sx + src->sy * fabs(dTan));
newy = src->sy;
/* 1st shear */
if (src->trueColor) {
f = gdImageGetTrueColorPixel;
} else {
f = gdImageGetPixel;
}
dst1 = gdImageCreateTrueColor(newx, newy);
/******* Perform 1st shear (horizontal) ******/
if (dst1 == NULL) {
return NULL;
}
#ifdef HAVE_GD_BUNDLED
dst1->alphaBlendingFlag = gdEffectReplace;
#else
gdImageAlphaBlending(dst1, 0);
#endif
if (dAngle == 0.0) {
/* Returns copy of src */
gdImageCopy (dst1, src,0,0,0,0,src->sx,src->sy);
return dst1;
}
gdImagePaletteCopy (dst1, src);
if (ignoretransparent) {
if (gdImageTrueColor(src)) {
dst1->transparent = src->transparent;
} else {
dst1->transparent = gdTrueColorAlpha(gdImageRed(src, src->transparent), gdImageBlue(src, src->transparent), gdImageGreen(src, src->transparent), 127);
}
}
dRadAngle = dAngle * ROTATE_DEG2RAD; /* Angle in radians */
dSinE = sin (dRadAngle);
dTan = tan (dRadAngle / 2.0);
for (u = 0; u < dst1->sy; u++) {
if (dTan >= 0.0) {
dShear = ((double)(u + 0.5)) * dTan;
} else {
dShear = ((double)(u - dst1->sy) + 0.5) * dTan;
}
iShear = (int)floor(dShear);
gdImageSkewX(dst1, src, u, iShear, (dShear - iShear), clrBack, ignoretransparent);
}
/*
The 1st shear may use the original clrBack as color index
Convert it once here
*/
if(!src->trueColor) {
clrBackR = gdImageRed(src, clrBack);
clrBackG = gdImageGreen(src, clrBack);
clrBackB = gdImageBlue(src, clrBack);
clrBackA = gdImageAlpha(src, clrBack);
clrBack = gdTrueColorAlpha(clrBackR, clrBackG, clrBackB, clrBackA);
}
/* 2nd shear */
newx = dst1->sx;
if (dSinE > 0.0) {
dOffset = (src->sx-1) * dSinE;
} else {
dOffset = -dSinE * (src->sx - newx);
}
newy = (int) ((double) src->sx * fabs( dSinE ) + (double) src->sy * cos (dRadAngle))+1;
if (src->trueColor) {
f = gdImageGetTrueColorPixel;
} else {
f = gdImageGetPixel;
}
dst2 = gdImageCreateTrueColor(newx, newy);
if (dst2 == NULL) {
gdImageDestroy(dst1);
return NULL;
}
#ifdef HAVE_GD_BUNDLED
dst2->alphaBlendingFlag = gdEffectReplace;
#else
gdImageAlphaBlending(dst2, 0);
#endif
if (ignoretransparent) {
dst2->transparent = dst1->transparent;
}
for (u = 0; u < dst2->sx; u++, dOffset -= dSinE) {
iShear = (int)floor (dOffset);
gdImageSkewY(dst2, dst1, u, iShear, (dOffset - (double)iShear), clrBack, ignoretransparent);
}
/* 3rd shear */
gdImageDestroy(dst1);
newx = (int) ((double)src->sy * fabs (dSinE) + (double)src->sx * cos (dRadAngle)) + 1;
newy = dst2->sy;
if (src->trueColor) {
f = gdImageGetTrueColorPixel;
} else {
f = gdImageGetPixel;
}
dst3 = gdImageCreateTrueColor(newx, newy);
if (dst3 == NULL) {
gdImageDestroy(dst2);
return NULL;
}
#ifdef HAVE_GD_BUNDLED
dst3->alphaBlendingFlag = gdEffectReplace;
#else
gdImageAlphaBlending(dst3, 0);
#endif
if (ignoretransparent) {
dst3->transparent = dst2->transparent;
}
if (dSinE >= 0.0) {
dOffset = (double)(src->sx - 1) * dSinE * -dTan;
} else {
dOffset = dTan * ((double)(src->sx - 1) * -dSinE + (double)(1 - newy));
}
for (u = 0; u < dst3->sy; u++, dOffset += dTan) {
int iShear = (int)floor(dOffset);
gdImageSkewX(dst3, dst2, u, iShear, (dOffset - iShear), clrBack, ignoretransparent);
}
gdImageDestroy(dst2);
return dst3;
}
gdImagePtr gdImageRotate (gdImagePtr src, double dAngle, int clrBack, int ignoretransparent)
{
gdImagePtr pMidImg;
gdImagePtr rotatedImg;
if (src == NULL) {
return NULL;
}
if (!gdImageTrueColor(src) && (clrBack < 0 || clrBack>=gdImageColorsTotal(src))) {
return NULL;
}
while (dAngle >= 360.0) {
dAngle -= 360.0;
}
while (dAngle < 0) {
dAngle += 360.0;
}
if (dAngle == 90.00) {
return gdImageRotate90(src, ignoretransparent);
}
if (dAngle == 180.00) {
return gdImageRotate180(src, ignoretransparent);
}
if(dAngle == 270.00) {
return gdImageRotate270 (src, ignoretransparent);
}
if ((dAngle > 45.0) && (dAngle <= 135.0)) {
pMidImg = gdImageRotate90 (src, ignoretransparent);
dAngle -= 90.0;
} else if ((dAngle > 135.0) && (dAngle <= 225.0)) {
pMidImg = gdImageRotate180 (src, ignoretransparent);
dAngle -= 180.0;
} else if ((dAngle > 225.0) && (dAngle <= 315.0)) {
pMidImg = gdImageRotate270 (src, ignoretransparent);
dAngle -= 270.0;
} else {
return gdImageRotate45 (src, dAngle, clrBack, ignoretransparent);
}
if (pMidImg == NULL) {
return NULL;
}
rotatedImg = gdImageRotate45 (pMidImg, dAngle, clrBack, ignoretransparent);
gdImageDestroy(pMidImg);
return rotatedImg;
}
/* End Rotate function */
+1 -1
View File
@@ -77,7 +77,7 @@ gdImagePtr gdImageCreateFromXbm(FILE * fd)
max_bit = 32768;
}
if (max_bit) {
bytes = (width * height / 8) + 1;
bytes = (width + 7) / 8 * height;
if (!bytes) {
return 0;
}
+51
View File
@@ -0,0 +1,51 @@
--TEST--
Bug #47946 (ImageConvolution overwrites background)
--DESCRIPTION--
The expected image has black pixel artifacts, what is another issue, though
(perhaps #40158).
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
function array_flatten($array)
{
$tempArray = array();
foreach ($array as $value) {
if (is_array($value)) {
$tempArray = array_merge($tempArray, array_flatten($value));
} else {
$tempArray[] = $value;
}
}
return $tempArray;
}
function makeFilter($resource, $matrix, $offset = 1.0)
{
$divisor = array_sum(array_flatten($matrix));
if ($divisor == 0) {
$divisor = .01;
}
return imageconvolution($resource, $matrix, $divisor, $offset);
}
$edgeMatrix = array(array(1, 0, 1), array(0, 5, 0), array(1, 0, 1));
$im = imagecreatetruecolor(40, 40);
imagealphablending($im, false);
imagefilledrectangle($im, 0, 0, 39, 39, 0x7fffffff);
imagefilledellipse($im, 19, 19, 20, 20, 0x00ff00);
imagesavealpha($im, true);
makeFilter($im, $edgeMatrix);
require_once __DIR__ . '/func.inc';
test_image_equals_file(__DIR__ . '/bug47946_exp.png', $im);
?>
===DONE===
--EXPECT--
The images are equal.
===DONE===
Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug 73868 (DOS vulnerability in gdImageCreateFromGd2Ctx())
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
var_dump(imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . 'bug73868.gd2'));
?>
===DONE===
--EXPECTF--
Warning: imagecreatefromgd2(): gd2: EOF while reading
in %s on line %d
Warning: imagecreatefromgd2(): '%s' is not a valid GD2 file in %s on line %d
bool(false)
===DONE===
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #73869 (Signed Integer Overflow gd_io.c)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
var_dump(imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . 'bug73869a.gd2'));
var_dump(imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . 'bug73869b.gd2'));
?>
===DONE===
--EXPECTF--
Warning: imagecreatefromgd2(): '%s' is not a valid GD2 file in %s on line %d
bool(false)
Warning: imagecreatefromgd2(): '%s' is not a valid GD2 file in %s on line %d
bool(false)
===DONE===
Binary file not shown.
Binary file not shown.
+15
View File
@@ -0,0 +1,15 @@
--TEST--
Bug #73968 (Premature failing of XBM reading)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
$im = imagecreatefromxbm(__DIR__ . DIRECTORY_SEPARATOR . 'bug73968.xbm');
var_dump($im);
?>
===DONE===
--EXPECTF--
resource(%d) of type (gd)
===DONE===
+5
View File
@@ -0,0 +1,5 @@
#define test_width 10
#define test_height 10
static unsigned char test_bits[] = {
0xFF, 0x03, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00,
0xFF, 0x03, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00};
-3
View File
@@ -11,9 +11,6 @@ $im = imagecreatefromxbm(dirname(__FILE__) . '/libgd00094私はガラスを食
var_dump($im);
?>
--EXPECTF--
Warning: imagecreatefromxbm(): gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
in %slibgd00094-mb.php on line %d
Warning: imagecreatefromxbm(): '%slibgd00094私はガラスを食べられます.xbm' is not a valid XBM file in %slibgd00094-mb.php on line %d
bool(false)
-3
View File
@@ -11,9 +11,6 @@ $im = imagecreatefromxbm(dirname(__FILE__) . '/libgd00094.xbm');
var_dump($im);
?>
--EXPECTF--
Warning: imagecreatefromxbm(): gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
in %slibgd00094.php on line %d
Warning: imagecreatefromxbm(): '%slibgd00094.xbm' is not a valid XBM file in %slibgd00094.php on line %d
bool(false)
+3
View File
@@ -3,8 +3,11 @@ PHP_ARG_WITH(gmp, for GNU MP support,
if test "$PHP_GMP" != "no"; then
MACHINE_INCLUDES=$($CC -dumpmachine)
for i in $PHP_GMP /usr/local /usr; do
test -f $i/include/gmp.h && GMP_DIR=$i && break
test -f $i/include/$MACHINE_INCLUDES/gmp.h && GMP_DIR=$i && break
done
if test -z "$GMP_DIR"; then
+126 -1
View File
@@ -597,6 +597,122 @@ PHP_FUNCTION(hash_algos)
}
/* }}} */
static inline zend_bool php_hash_is_crypto(const char *algo, size_t algo_len) {
char *blacklist[] = { "adler32", "crc32", "crc32b", "fnv132", "fnv1a32", "fnv164", "fnv1a64", "joaat", NULL };
char *lower = zend_str_tolower_dup(algo, algo_len);
int i = 0;
while (blacklist[i]) {
if (strcmp(lower, blacklist[i]) == 0) {
efree(lower);
return 0;
}
i++;
}
efree(lower);
return 1;
}
/* {{{ proto string hash_hkdf(string algo, string ikm [, int length = 0, string info = '', string salt = ''])
RFC5869 HMAC-based key derivation function */
PHP_FUNCTION(hash_hkdf)
{
zend_string *returnval, *ikm, *algo, *info = NULL, *salt = NULL;
zend_long length = 0;
unsigned char *prk, *digest, *K;
int i, rounds;
const php_hash_ops *ops;
void *context;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS|lSS", &algo, &ikm, &length, &info, &salt) == FAILURE) {
return;
}
ops = php_hash_fetch_ops(ZSTR_VAL(algo), ZSTR_LEN(algo));
if (!ops) {
php_error_docref(NULL, E_WARNING, "Unknown hashing algorithm: %s", ZSTR_VAL(algo));
RETURN_FALSE;
}
if (!php_hash_is_crypto(ZSTR_VAL(algo), ZSTR_LEN(algo))) {
php_error_docref(NULL, E_WARNING, "Non-cryptographic hashing algorithm: %s", ZSTR_VAL(algo));
RETURN_FALSE;
}
if (ZSTR_LEN(ikm) == 0) {
php_error_docref(NULL, E_WARNING, "Input keying material cannot be empty");
RETURN_FALSE;
}
if (length < 0) {
php_error_docref(NULL, E_WARNING, "Length must be greater than or equal to 0: " ZEND_LONG_FMT, length);
RETURN_FALSE;
} else if (length == 0) {
length = ops->digest_size;
} else if (length > ops->digest_size * 255) {
php_error_docref(NULL, E_WARNING, "Length must be less than or equal to %d: " ZEND_LONG_FMT, ops->digest_size * 255, length);
RETURN_FALSE;
}
context = emalloc(ops->context_size);
// Extract
ops->hash_init(context);
K = emalloc(ops->block_size);
php_hash_hmac_prep_key(K, ops, context,
(unsigned char *) (salt ? ZSTR_VAL(salt) : ""), salt ? ZSTR_LEN(salt) : 0);
prk = emalloc(ops->digest_size);
php_hash_hmac_round(prk, ops, context, K, (unsigned char *) ZSTR_VAL(ikm), ZSTR_LEN(ikm));
php_hash_string_xor_char(K, K, 0x6A, ops->block_size);
php_hash_hmac_round(prk, ops, context, K, prk, ops->digest_size);
ZEND_SECURE_ZERO(K, ops->block_size);
// Expand
returnval = zend_string_alloc(length, 0);
digest = emalloc(ops->digest_size);
for (i = 1, rounds = (length - 1) / ops->digest_size + 1; i <= rounds; i++) {
// chr(i)
unsigned char c[1];
c[0] = (i & 0xFF);
php_hash_hmac_prep_key(K, ops, context, prk, ops->digest_size);
ops->hash_init(context);
ops->hash_update(context, K, ops->block_size);
if (i > 1) {
ops->hash_update(context, digest, ops->digest_size);
}
if (info != NULL && ZSTR_LEN(info) > 0) {
ops->hash_update(context, (unsigned char *) ZSTR_VAL(info), ZSTR_LEN(info));
}
ops->hash_update(context, c, 1);
ops->hash_final(digest, context);
php_hash_string_xor_char(K, K, 0x6A, ops->block_size);
php_hash_hmac_round(digest, ops, context, K, digest, ops->digest_size);
memcpy(
ZSTR_VAL(returnval) + ((i - 1) * ops->digest_size),
digest,
(i == rounds ? length - ((i - 1) * ops->digest_size) : ops->digest_size)
);
}
ZEND_SECURE_ZERO(K, ops->block_size);
ZEND_SECURE_ZERO(digest, ops->digest_size);
ZEND_SECURE_ZERO(prk, ops->digest_size);
efree(K);
efree(context);
efree(prk);
efree(digest);
ZSTR_VAL(returnval)[length] = 0;
RETURN_STR(returnval);
}
/* {{{ proto string hash_pbkdf2(string algo, string password, string salt, int iterations [, int length = 0, bool raw_output = false])
Generate a PBKDF2 hash of the given password and salt
Returns lowercase hexits by default */
@@ -778,7 +894,7 @@ static void php_hash_dtor(zend_resource *rsrc) /* {{{ */
}
if (hash->key) {
memset(hash->key, 0, hash->ops->block_size);
ZEND_SECURE_ZERO(hash->key, hash->ops->block_size);
efree(hash->key);
}
efree(hash);
@@ -1205,6 +1321,14 @@ ZEND_BEGIN_ARG_INFO(arginfo_hash_equals, 0)
ZEND_ARG_INFO(0, user_string)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_hash_hkdf, 0, 0, 2)
ZEND_ARG_INFO(0, ikm)
ZEND_ARG_INFO(0, algo)
ZEND_ARG_INFO(0, length)
ZEND_ARG_INFO(0, string)
ZEND_ARG_INFO(0, salt)
ZEND_END_ARG_INFO()
/* BC Land */
#ifdef PHP_MHASH_BC
ZEND_BEGIN_ARG_INFO(arginfo_mhash_get_block_size, 0)
@@ -1253,6 +1377,7 @@ const zend_function_entry hash_functions[] = {
PHP_FE(hash_algos, arginfo_hash_algos)
PHP_FE(hash_pbkdf2, arginfo_hash_pbkdf2)
PHP_FE(hash_equals, arginfo_hash_equals)
PHP_FE(hash_hkdf, arginfo_hash_hkdf)
/* BC Land */
#ifdef PHP_HASH_MD5_NOT_IN_CORE
+1
View File
@@ -16,6 +16,7 @@
+----------------------------------------------------------------------+
*/
#include "php_hash.h"
#include "php_hash_sha3.h"
#if (defined(__APPLE__) || defined(__APPLE_CC__)) && \
+1
View File
@@ -130,6 +130,7 @@ extern zend_module_entry hash_module_entry;
PHP_FUNCTION(hash);
PHP_FUNCTION(hash_file);
PHP_FUNCTION(hash_hkdf);
PHP_FUNCTION(hash_hmac);
PHP_FUNCTION(hash_hmac_file);
PHP_FUNCTION(hash_init);
-1
View File
@@ -20,7 +20,6 @@
#define PHP_HASH_SHA3_H
#include "php.h"
#include "ext/hash/php_hash.h"
typedef struct {
unsigned char state[200]; // 5 * 5 * sizeof(uint64)
+94
View File
@@ -0,0 +1,94 @@
--TEST--
Test hash_hkdf() function: basic functionality
--SKIPIF--
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
--FILE--
<?php
/* Prototype : string hkdf ( string $algo , string $ikm [, int $length , string $info = '' , string $salt = '' ] )
* Description: HMAC-based Key Derivation Function
* Source code: ext/hash/hash.c
*/
echo "*** Testing hash_hkdf(): basic functionality ***\n";
$ikm = 'input key material';
echo 'md2: ', bin2hex(hash_hkdf('md2', $ikm)), "\n";
echo 'md4: ', bin2hex(hash_hkdf('md4', $ikm)), "\n";
echo 'md5: ', bin2hex(hash_hkdf('md5', $ikm)), "\n";
echo 'sha1: ', bin2hex(hash_hkdf('sha1', $ikm)), "\n";
echo 'sha224: ', bin2hex(hash_hkdf('sha224', $ikm)), "\n";
echo 'sha256: ', bin2hex(hash_hkdf('sha256', $ikm)), "\n";
echo 'sha384: ', bin2hex(hash_hkdf('sha384', $ikm)), "\n";
echo 'sha512: ', bin2hex(hash_hkdf('sha512', $ikm)), "\n";
echo 'ripemd128: ', bin2hex(hash_hkdf('ripemd128', $ikm)), "\n";
echo 'ripemd160: ', bin2hex(hash_hkdf('ripemd160', $ikm)), "\n";
echo 'ripemd256: ', bin2hex(hash_hkdf('ripemd256', $ikm)), "\n";
echo 'ripemd320: ', bin2hex(hash_hkdf('ripemd320', $ikm)), "\n";
echo 'whirlpool: ', bin2hex(hash_hkdf('whirlpool', $ikm)), "\n";
echo 'tiger128,3: ', bin2hex(hash_hkdf('tiger128,3', $ikm)), "\n";
echo 'tiger160,3: ', bin2hex(hash_hkdf('tiger160,3', $ikm)), "\n";
echo 'tiger192,3: ', bin2hex(hash_hkdf('tiger192,3', $ikm)), "\n";
echo 'tiger128,4: ', bin2hex(hash_hkdf('tiger128,4', $ikm)), "\n";
echo 'tiger160,4: ', bin2hex(hash_hkdf('tiger160,4', $ikm)), "\n";
echo 'tiger192,4: ', bin2hex(hash_hkdf('tiger192,4', $ikm)), "\n";
echo 'haval128,3: ', bin2hex(hash_hkdf('haval128,3', $ikm)), "\n";
echo 'haval160,3: ', bin2hex(hash_hkdf('haval160,3', $ikm)), "\n";
echo 'haval192,3: ', bin2hex(hash_hkdf('haval192,3', $ikm)), "\n";
echo 'haval224,3: ', bin2hex(hash_hkdf('haval224,3', $ikm)), "\n";
echo 'haval256,3: ', bin2hex(hash_hkdf('haval256,3', $ikm)), "\n";
echo 'haval128,4: ', bin2hex(hash_hkdf('haval128,4', $ikm)), "\n";
echo 'haval160,4: ', bin2hex(hash_hkdf('haval160,4', $ikm)), "\n";
echo 'haval192,4: ', bin2hex(hash_hkdf('haval192,4', $ikm)), "\n";
echo 'haval224,4: ', bin2hex(hash_hkdf('haval224,4', $ikm)), "\n";
echo 'haval256,4: ', bin2hex(hash_hkdf('haval256,4', $ikm)), "\n";
echo 'haval128,5: ', bin2hex(hash_hkdf('haval128,5', $ikm)), "\n";
echo 'haval160,5: ', bin2hex(hash_hkdf('haval160,5', $ikm)), "\n";
echo 'haval192,5: ', bin2hex(hash_hkdf('haval192,5', $ikm)), "\n";
echo 'haval224,5: ', bin2hex(hash_hkdf('haval224,5', $ikm)), "\n";
echo 'haval256,5: ', bin2hex(hash_hkdf('haval256,5', $ikm)), "\n";
echo 'snefru: ', bin2hex(hash_hkdf('snefru', $ikm)), "\n";
echo 'snefru256: ', bin2hex(hash_hkdf('snefru256', $ikm)), "\n";
echo 'gost: ', bin2hex(hash_hkdf('gost', $ikm)), "\n";
?>
--EXPECTF--
*** Testing hash_hkdf(): basic functionality ***
md2: 87779851d2377dab25da16fd7aadfdf5
md4: 422c6bd8dd2a6baae8abadef618c3ede
md5: 98b16391063ecee006a3ca8ee5776b1e
sha1: a71863230e3782240265126a53e137af6667e988
sha224: 51678ceb17e803505187b2cf6451c30fbc572fda165bb69bbd117c7a
sha256: d8f0bede4b652933c32a92eccf7723f7eeb4701744c81325dc3f0fa9fda24499
sha384: f600680e677bb417a7a22a4da8b167c0d91823a7a5d56a49aeb1838bb2320c05068d15d6d980824fee542a279d310c3a
sha512: fb1b86549e941b81821a89ac6ba7c4f93465077b3f2af94352ebf1d041efcd3c5694469c1ae31bb10db4c1d2ab84f07e4518ba33a3eadd4a149425750285c640
ripemd128: cb6418fc0dc9efaeb7e9654390fa7f14
ripemd160: ba42dbb34f08e9337ace15295f218754a41d6c39
ripemd256: f2e96b292935e2395b59833ed89d928ac1197ff62c8031ebc06a3f5bad19513f
ripemd320: a13a682072525ceb4c4a5fef59096e682096e1096e6e7e238c7bd48a6f6c6a9ba3d7d9fbee6b68c4
whirlpool: 497c717e04d896c3d582742c614435b7d0963b39de12dcf532540d39164b3b85214014620dfdff4a089a06b06aff43c39a3b4d9b806913cf6309de58ff1151f5
tiger128,3: e13c2e7262892c6bd8dfc24121e7cb34
tiger160,3: 48cc5a9f5e5d7029eb0544662222c0ba13822b7b
tiger192,3: 5a665d23b6cbb405668160e58b01aebef74eba979f4bc70b
tiger128,4: 8acf517ecf58cccbd65c1186d71e4116
tiger160,4: cc0e33ee26700a2eb9a994bbb0e6cef29b429441
tiger192,4: 97fa02d42331321fdc05c7f8dbc756d751ca36ce1aee69b0
haval128,3: 2accab8029d42fb15fdbe9d3e2a470ca
haval160,3: 496fd29e7fc8351d2971b96a3733a7b3de000064
haval192,3: 238a731801439b1f195e1a1568ce75251e1dd719d904a8a2
haval224,3: d863e596ff6b2bdba1ed7b313df1c3d177176312e81b47e9290f7566
haval256,3: 96f555fe41255c34fe57b275f1ae40bbb8f07c6a2a6d68c849748fbb393ff443
haval128,4: 9822af229cc59527a72e231a690fad3b
haval160,4: 1bbbc4d632daaf94d5ba167efaa70af5b753effe
haval192,4: dd12a8f8919cbf5632497f0918b30236371dd1b55f71e824
haval224,4: 8af449fb4eb627eb8887507c1279a116ac4325b5806dd22e2f2af410
haval256,4: bd74a6d5fa1ec23a92ce1fd76c36bc8be36f5eddbea821545a91810e1f8d6fc5
haval128,5: 84564f3450a6ccf6041162207dc8acba
haval160,5: b55cd1b3c514457b9e61c51ad22f302f6ec7cca1
haval192,5: d1db7a8e69b327455d530d1ac60f774023b8b4bdd6bbbf92
haval224,5: c5a2576511f1143c6e29f63d82d6e0be8f67d0bea448e27238be5000
haval256,5: 9dbab73d13f1fd3a1b41398fe90ba1f298329681d861b023373c33f1051bd4d3
snefru: 798eac954e5ece38e9acb63b50c1c2ecb799d34356358cec5a80eeeea91c8de9
snefru256: 798eac954e5ece38e9acb63b50c1c2ecb799d34356358cec5a80eeeea91c8de9
gost: 64edd584b87a2dfdd1f2b44ed2db8bd27af8386aafe751c2aebaed32dfa3852e
+32
View File
@@ -0,0 +1,32 @@
--TEST--
Test hash_hkdf() function: edge cases
--SKIPIF--
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
--FILE--
<?php
/* Prototype : string hkdf ( string $algo , string $ikm [, int $length , string $info = '' , string $salt = '' ] )
* Description: HMAC-based Key Derivation Function
* Source code: ext/hash/hash.c
*/
echo "*** Testing hash_hkdf(): edge cases ***\n";
$ikm = 'input key material';
echo 'Length < digestSize: ', bin2hex(hash_hkdf('md5', $ikm, 7)), "\n";
echo 'Length % digestSize != 0: ', bin2hex(hash_hkdf('md5', $ikm, 17)), "\n";
echo 'Algo name case-sensitivity: ', (bin2hex(hash_hkdf('Md5', $ikm, 7)) === '98b16391063ece' ? 'true' : 'false'), "\n";
echo "Non-crypto algo name case-sensitivity:\n";
var_dump(hash_hkdf('jOaAt', $ikm));
?>
--EXPECTF--
*** Testing hash_hkdf(): edge cases ***
Length < digestSize: 98b16391063ece
Length % digestSize != 0: 98b16391063ecee006a3ca8ee5776b1e5f
Algo name case-sensitivity: true
Non-crypto algo name case-sensitivity:
Warning: hash_hkdf(): Non-cryptographic hashing algorithm: jOaAt in %s on line %d
bool(false)
+100
View File
@@ -0,0 +1,100 @@
--TEST--
Test hash_hkdf() function: error conditions
--SKIPIF--
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
--FILE--
<?php
/* Prototype : string hkdf ( string $algo , string $ikm [, int $length , string $info = '' , string $salt = '' ] )
* Description: HMAC-based Key Derivation Function
* Source code: ext/hash/hash.c
*/
$ikm = 'input key material';
echo "*** Testing hash_hkdf(): error conditions ***\n";
echo "\n-- Testing hash_hkdf() function with less than expected no. of arguments --\n";
var_dump(hash_hkdf());
var_dump(hash_hkdf('sha1'));
echo "\n-- Testing hash_hkdf() function with more than expected no. of arguments --\n";
var_dump(hash_hkdf('sha1', $ikm, 20, '', '', 'extra parameter'));
echo "\n-- Testing hash_hkdf() function with invalid hash algorithm --\n";
var_dump(hash_hkdf('foo', $ikm));
echo "\n-- Testing hash_hkdf() function with non-cryptographic hash algorithm --\n";
var_dump(hash_hkdf('adler32', $ikm));
var_dump(hash_hkdf('crc32', $ikm));
var_dump(hash_hkdf('crc32b', $ikm));
var_dump(hash_hkdf('fnv132', $ikm));
var_dump(hash_hkdf('fnv1a32', $ikm));
var_dump(hash_hkdf('fnv164', $ikm));
var_dump(hash_hkdf('fnv1a64', $ikm));
var_dump(hash_hkdf('joaat', $ikm));
echo "\n-- Testing hash_hkdf() function with invalid parameters --\n";
var_dump(hash_hkdf('sha1', ''));
var_dump(hash_hkdf('sha1', $ikm, -1));
var_dump(hash_hkdf('sha1', $ikm, 20 * 255 + 1)); // Length can't be more than 255 times the hash digest size
?>
===Done===
--EXPECTF--
*** Testing hash_hkdf(): error conditions ***
-- Testing hash_hkdf() function with less than expected no. of arguments --
Warning: hash_hkdf() expects at least 2 parameters, 0 given in %s on line %d
NULL
Warning: hash_hkdf() expects at least 2 parameters, 1 given in %s on line %d
NULL
-- Testing hash_hkdf() function with more than expected no. of arguments --
Warning: hash_hkdf() expects at most 5 parameters, 6 given in %s on line %d
NULL
-- Testing hash_hkdf() function with invalid hash algorithm --
Warning: hash_hkdf(): Unknown hashing algorithm: foo in %s on line %d
bool(false)
-- Testing hash_hkdf() function with non-cryptographic hash algorithm --
Warning: hash_hkdf(): Non-cryptographic hashing algorithm: adler32 in %s on line %d
bool(false)
Warning: hash_hkdf(): Non-cryptographic hashing algorithm: crc32 in %s on line %d
bool(false)
Warning: hash_hkdf(): Non-cryptographic hashing algorithm: crc32b in %s on line %d
bool(false)
Warning: hash_hkdf(): Non-cryptographic hashing algorithm: fnv132 in %s on line %d
bool(false)
Warning: hash_hkdf(): Non-cryptographic hashing algorithm: fnv1a32 in %s on line %d
bool(false)
Warning: hash_hkdf(): Non-cryptographic hashing algorithm: fnv164 in %s on line %d
bool(false)
Warning: hash_hkdf(): Non-cryptographic hashing algorithm: fnv1a64 in %s on line %d
bool(false)
Warning: hash_hkdf(): Non-cryptographic hashing algorithm: joaat in %s on line %d
bool(false)
-- Testing hash_hkdf() function with invalid parameters --
Warning: hash_hkdf(): Input keying material cannot be empty in %s on line %d
bool(false)
Warning: hash_hkdf(): Length must be greater than or equal to 0: -1 in %s on line %d
bool(false)
Warning: hash_hkdf(): Length must be less than or equal to 5100: 5101 in %s on line %d
bool(false)
===Done===
+80
View File
@@ -0,0 +1,80 @@
--TEST--
Test hash_hkdf() function: RFC 5869 test vectors
--SKIPIF--
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
--FILE--
<?php
/* Prototype : string hkdf ( string $algo , string $ikm [, int $length , string $info = '' , string $salt = '' ] )
* Description: HMAC-based Key Derivation Function
* Source code: ext/hash/hash.c
*/
echo "*** Testing hash_hkdf(): RFC 5869 test vectors ***\n";
echo "Test case 1 (SHA-256): ",
bin2hex(hash_hkdf(
'sha256',
"\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
42,
"\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9",
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c"
)), "\n";
echo "Test case 2 (SHA-256 with longer inputs/outputs): ",
bin2hex(hash_hkdf(
'sha256',
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f",
82,
"\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
"\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
)), "\n";
echo "Test case 3 (SHA-256 with zero-length salt, info): ",
bin2hex(hash_hkdf(
'sha256',
"\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
42,
'',
''
)), "\n";
echo "Test case 4 (SHA-1): ",
bin2hex(hash_hkdf(
'sha1',
"\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
42,
"\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9",
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c"
)), "\n";
echo "Test case 5 (SHA-1 with longer inputs/outputs): ",
bin2hex(hash_hkdf(
'sha1',
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f",
82,
"\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
"\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
)), "\n";
echo "Test case 6 (SHA-1 with zero-length salt, info): ",
bin2hex(hash_hkdf(
'sha1',
"\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
42,
'',
''
)), "\n";
echo "Test case 7 (SHA-1 with zero-length info, salt not provided): ",
bin2hex(hash_hkdf(
'sha1',
"\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
42,
''
)), "\n";
?>
===Done===
--EXPECTF--
*** Testing hash_hkdf(): RFC 5869 test vectors ***
Test case 1 (SHA-256): 3cb25f25faacd57a90434f64d0362f2a2d2d0a90cf1a5a4c5db02d56ecc4c5bf34007208d5b887185865
Test case 2 (SHA-256 with longer inputs/outputs): b11e398dc80327a1c8e7f78c596a49344f012eda2d4efad8a050cc4c19afa97c59045a99cac7827271cb41c65e590e09da3275600c2f09b8367793a9aca3db71cc30c58179ec3e87c14c01d5c1f3434f1d87
Test case 3 (SHA-256 with zero-length salt, info): 8da4e775a563c18f715f802a063c5a31b8a11f5c5ee1879ec3454e5f3c738d2d9d201395faa4b61a96c8
Test case 4 (SHA-1): 085a01ea1b10f36933068b56efa5ad81a4f14b822f5b091568a9cdd4f155fda2c22e422478d305f3f896
Test case 5 (SHA-1 with longer inputs/outputs): 0bd770a74d1160f7c9f12cd5912a06ebff6adcae899d92191fe4305673ba2ffe8fa3f1a4e5ad79f3f334b3b202b2173c486ea37ce3d397ed034c7f9dfeb15c5e927336d0441f4c4300e2cff0d0900b52d3b4
Test case 6 (SHA-1 with zero-length salt, info): 0ac1af7002b3d761d1e55298da9d0506b9ae52057220a306e07b6b87e8df21d0ea00033de03984d34918
Test case 7 (SHA-1 with zero-length info, salt not provided): 2c91117204d745f3500d636a62f64f0ab3bae548aa53d423b0d1f27ebba6f5e5673a081d70cce7acfc48
===Done===
+1 -1
View File
@@ -86,7 +86,7 @@ if test "$PHP_INTL" != "no"; then
breakiterator/codepointiterator_methods.cpp \
uchar/uchar.c \
idn/idn.c \
$icu_spoof_src, $ext_shared,,$ICU_INCS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
$icu_spoof_src, $ext_shared,,$ICU_INCS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1,cxx)
PHP_ADD_BUILD_DIR($ext_builddir/collator)
PHP_ADD_BUILD_DIR($ext_builddir/converter)
PHP_ADD_BUILD_DIR($ext_builddir/common)
+2 -1
View File
@@ -110,7 +110,8 @@ PHP_FUNCTION(grapheme_strpos)
size_t haystack_len, needle_len;
const char *found;
zend_long loffset = 0;
int32_t offset = 0, noffset = 0;
int32_t offset = 0;
size_t noffset = 0;
zend_long ret_pos;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len, &loffset) == FAILURE) {
+2 -4
View File
@@ -6,10 +6,8 @@ ARG_WITH("ldap", "LDAP support", "no");
if (PHP_LDAP != "no") {
if (CHECK_HEADER_ADD_INCLUDE("ldap.h", "CFLAGS_LDAP", PHP_PHP_BUILD + "\\include\\openldap;" + PHP_PHP_BUILD + "\\openldap\\include;" + PHP_LDAP) &&
CHECK_HEADER_ADD_INCLUDE("lber.h", "CFLAGS_LDAP", PHP_PHP_BUILD + "\\include\\openldap;" + PHP_PHP_BUILD + "\\openldap\\include;" + PHP_LDAP)
&&
CHECK_LIB("ssleay32.lib", "ldap", PHP_LDAP) &&
CHECK_LIB("libeay32.lib", "ldap", PHP_LDAP) &&
CHECK_HEADER_ADD_INCLUDE("lber.h", "CFLAGS_LDAP", PHP_PHP_BUILD + "\\include\\openldap;" + PHP_PHP_BUILD + "\\openldap\\include;" + PHP_LDAP) &&
SETUP_OPENSSL("ldap", PHP_LDAP) > 0 &&
CHECK_LIB("oldap32_a.lib", "ldap", PHP_LDAP) &&
CHECK_LIB("olber32_a.lib", "ldap", PHP_LDAP)&&
CHECK_LIB("libsasl.lib", "ldap", PHP_LDAP)) {
+5 -2
View File
@@ -1476,7 +1476,7 @@ static void php_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper)
zend_ulong index;
int is_full_add=0; /* flag for full add operation so ldap_mod_add can be put back into oper, gerrit THomson */
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsa", &link, &dn, &dn_len, &entry) != SUCCESS) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsa/", &link, &dn, &dn_len, &entry) != SUCCESS) {
return;
}
@@ -1524,6 +1524,7 @@ static void php_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper)
if (Z_TYPE_P(value) != IS_ARRAY) {
num_values = 1;
} else {
SEPARATE_ARRAY(value);
num_values = zend_hash_num_elements(Z_ARRVAL_P(value));
}
@@ -1729,7 +1730,7 @@ PHP_FUNCTION(ldap_modify_batch)
);
*/
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsa", &link, &dn, &dn_len, &mods) != SUCCESS) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsa/", &link, &dn, &dn_len, &mods) != SUCCESS) {
return;
}
@@ -1774,6 +1775,7 @@ PHP_FUNCTION(ldap_modify_batch)
RETURN_FALSE;
}
SEPARATE_ARRAY(mod);
/* for the modification hashtable... */
zend_hash_internal_pointer_reset(Z_ARRVAL_P(mod));
num_modprops = zend_hash_num_elements(Z_ARRVAL_P(mod));
@@ -1848,6 +1850,7 @@ PHP_FUNCTION(ldap_modify_batch)
RETURN_FALSE;
}
SEPARATE_ARRAY(modinfo);
/* is the array not empty? */
zend_hash_internal_pointer_reset(Z_ARRVAL_P(modinfo));
num_modvals = zend_hash_num_elements(Z_ARRVAL_P(modinfo));
+71
View File
@@ -1,3 +1,74 @@
To ease testing LDAP-Setups we've created a vagrant-setup.
Prerequisits:
=============
You will need vagrant on your box. Get it from https://www.vagrantup.com
Usage:
======
To use it follow these steps:
* Create a Vagrant-file with the following content.
* Go to that directory and run "vagrant up"
```
$setup = <<<SETUP
apt-get update
DEBIAN_FRONTEND=noninteractive aptitude install -q -y slapd ldap-utils
export SLAPPASS=`slappasswd -s password`
echo "dn: olcDatabase={1}hdb,cn=config
changetype: modify
replace: olcSuffix
olcSuffix: dc=nodomain
-
replace: olcRootDN
olcRootDN: dc=admin,dc=nodomain
-
replace: olcRootPW
olcRootPW: ${SLAPPASS}" | ldapmodify -Y EXTERNAL -H ldapi:///
echo "dn: dc=nodomain
objectClass: dcObject
objectClass: organization
o: Example
dc: example
dn: ou=extldap,dc=nodomain
objectClass: organizationalUnit
ou: extldap" | ldapadd -c -x -H ldap://localhost:389 -D "dc=admin,dc=nodomain" -w password
SETUP
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provision "shell", inline: $setup
end
```
Now you will have a virtual machine up and running on IP-Address 192.168.10.33 listening on port 369 for incomming LDAP-connections. The machine is already configured to execute the LDAP-Tests
The next step is to go into the PHP-Source-directory. Configure and make the source as appropriate.
Before running the LDAP-Tests you need to set some environment-variables:
export LDAP_TEST_PASSWD="password"
export LDAP_TEST_BASE="ou=extldap,dc=nodomain"
export LDAP_TEST_USER="dc=admin,dc=nodomain"
export LDAP_TEST_HOST=192.168.33.10
Now you can run the test-suite by calling "make test". To test only the LDAP-Tests, run "make test TESTS=ext/ldap"
CAVEAT: The current setup does not (yet) test secure connections.
========
OLD README
Most tests here relies on the availability of an LDAP server configured with TLS.
Client/Server configuration:
+30
View File
@@ -0,0 +1,30 @@
--TEST--
Bug #73933 (error/segfault with ldap_mod_replace and opcache)
--SKIPIF--
<?php
require_once('skipif.inc');
?>
--FILE--
<?php
/* We are assuming 3333 is not connectable */
$ldap = ldap_connect('127.0.0.1', 3333);
ldap_mod_replace($ldap, null, array(
'lockoutTime' => array(0),
));
ldap_modify_batch($ldap, null, array( [
"attrib" => "mail",
"modtype" => LDAP_MODIFY_BATCH_ADD,
"values" => [
"test@example.com",
"test-2@example.com", ]]));
ldap_close($ldap);
?>
--EXPECTF--
Warning: ldap_mod_replace(): Modify: Can't contact LDAP server in %sbug73933.php on line %d
Warning: ldap_modify_batch(): Batch Modify: Can't contact LDAP server in %sbug73933.php on line %d
+3 -1
View File
@@ -572,7 +572,9 @@ PHP_FUNCTION(mcrypt_generic_init)
memcpy(key_s, key, key_len);
if (iv_len != (size_t)iv_size) {
php_error_docref(NULL, E_WARNING, "Iv size incorrect; supplied length: %zd, needed: %d", iv_len, iv_size);
if (mcrypt_enc_mode_has_iv(pm->td)) {
php_error_docref(NULL, E_WARNING, "Iv size incorrect; supplied length: %zd, needed: %d", iv_len, iv_size);
}
if (iv_len > (size_t)iv_size) {
iv_len = iv_size;
}
+13
View File
@@ -0,0 +1,13 @@
--TEST--
Bug #67707 IV not needed for ECB encryption mode, but it returns a warning
--SKIPIF--
<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
--FILE--
<?php
$td = mcrypt_module_open('rijndael-256', '', 'ecb', '');
mcrypt_generic_init($td, 'secret key', NULL);
?>
--EXPECTF--
Deprecated: Function mcrypt_module_open() is deprecated in %s on line %d
Deprecated: Function mcrypt_generic_init() is deprecated in %s on line %d
+1 -3
View File
@@ -1315,9 +1315,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
} else {
zval_ptr_dtor(&retval);
}
if (fci.params) {
efree(fci.params);
}
zend_fcall_info_args_clear(&fci, 1);
} else if (ctor_params) {
zend_throw_exception_ex(zend_ce_exception, 0, "Class %s does not have a constructor hence you cannot use ctor_params", ZSTR_VAL(ce->name));
}
+38
View File
@@ -0,0 +1,38 @@
--TEST--
Bug #69899: Segfault on stmt close after free_result with mysqlnd.
--DESCRIPTION--
The segfault happens only if the database connection was already closed and
free_result is called on a prepared statement followed by closing that
statement. This is due to mysqlnd_stmt::free_result (mysqlnd_ps.c) which
unconditionally sets the connection of the statement to ready, despite the fact
that it might already be closed.
--SKIPIF--
<?php
require_once __DIR__ . '/skipif.inc';
require_once __DIR__ . '/skipifconnectfailure.inc';
require_once __DIR__ . '/connect.inc';
if (!$IS_MYSQLND) {
die('mysqlnd only');
}
?>
--FILE--
<?php
require_once __DIR__ . '/connect.inc';
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket);
$stmt = $mysqli->prepare('SELECT 1');
var_dump(
$mysqli->close(),
$stmt->free_result(),
$stmt->close()
);
?>
--EXPECT--
bool(true)
NULL
bool(true)
+24
View File
@@ -0,0 +1,24 @@
--TEST--
Bug #73949 (leak in mysqli_fetch_object)
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
require_once("connect.inc");
class cc{
function __construct($c=null){
}
};
$i=mysqli_connect('p:'.$host, $user, $passwd, $db);
$res=mysqli_query($i, "SHOW STATUS LIKE 'Connections'");
$t=array(new stdClass);
while($db= mysqli_fetch_object($res,'cc',$t)){}
print "done!";
?>
--EXPECTF--
done!
+3 -2
View File
@@ -2032,8 +2032,9 @@ MYSQLND_METHOD(mysqlnd_stmt, free_result)(MYSQLND_STMT * const s)
stmt->state = MYSQLND_STMT_PREPARED;
}
/* Line is free! */
SET_CONNECTION_STATE(&conn->state, CONN_READY);
if (GET_CONNECTION_STATE(&conn->state) != CONN_QUIT_SENT) {
SET_CONNECTION_STATE(&conn->state, CONN_READY);
}
DBG_RETURN(PASS);
}
+13 -1
View File
@@ -118,6 +118,8 @@ static zend_string *(*accelerator_orig_zend_resolve_path)(const char *filename,
static void (*orig_chdir)(INTERNAL_FUNCTION_PARAMETERS) = NULL;
static ZEND_INI_MH((*orig_include_path_on_modify)) = NULL;
static void accel_gen_system_id(void);
#ifdef ZEND_WIN32
# define INCREMENT(v) InterlockedIncrement64(&ZCSG(v))
# define DECREMENT(v) InterlockedDecrement64(&ZCSG(v))
@@ -2557,6 +2559,9 @@ static void accel_globals_ctor(zend_accel_globals *accel_globals)
ZEND_TSRMLS_CACHE_UPDATE();
#endif
memset(accel_globals, 0, sizeof(zend_accel_globals));
/* TODO refactor to init this just once. */
accel_gen_system_id();
}
static void accel_globals_internal_func_dtor(zval *zv)
@@ -2941,11 +2946,18 @@ void accel_shutdown(void)
void zend_accel_schedule_restart(zend_accel_restart_reason reason)
{
const char *zend_accel_restart_reason_text[ACCEL_RESTART_USER + 1] = {
"out of memory",
"hash overflow",
"user",
};
if (ZCSG(restart_pending)) {
/* don't schedule twice */
return;
}
zend_accel_error(ACCEL_LOG_DEBUG, "Restart Scheduled!");
zend_accel_error(ACCEL_LOG_DEBUG, "Restart Scheduled! Reason: %s",
zend_accel_restart_reason_text[reason]);
HANDLE_BLOCK_INTERRUPTIONS();
SHM_UNPROTECT();
+3
View File
@@ -102,6 +102,9 @@ static char *get_mmap_base_file(void)
}
GetTempPath(MAXPATHLEN, windir);
l = strlen(windir);
if ('\\' == windir[l-1]) {
l--;
}
snprintf(windir + l, sizeof(windir) - l - 1, "\\%s@%s@%.32s", ACCEL_FILEMAP_BASE, uname, ZCG(system_id));
free(uname);
+1 -1
View File
@@ -18,7 +18,7 @@ $conf[4] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[4]);
print_r($conf);
include("blacklist.inc");
$status = opcache_get_status();
print_r(count($status['scripts']));
print_r(count($status['scripts']) > 0);
?>
--EXPECTF--
Array
+10 -2
View File
@@ -23,9 +23,9 @@ function php_cli_server_start($ini = "") {
// note: even when server prints 'Listening on localhost:8964...Press Ctrl-C to quit.'
// it might not be listening yet...need to wait until fsockopen() call returns
$error = "Unable to connect to servers\n";
$error = "Unable to connect to server\n";
for ($i=0; $i < 60; $i++) {
usleep(25000); // 25ms per try
usleep(50000); // 50ms per try
$status = proc_get_status($handle);
$fp = @fsockopen(PHP_CLI_SERVER_HOSTNAME, PHP_CLI_SERVER_PORT);
// Failure, the server is no longer running
@@ -53,6 +53,14 @@ function php_cli_server_start($ini = "") {
register_shutdown_function(
function($handle) {
proc_terminate($handle);
/* Wait for server to shutdown */
for ($i = 0; $i < 60; $i++) {
$status = proc_get_status($handle);
if (!($status && $status['running'])) {
break;
}
usleep(50000);
}
},
$handle
);
@@ -14,7 +14,11 @@ opcache.log_verbosity_level=4
--FILE--
<?php
echo "Foo Bar\n";
opcache_reset();
echo "Opcache reset";
?>
--EXPECTF--
%s Message Cached script '%sbasic_logging%s'
Foo Bar
%s Debug Restart Scheduled! Reason: user
Opcache reset
+4 -4
View File
@@ -285,9 +285,9 @@ ZEND_INI_BEGIN()
STD_PHP_INI_BOOLEAN("opcache.revalidate_path" , "0", PHP_INI_ALL , OnUpdateBool, accel_directives.revalidate_path , zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.log_verbosity_level" , "1" , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.log_verbosity_level, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.memory_consumption" , "64" , PHP_INI_SYSTEM, OnUpdateMemoryConsumption, accel_directives.memory_consumption, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.interned_strings_buffer", "4" , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.interned_strings_buffer, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.max_accelerated_files" , "2000", PHP_INI_SYSTEM, OnUpdateMaxAcceleratedFiles, accel_directives.max_accelerated_files, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.memory_consumption" , "128" , PHP_INI_SYSTEM, OnUpdateMemoryConsumption, accel_directives.memory_consumption, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.interned_strings_buffer", "8" , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.interned_strings_buffer, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.max_accelerated_files" , "10000", PHP_INI_SYSTEM, OnUpdateMaxAcceleratedFiles, accel_directives.max_accelerated_files, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.max_wasted_percentage" , "5" , PHP_INI_SYSTEM, OnUpdateMaxWastedPercentage, accel_directives.max_wasted_percentage, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.consistency_checks" , "0" , PHP_INI_ALL , OnUpdateLong, accel_directives.consistency_checks, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.force_restart_timeout" , "180" , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.force_restart_timeout, zend_accel_globals, accel_globals)
@@ -304,7 +304,7 @@ ZEND_INI_BEGIN()
STD_PHP_INI_ENTRY("opcache.optimization_level" , DEFAULT_OPTIMIZATION_LEVEL , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.optimization_level, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.opt_debug_level" , "0" , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.opt_debug_level, zend_accel_globals, accel_globals)
STD_PHP_INI_BOOLEAN("opcache.enable_file_override" , "0" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.file_override_enabled, zend_accel_globals, accel_globals)
STD_PHP_INI_BOOLEAN("opcache.enable_cli" , "0" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.enable_cli, zend_accel_globals, accel_globals)
STD_PHP_INI_BOOLEAN("opcache.enable_cli" , "1" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.enable_cli, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.error_log" , "" , PHP_INI_SYSTEM, OnUpdateString, accel_directives.error_log, zend_accel_globals, accel_globals)
STD_PHP_INI_ENTRY("opcache.restrict_api" , "" , PHP_INI_SYSTEM, OnUpdateString, accel_directives.restrict_api, zend_accel_globals, accel_globals)
+14 -2
View File
@@ -33,6 +33,18 @@
#define zend_accel_memdup(p, size) \
_zend_shared_memdup((void*)p, size, 0)
#ifdef HAVE_OPCACHE_FILE_CACHE
#define zend_set_str_gc_flags(str) do { \
if (ZCG(accel_directives).file_cache_only) { \
GC_FLAGS(str) = IS_STR_INTERNED; \
} else { \
GC_FLAGS(str) = IS_STR_INTERNED | IS_STR_PERMANENT; \
} \
} while (0)
#else
#define zend_set_str_gc_flags(str) GC_FLAGS(str) = IS_STR_INTERNED | IS_STR_PERMANENT
#endif
#define zend_accel_store_string(str) do { \
zend_string *new_str = zend_shared_alloc_get_xlat_entry(str); \
if (new_str) { \
@@ -43,13 +55,13 @@
zend_string_release(str); \
str = new_str; \
zend_string_hash_val(str); \
GC_FLAGS(str) = IS_STR_INTERNED | IS_STR_PERMANENT; \
zend_set_str_gc_flags(str); \
} \
} while (0)
#define zend_accel_memdup_string(str) do { \
str = zend_accel_memdup(str, _ZSTR_STRUCT_SIZE(ZSTR_LEN(str))); \
zend_string_hash_val(str); \
GC_FLAGS(str) = IS_STR_INTERNED | IS_STR_PERMANENT; \
zend_set_str_gc_flags(str); \
} while (0)
#define zend_accel_store_interned_string(str) do { \
if (!IS_ACCEL_INTERNED(str)) { \
+13 -6
View File
@@ -4,15 +4,22 @@
ARG_WITH("openssl", "OpenSSL support", "no");
if (PHP_OPENSSL != "no") {
if (CHECK_LIB("ssleay32.lib", "openssl", PHP_OPENSSL) &&
CHECK_LIB("libeay32.lib", "openssl", PHP_OPENSSL) &&
CHECK_LIB("crypt32.lib", "openssl") &&
CHECK_HEADER_ADD_INCLUDE("openssl/ssl.h", "CFLAGS_OPENSSL")) {
EXTENSION("openssl", "openssl.c xp_ssl.c");
var ret = SETUP_OPENSSL("openssl", PHP_OPENSSL);
if (ret > 0) {
EXTENSION("openssl", "openssl.c xp_ssl.c");
AC_DEFINE("HAVE_OPENSSL_EXT", PHP_OPENSSL_SHARED ? 0 : 1, "Have openssl");
AC_DEFINE("HAVE_OPENSSL", 1);
AC_DEFINE("HAVE_DSA_DEFAULT_METHOD", 1);
switch (ret) {
/* Openssl 1.0.x and lower */
case 1:
AC_DEFINE("HAVE_DSA_DEFAULT_METHOD", 1);
break;
/* Openssl 1.1.x */
case 2:
break;
}
}
}
+48 -8
View File
@@ -836,9 +836,9 @@ static void add_assoc_name_entry(zval * val, char * key, X509_NAME * name, int s
}
for (i = 0; i < X509_NAME_entry_count(name); i++) {
unsigned char *to_add;
unsigned char *to_add = NULL;
int to_add_len = 0;
int needs_free = 0;
ne = X509_NAME_get_entry(name, i);
obj = X509_NAME_ENTRY_get_object(ne);
@@ -852,8 +852,11 @@ static void add_assoc_name_entry(zval * val, char * key, X509_NAME * name, int s
str = X509_NAME_ENTRY_get_data(ne);
if (ASN1_STRING_type(str) != V_ASN1_UTF8STRING) {
/* ASN1_STRING_to_UTF8(3): The converted data is copied into a newly allocated buffer */
to_add_len = ASN1_STRING_to_UTF8(&to_add, str);
needs_free = 1;
} else {
/* ASN1_STRING_data(3): Since this is an internal pointer it should not be freed or modified in any way */
to_add = ASN1_STRING_data(str);
to_add_len = ASN1_STRING_length(str);
}
@@ -874,7 +877,13 @@ static void add_assoc_name_entry(zval * val, char * key, X509_NAME * name, int s
} else {
php_openssl_store_errors();
}
if (needs_free) {
/* ASN1_STRING_to_UTF8(3): The buffer out should be freed using free(3) */
OPENSSL_free(to_add);
}
}
if (key != NULL) {
zend_hash_str_update(Z_ARRVAL_P(val), key, strlen(key), &subitem);
}
@@ -1171,7 +1180,7 @@ static int php_openssl_parse_config(struct php_x509_request * req, zval * option
&& Z_TYPE_P(item) == IS_STRING) {
req->curve_name = OBJ_sn2nid(Z_STRVAL_P(item));
if (req->curve_name == NID_undef) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown elliptic curve (short) name %s", Z_STRVAL_P(item));
php_error_docref(NULL, E_WARNING, "Unknown elliptic curve (short) name %s", Z_STRVAL_P(item));
return FAILURE;
}
}
@@ -2266,6 +2275,10 @@ PHP_FUNCTION(openssl_x509_parse)
char *extname;
BIO *bio_out;
BUF_MEM *bio_buf;
ASN1_INTEGER *asn1_serial;
BIGNUM *bn_serial;
char *str_serial;
char *hex_serial;
char buf[256];
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|b", &zcert, &useshortnames) == FAILURE) {
@@ -2293,7 +2306,30 @@ PHP_FUNCTION(openssl_x509_parse)
add_assoc_name_entry(return_value, "issuer", X509_get_issuer_name(cert), useshortnames);
add_assoc_long(return_value, "version", X509_get_version(cert));
add_assoc_string(return_value, "serialNumber", i2s_ASN1_INTEGER(NULL, X509_get_serialNumber(cert)));
asn1_serial = X509_get_serialNumber(cert);
bn_serial = ASN1_INTEGER_to_BN(asn1_serial, NULL);
/* Can return NULL on error or memory allocation failure */
if (!bn_serial) {
php_openssl_store_errors();
RETURN_FALSE;
}
hex_serial = BN_bn2hex(bn_serial);
BN_free(bn_serial);
/* Can return NULL on error or memory allocation failure */
if (!hex_serial) {
php_openssl_store_errors();
RETURN_FALSE;
}
str_serial = i2s_ASN1_INTEGER(NULL, asn1_serial);
add_assoc_string(return_value, "serialNumber", str_serial);
OPENSSL_free(str_serial);
/* Return the hex representation of the serial number, as defined by OpenSSL */
add_assoc_string(return_value, "serialNumberHex", hex_serial);
OPENSSL_free(hex_serial);
add_assoc_asn1_string(return_value, "validFrom", X509_get_notBefore(cert));
add_assoc_asn1_string(return_value, "validTo", X509_get_notAfter(cert));
@@ -3883,7 +3919,7 @@ static EVP_PKEY * php_openssl_generate_private_key(struct php_x509_request * req
case OPENSSL_KEYTYPE_EC:
{
if (req->curve_name == NID_undef) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Missing configuration value: 'curve_name' not set");
php_error_docref(NULL, E_WARNING, "Missing configuration value: 'curve_name' not set");
return NULL;
}
EC_KEY *eckey = EC_KEY_new_by_curve_name(req->curve_name);
@@ -6220,6 +6256,7 @@ static int php_openssl_cipher_init(const EVP_CIPHER *cipher_type,
}
if (!EVP_CipherInit_ex(cipher_ctx, cipher_type, NULL, NULL, NULL, enc)) {
php_openssl_store_errors();
return FAILURE;
}
if (php_openssl_validate_iv(piv, piv_len, max_iv_len, free_iv, cipher_ctx, mode) == FAILURE) {
@@ -6235,10 +6272,11 @@ static int php_openssl_cipher_init(const EVP_CIPHER *cipher_type,
return FAILURE;
}
}
if (password_len > key_len) {
EVP_CIPHER_CTX_set_key_length(cipher_ctx, password_len);
if (password_len > key_len && !EVP_CIPHER_CTX_set_key_length(cipher_ctx, password_len)) {
php_openssl_store_errors();
}
if (!EVP_CipherInit_ex(cipher_ctx, NULL, NULL, key, (unsigned char *)*piv, enc)) {
php_openssl_store_errors();
return FAILURE;
}
if (options & OPENSSL_ZERO_PADDING) {
@@ -6257,11 +6295,13 @@ static int php_openssl_cipher_update(const EVP_CIPHER *cipher_type,
int i = 0;
if (mode->is_single_run_aead && !EVP_EncryptUpdate(cipher_ctx, NULL, &i, NULL, (int)data_len)) {
php_openssl_store_errors();
php_error_docref(NULL, E_WARNING, "Setting of data length failed");
return FAILURE;
}
if (mode->is_aead && !EVP_CipherUpdate(cipher_ctx, NULL, &i, (unsigned char *)aad, (int)aad_len)) {
php_openssl_store_errors();
php_error_docref(NULL, E_WARNING, "Setting of additional application data failed");
return FAILURE;
}
@@ -6278,6 +6318,7 @@ static int php_openssl_cipher_update(const EVP_CIPHER *cipher_type,
php_error_docref(NULL, E_WARNING, enc ? "Encryption failed" : "Decryption failed");
}
*/
php_openssl_store_errors();
zend_string_release(*poutbuf);
return FAILURE;
}
@@ -6327,7 +6368,6 @@ PHP_FUNCTION(openssl_encrypt)
php_openssl_load_cipher_mode(&mode, cipher_type);
if (php_openssl_cipher_init(cipher_type, cipher_ctx, &mode,
&password, &password_len, &free_password,
&iv, &iv_len, &free_iv, NULL, tag_len, options, 1) == FAILURE ||
@@ -20,7 +20,7 @@ var_dump(openssl_x509_parse($cert));
var_dump(openssl_x509_parse($cert, false));
?>
--EXPECTF--
array(15) {
array(16) {
["name"]=>
string(96) "/C=BR/ST=Rio Grande do Sul/L=Porto Alegre/CN=Henrique do N. Angelo/emailAddress=hnangelo@php.net"
["subject"]=>
@@ -55,6 +55,8 @@ array(15) {
int(2)
["serialNumber"]=>
string(20) "12593567369101004962"
["serialNumberHex"]=>
string(16) "AEC556CC723750A2"
["validFrom"]=>
string(13) "080630102843Z"
["validTo"]=>
@@ -166,7 +168,7 @@ serial:AE:C5:56:CC:72:37:50:A2
string(7) "CA:TRUE"
}
}
array(15) {
array(16) {
["name"]=>
string(96) "/C=BR/ST=Rio Grande do Sul/L=Porto Alegre/CN=Henrique do N. Angelo/emailAddress=hnangelo@php.net"
["subject"]=>
@@ -201,6 +203,8 @@ array(15) {
int(2)
["serialNumber"]=>
string(20) "12593567369101004962"
["serialNumberHex"]=>
string(16) "AEC556CC723750A2"
["validFrom"]=>
string(13) "080630102843Z"
["validTo"]=>
+8 -3
View File
@@ -585,6 +585,11 @@ static int win_cert_verify_callback(X509_STORE_CTX *x509_store_ctx, void *arg) /
{
PCCERT_CONTEXT cert_ctx = NULL;
PCCERT_CHAIN_CONTEXT cert_chain_ctx = NULL;
#if OPENSSL_VERSION_NUMBER < 0x10100000L
X509 *cert = x509_store_ctx->cert;
#else
X509 *cert = X509_STORE_CTX_get0_cert(x509_store_ctx);
#endif
php_stream *stream;
php_openssl_netstream_data_t *sslsock;
@@ -599,7 +604,7 @@ static int win_cert_verify_callback(X509_STORE_CTX *x509_store_ctx, void *arg) /
unsigned char *der_buf = NULL;
int der_len;
der_len = i2d_X509(x509_store_ctx->cert, &der_buf);
der_len = i2d_X509(cert, &der_buf);
if (der_len < 0) {
unsigned long err_code, e;
char err_buf[512];
@@ -676,7 +681,7 @@ static int win_cert_verify_callback(X509_STORE_CTX *x509_store_ctx, void *arg) /
int index, cert_name_utf8_len;
DWORD num_wchars;
cert_name = X509_get_subject_name(x509_store_ctx->cert);
cert_name = X509_get_subject_name(cert);
index = X509_NAME_get_index_by_NID(cert_name, NID_commonName, -1);
if (index < 0) {
php_error_docref(NULL, E_WARNING, "Unable to locate certificate CN");
@@ -1916,7 +1921,7 @@ static size_t php_openssl_sockop_io(int read, php_stream *stream, char *buf, siz
}
/* never use a timeout with non-blocking sockets */
if (began_blocked && &sslsock->s.timeout) {
if (began_blocked) {
timeout = &sslsock->s.timeout;
}
+3 -12
View File
@@ -560,11 +560,6 @@ PHP_RSHUTDOWN_FUNCTION(pcntl)
while (PCNTL_G(head)) {
sig = PCNTL_G(head);
PCNTL_G(head) = sig->next;
#ifdef HAVE_STRUCT_SIGINFO_T
if (sig->siginfo) {
zend_array_destroy(sig->siginfo);
}
#endif
efree(sig);
}
while (PCNTL_G(spares)) {
@@ -1379,11 +1374,7 @@ static void pcntl_signal_handler(int signo)
psig->next = NULL;
#ifdef HAVE_STRUCT_SIGINFO_T
zval user_siginfo;
array_init(&user_siginfo);
pcntl_siginfo_to_zval(signo, siginfo, &user_siginfo);
psig->siginfo = zend_array_dup(Z_ARRVAL(user_siginfo));
zval_ptr_dtor(&user_siginfo);
psig->siginfo = *siginfo;
#endif
/* the head check is important, as the tick handler cannot atomically clear both
@@ -1428,14 +1419,14 @@ void pcntl_signal_dispatch()
PCNTL_G(head) = NULL; /* simple stores are atomic */
/* Allocate */
while (queue) {
if ((handle = zend_hash_index_find(&PCNTL_G(php_signal_table), queue->signo)) != NULL) {
if (Z_TYPE_P(handle) != IS_LONG) {
ZVAL_NULL(&retval);
ZVAL_LONG(&params[0], queue->signo);
#ifdef HAVE_STRUCT_SIGINFO_T
ZVAL_ARR(&params[1], queue->siginfo);
array_init(&params[1]);
pcntl_siginfo_to_zval(queue->signo, &queue->siginfo, &params[1]);
#else
ZVAL_NULL(&params[1]);
#endif
+1 -1
View File
@@ -77,7 +77,7 @@ struct php_pcntl_pending_signal {
struct php_pcntl_pending_signal *next;
zend_long signo;
#ifdef HAVE_STRUCT_SIGINFO_T
zend_array *siginfo;
siginfo_t siginfo;
#endif
};
+29 -5
View File
@@ -217,7 +217,23 @@ static int firebird_stmt_describe(pdo_stmt_t *stmt, int colno) /* {{{ */
}
memmove(cp, var->aliasname, var->aliasname_length);
*(cp+var->aliasname_length) = '\0';
col->param_type = PDO_PARAM_STR;
if (var->sqlscale < 0) {
col->param_type = PDO_PARAM_STR;
} else {
switch (var->sqltype & ~1) {
case SQL_SHORT:
case SQL_LONG:
#if SIZEOF_ZEND_LONG >= 8
case SQL_INT64:
#endif
col->param_type = PDO_PARAM_INT;
break;
default:
col->param_type = PDO_PARAM_STR;
break;
}
}
return 1;
}
@@ -373,16 +389,24 @@ static int firebird_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, /* {{
*len = var->sqllen;
break;
case SQL_SHORT:
*ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL);
*len = slprintf(*ptr, CHAR_BUF_LEN, "%d", *(short*)var->sqldata);
*len = sizeof(zend_long);
*ptr = FETCH_BUF(S->fetch_buf[colno], zend_long, 1, NULL);
*(zend_long *)*ptr = *(short*)var->sqldata;
break;
case SQL_LONG:
*ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL);
*len = slprintf(*ptr, CHAR_BUF_LEN, "%d", *(ISC_LONG*)var->sqldata);
*len = sizeof(zend_long);
*ptr = FETCH_BUF(S->fetch_buf[colno], zend_long, 1, NULL);
*(zend_long *)*ptr = *(ISC_LONG*)var->sqldata;
break;
case SQL_INT64:
#if SIZEOF_ZEND_LONG >= 8
*len = sizeof(zend_long);
*ptr = FETCH_BUF(S->fetch_buf[colno], zend_long, 1, NULL);
*(zend_long *)*ptr = *(ISC_INT64*)var->sqldata;
#else
*ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL);
*len = slprintf(*ptr, CHAR_BUF_LEN, "%" LL_MASK "d", *(ISC_INT64*)var->sqldata);
#endif
break;
case SQL_FLOAT:
*ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL);
Loaded 100 of 197 files, more files were not shown because too many files have changed in this diff. Show more