1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00
Commit Graph

47586 Commits

Author SHA1 Message Date
Dmitry Stogov ecd2624875 Avoid array duplication and in-place modification 2018-01-17 02:25:36 +03:00
Dmitry Stogov 5c77bac9a7 A cheaper way to reset type flags. 2018-01-17 01:58:51 +03:00
Xinchen Hui 3a3e0493d0 Added ZEND_API zend_cpu_supports 2018-01-16 14:53:00 +08:00
Xinchen Hui 0b7a968109 Added missed PHPAPI 2018-01-15 21:39:25 +08:00
Anatol Belski 89463341c8 Merge branch 'PHP-7.2'
* PHP-7.2:
  Allow pecl like usage in ext/phar, closes #2955
2018-01-15 14:26:22 +01:00
Anatol Belski c5768a7e24 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Allow pecl like usage in ext/phar, closes #2955
2018-01-15 14:25:45 +01:00
Anatol Belski 2d4fb56c1d Allow pecl like usage in ext/phar, closes #2955 2018-01-15 14:23:46 +01:00
Xinchen Hui 98aa3a65c4 Optimized php_addslashes with SSE4.2 instructions
According to benchmark
(https://gist.github.com/laruence/fd0d443d2c5bacca9d8ab99250499956) this brings 30%+ execution time reduced.

In the further, this open the door for possible SSE4.2 optimizations in
other places.
2018-01-15 21:17:50 +08:00
Bishop Bettini cb7387275f Add test for bug #66960 2018-01-15 12:20:10 +01:00
timurib a484b9a535 Fix #75765 Exception on extend of undefined class
As the parent class is fetched prior to binding, there are no
safety concerns in this case and we can replace the fatal error
with an Error exception.
2018-01-12 18:41:39 +01:00
Nikita Popov 2d083a3da7 Don't directly access refcount in interbase 2018-01-12 18:38:45 +01:00
Nikita Popov 5c983ae852 Merge branch 'PHP-7.2' 2018-01-12 18:34:34 +01:00
Nikita Popov 8c73fc8027 Fixed bug #75653 2018-01-12 18:30:22 +01:00
Anatol Belski 4121f2a1ad Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #75774 imap_append HeapCorruction
2018-01-12 17:14:46 +01:00
Anatol Belski 1d05750c50 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75774 imap_append HeapCorruction
2018-01-12 17:14:19 +01:00
Anatol Belski cecf734dc3 Fixed bug #75774 imap_append HeapCorruction 2018-01-12 17:13:18 +01:00
Anatol Belski 7892eaf075 Merge branch 'PHP-7.2'
* PHP-7.2:
  Unify EOL
  Extend test, latest cURL ships also with smb and smbs
2018-01-12 12:22:35 +01:00
Anatol Belski baaf73be69 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Unify EOL
  Extend test, latest cURL ships also with smb and smbs
2018-01-12 12:21:43 +01:00
Anatol Belski 9d2662ea4b Unify EOL 2018-01-12 12:20:31 +01:00
Anatol Belski 4bb46c133d Extend test, latest cURL ships also with smb and smbs 2018-01-12 12:17:57 +01:00
Dmitry Stogov 2223f04304 Cleanup (at persistence stage we may get only "user" functions; regular op_arrays can't be referenced from different places) 2018-01-12 12:05:18 +03:00
Anatol Belski 36961661d5 Add missing clean sections 2018-01-12 08:05:07 +01:00
Dmitry Stogov 12c386f5b9 Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse. (reapply 781e1573af, now it should be OK). 2018-01-11 22:15:45 +03:00
Dmitry Stogov c9034c3b33 Get rid of zend_op_array.early_binding 2018-01-11 19:15:52 +03:00
Dmitry Stogov 6ba10a03e7 Revert "Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse." (this patch is incomplete or wrong)
This reverts commit 781e1573af.
2018-01-11 17:27:26 +03:00
Anatol Belski da8204ba1c Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix test for libtidy 5.6.0
2018-01-11 14:34:28 +01:00
Anatol Belski e3fda6e5f6 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix test for libtidy 5.6.0
2018-01-11 14:33:59 +01:00
Anatol Belski 83a77383b9 Fix test for libtidy 5.6.0
libtidy 5.6.0 remove the language option from the library, it is only
supported on cli. Prior to that, this option was not used in the
library. Thus, exclude the option presence from test.
2018-01-11 14:29:49 +01:00
Dmitry Stogov 781e1573af Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse. 2018-01-11 16:25:28 +03:00
Anatol Belski 45db77ed0d Revert "Add possibility to lower timer resolution"
This reverts commit c3717d9aec.

The final mitigation of the consequences with spectre should be
discussed more also with the regard to the happenings on the
developments. Right now a preliminary mitigation might be wrong or
suboptimal, thus reverting this.
2018-01-11 12:40:01 +01:00
Anatol Belski c3717d9aec Add possibility to lower timer resolution
The recently discovered security flaw Spectre requires a high resolution
timer. To the today's knowledge, PHP can't be used to create an attack for
this flaw. Still some concerns were raised, that there might be impact in
shared hosting environments. This patch adds a possibility to reduce the
timer resolution by an ini setting, thus giving administrators full
control. Especially, as the flaw was also demonstrated by an abuse of
the JS engine in a browser, Firefox reduced several time sources to 20us.
Any programming language, that doesn't compile to JIT, won't be able to
produce an attack vector for Meltdown and Spectre, at least by todays
knowledge. There are also other factors that say that the security
concern on the hrtime feature is to the big part not justified, still we
aim JIT in the future. Thus, adding a possibility to control the timer
resolution is a good and small enough tradeoff for safety and future.
2018-01-10 18:45:15 +01:00
Xinchen Hui 6b9e2b79a0 minor optimize on strstr 2018-01-10 18:22:59 +08:00
Dmitry Stogov d89c8dd8b8 Remove HashTable holes in functions and class tables. 2018-01-10 10:15:55 +03:00
Nikita Popov f208187773 Backport narrowing fix to 7.1
This is a cherry-pick of 8a4532319d.
2018-01-09 18:41:46 +01:00
Xinchen Hui d80abbf9ce Merge branch 'PHP-7.2'
* PHP-7.2:
  Update NEWS
  Fixed bug #75781 (substr_count incorrect result)
2018-01-09 16:23:38 +08:00
Xinchen Hui 9a2fc39542 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75781 (substr_count incorrect result)
2018-01-09 16:21:13 +08:00
Xinchen Hui 6da44fefb2 Fixed bug #75781 (substr_count incorrect result) 2018-01-09 16:21:02 +08:00
Dmitry Stogov cfee682802 Fixed possible incorrect "mark" usage 2018-01-09 10:30:00 +03:00
Xinchen Hui 69affa985c Merge branch 'master' of git.php.net:/php-src
* 'master' of git.php.net:/php-src:
  Implement high resolution monotonic timer function hrtime()
2018-01-08 12:57:02 +08:00
Xinchen Hui 4c3c7117e4 remove false dup 2018-01-08 12:56:08 +08:00
Anatol Belski 83497327e7 Implement high resolution monotonic timer function hrtime() 2018-01-07 16:03:52 +01:00
Xinchen Hui 88b8cd7385 Use stack allocated zvals 2018-01-07 20:03:49 +08:00
Xinchen Hui 4a8229b80d Use GC_ADDREF 2018-01-07 19:53:51 +08:00
Xinchen Hui 63a96ebf6a Fixed bug while dealing with ADD_ARRAY_ELEMENT against an existing const array 2018-01-07 14:17:47 +08:00
David Carlier 6e94f943c1 Avoid abs() type mismatch warnings
timelib_time z field was mistakenly promoted to 64 bits types in
one place. Otherwise silence warning with explicit cast down to int.
2018-01-06 21:51:31 +01:00
David Carlier a95e8b80db net/if.h requires sys/socket.h on OpenBSD
This led to a detection failure of this particular header.
2018-01-06 21:42:27 +01:00
Gabriel Caruso a56ea44431 Remove trailing whitespace in C++ files
[ci skip]
2018-01-06 21:38:09 +01:00
Xinchen Hui 5c628d7704 Merge branch 'master' of git.php.net:/php-src
* 'master' of git.php.net:/php-src:
  Fixed typo
2018-01-05 15:05:47 +08:00
Xinchen Hui 8d63c834e4 Change assertion 2018-01-05 15:05:05 +08:00
Kalle Sommer Nielsen 2340f9a67d Fixed typo 2018-01-05 07:30:45 +01:00