Commit Graph

273 Commits

Author SHA1 Message Date
Anatol Belski
ef8632c9dc Revert "Fixed bug #61471"
This reverts commit 80c8d84af3.
2017-03-28 13:06:38 +02:00
Zheng SHAO
80c8d84af3 Fixed bug #61471 2017-02-08 01:10:13 +01:00
Anatol Belski
57736cc937 Revert "Merge branch 'bugfix_timeout_61471' of https://github.com/axot/php-src into PHP-7.0"
This reverts commit a8931df672, reversing
changes made to f2f35a2b27.
2017-01-05 13:59:01 +01:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Zheng SHAO
587497e3a9 define php_ap_map_http_request_error function for older httpd only 2016-12-29 16:07:05 +09:00
Zheng SHAO
d92606a4be add old versions of httpd support 2016-12-29 00:41:56 +09:00
Zheng SHAO
fb98907d2d typo fixed 2016-12-17 20:26:09 +09:00
Zheng SHAO
9b65a10256 bug fixed #61471 in apache2handler 2016-12-17 13:37:58 +09:00
Nikita Popov
1ac152938c Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
Also re bug #71575.
2016-03-03 16:50:01 +01:00
Anatol Belski
ce568f98bf Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Simplify code per Anatol.
  Insert bug number.
  Use strtoll() when apr_off_t is 64 bits.
2016-01-11 21:39:31 +01:00
Adam Harvey
f301a0b23c Simplify code per Anatol. 2016-01-11 21:36:55 +01:00
Adam Harvey
3217c033a5 Insert bug number. 2016-01-11 21:36:53 +01:00
Adam Harvey
c895dc5b5b Use strtoll() when apr_off_t is 64 bits. 2016-01-11 21:36:51 +01:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Xinchen Hui
c256649d63 Fixed memleaks in apache2handler 2015-09-23 07:08:51 -07:00
Joe Watkins
85a511d2c1 fix zend signal and tsrm compat 2015-09-01 09:34:54 +01:00
Stanislav Malyshev
b3709bfc52 Merge branch 'PHP-5.6'
* PHP-5.6: (27 commits)
  fix non-standard C
  update NEWS
  5.4.41 next
  fix CVE num
  update NEWS
  Fix bug #69441 (Buffer Overflow when parsing tar/zip/phar in phar_set_inode)
  fix test
  fix type in fix for #69085
  fix memory leak & add test
  Fix tests
  fix CVE num
  Fix bug #69337 (php_stream_url_wrap_http_ex() type-confusion vulnerability)
  Fix test
  Additional fix for bug #69324
  More fixes for bug #69152
  Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
  Fixed bug #69324 (Buffer Over-read in unserialize when parsing Phar)
  Fixed bug #69316 (Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER)
  Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4)
  Fix bug #68819 (Fileinfo on specific file causes spurious OOM and/or segfault)
  ...

Conflicts:
	Zend/zend_exceptions.c
	ext/curl/interface.c
	ext/dom/document.c
	ext/fileinfo/libmagic/softmagic.c
	ext/gd/gd.c
	ext/hash/hash.c
	ext/pgsql/pgsql.c
	ext/phar/phar.c
	ext/phar/phar_internal.h
	ext/standard/http_fopen_wrapper.c
	ext/standard/link.c
	ext/standard/streamsfuncs.c
	ext/xmlwriter/php_xmlwriter.c
	ext/zlib/zlib.c
2015-04-14 01:28:06 -07:00
Stanislav Malyshev
0cb9d75cb6 Merge branch 'PHP-5.4.40' into PHP-5.5.24
* PHP-5.4.40:
  Additional fix for bug #69324
  More fixes for bug #69152
  Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
  Fixed bug #69324 (Buffer Over-read in unserialize when parsing Phar)
  Fixed bug #69316 (Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER)
  Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4)
  Fix bug #68819 (Fileinfo on specific file causes spurious OOM and/or segfault)
  Fixed bug #68901 (use after free)
  Fixed bug #68740 (NULL Pointer Dereference)
  Fix bug #66550 (SQLite prepared statement use-after-free)
  Better fix for #68601 for perf 81e9a993f2
  Fix bug #68601 buffer read overflow in gd_gif_in.c
  Revert "Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4"
  Fixed bug #69293
  Add ZEND_ARG_CALLABLE_INFO to allow internal function to type hint against callable.
2015-04-11 16:56:12 -07:00
Stanislav Malyshev
809610f5ea Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4) 2015-04-11 16:53:21 -07:00
Kalle Sommer Nielsen
ca0a2e7a3c Drop VC6 support in sapi/apache2handler 2015-03-29 06:37:07 +02:00
Xinchen Hui
fd5a756ad4 Revive Zend Signals handler (and fixed bug #61083) 2015-03-05 18:11:22 +08:00
Anatol Belski
af3ca74501 made ZEND_TSRMLS_CACHE_* macros look like function calls
which also comply with the current semantics for such macros
2015-02-16 17:19:32 +01:00
Anatol Belski
61d85cedd5 fix values for gid and uid
As stated by MSDN, these fields are always set to zero
2015-02-11 11:46:31 +01:00
Anatol Belski
e6bf9b45dd silence unused variable warning 2015-02-11 11:46:30 +01:00
Dmitry Stogov
1eb4352143 Use new ZEND_HASH_FOREACH_... API. 2015-02-10 15:43:12 +03:00
Bob Weinand
fc444fbc70 Shut up, my lovely compiler; I do not like your warnings
Conflicts:
	Zend/zend_object_handlers.c
2015-02-09 11:23:35 +08:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Nikita Popov
2d212b426a Drop duplicate arg from hash_get_current_key_ex 2014-12-26 21:06:18 +01:00
Anatol Belski
a85eb75cba Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  fix perm again...
  cleanup uneeded cast
  fix bad pointer cast in ext/phar, fix segfault and failed tests (bigendian)

Conflicts:
	ext/phar/func_interceptors.c
	ext/phar/phar_object.c
	sapi/apache2handler/sapi_apache2.c
2014-12-16 10:21:05 +01:00
Remi Collet
61cb019e20 cleanup uneeded cast 2014-12-16 10:06:32 +01:00
Anatol Belski
f62ad3bc57 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  made the apache ini holders to be zend_bool
  Removed useless local variable
  Use simpler functions
  Fixed test
  small fixes to UPGRADING
  Reorder to save alignment size (of course, only for common used structs)
2014-12-15 13:57:43 +01:00
Anatol Belski
178363cbff made the apache ini holders to be zend_bool
since they're documented to be so and we spare 16 byte
2014-12-15 13:49:46 +01:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
ba35b22bc4 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (35 commits)
  Fixed bug #68398 msooxml matches too many archives
  Fix zpp call in apache_getenv()
  Drop unnecessary zval containers
  fixed test
  C89 compat
  add include for missing localeconv_r proto
  updated NEWS
  Fixed bug #65230 setting locale randomly broken
  Fix compilation error (ref #68424)
  Removed useless handlers
  Move checks for references into slow paths of operator functions. Remove duplicate opcode handlers.
  Revert unintentional docblock change
  Restored zip/oci8 PHP 4 code, add PHP 7 checks
  Note macro removal in UPGRADING.INTERNALS
  Removed ZEND_ENGINE_2 checks (and ZE1 code, it's been a decade!)
  Zend Engine 3
  Updated NEWS
  Updated NEWS
  Updated NEWS
  Start adding new attribute to control multi statements
  ...
2014-12-06 21:37:15 +01:00
Nikita Popov
7be91dd730 Fix zpp call in apache_getenv() 2014-12-06 12:38:56 +01:00
Anatol Belski
c6bad96f30 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (398 commits)
  NEWS
  add test for bug #68381
  Fixed bug #68381 Set FPM log level earlier during init
  proper dllexport
  move to size_t where zend_string is used internally
  fix some datatype mismatches
  return after the warning, to fix uninitialized salt usage
  fix datatype mismatches
  add missing type specifier
  fix datatype mismatches
  fix unsigned check
  "extern" shouldn't be used for definitions
  joined identical conditional blocks
  simplify fpm tests
  SEND_VAR_NO_REF optimization
  Add test for bug #68442
  Add various tests for FPM - covering recent bugs (68420, 68421, 68423, 68428) - for UDS - for ping and status URI - for multi pool and multi mode
  Include small MIT FastCGI client library from https://github.com/adoy/PHP-FastCGI-Client
  Get rid of zend_free_op structure (use zval* instead). Get rid of useless TSRMLS arguments.
  Add new FPM test for IPv4/IPv6
  ...

Conflicts:
	win32/build/config.w32
2014-11-18 21:18:52 +01:00
Anatol Belski
7c5ae9a1cf fix unsigned check 2014-11-18 13:19:48 +01:00
Anatol Belski
aff66a94a6 don't define tsrm ls in SAPIs under linux
as it's compiled statically with the core
2014-10-15 16:55:47 +02:00
Anatol Belski
8aeffdd74c moved most of the core to use static tsrm ls cache pointer
plus apache2handler, cli and cgi
2014-10-15 16:33:40 +02:00
Anatol Belski
1fc8220b65 TSRMLS_FETCH() is a spent force 2014-10-15 09:46:35 +02:00
Anatol Belski
c00424e427 bring back all the TSRMLS_FETCH() stuff
for better comparability with the mainstream
2014-10-15 09:37:55 +02:00
Anatol Belski
d624b0d5eb Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (26 commits)
  Micro optimization
  Drop unused INIT_STRING opcode
  Drop unused RAISE_ABSTRACT_ERROR opcode
  CT substitute unqualified true/false/null in namespaces
  Fix a couple compile warnings
  fix test filename
  one more test to illustrate transfer of an arbitrary data amount throug pipes
  fix tests on linux
  better test cleanup
  Use more readable inline functions
  increase the polling period to not to break existing behaviours
  updated NEWS
  Fixed bug #51800 proc_open on Windows hangs forever
  Fixed segfault
  Set an LDAP error code when failing ldap_bind due to null bytes
  Fix segmentation fault in debug_backtrace()
  Drop support for GMP 4.1
  Make gmp_setbit and gmp_clrbit return values consistent
  removed *.dsw and *.dsp files
  Opcache compatibility for coalesce operator
  ...
2014-10-01 01:33:46 +02:00
Anatol Belski
4b3e198023 removed *.dsw and *.dsp files 2014-09-28 19:02:09 +02:00
krakjoe
21b6d15599 remove unused fetch 2014-09-26 09:23:50 +01:00
Anatol Belski
d11734b4b0 reworked the patch, less new stuff but worky
TLS is already used in TSRM, the way exporting the tsrm cache through
a thread local variable is not portable. Additionally, the current
patch suffers from bugs which are hard to find, but prevent it to
be worky with apache. What is done here is mainly uses the idea
from the RFC patch, but

- __thread variable is removed
- offset math and declarations are removed
- extra macros and definitions are removed

What is done merely is

- use an inline function to access the tsrm cache. The function uses
  the portable tsrm_tls_get macro which is cheap
- all the TSRM_* macros are set to placebo. Thus this opens the way
  remove them later

Except that, the logic is old. TSRMLS_FETCH will have to be done once
per thread, then tsrm_get_ls_cache() can be used. Things seeming to be
worky are cli, cli server and apache. I also tried to enable bz2
shared and it has worked out of the box. The change is yet minimal
diffing to the current master bus is a worky start, IMHO. Though will
have to recheck the other previously done SAPIs - embed and cgi.

The offsets can be added to the tsrm_resource_type struct, then
it'll not be needed to declare them in the userspace. Even the
"done" member type can be changed to int16 or smaller, then adding
the offset as int16 will not change the struct size. As well on the
todo might be removing the hashed storage, thread_id != thread_id and
linked list logic in favour of the explicit TLS operations.
2014-09-25 18:48:27 +02:00
Anatol Belski
4db75dc853 basic windows fix 2014-09-22 20:58:45 +02:00
Anatol Belski
6bb530d1eb Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (24 commits)
  added a comment
  fix the REPARSE_DATA_BUFFER struct def
  simplify the condition
  Fix two memory errors by interning earlier
  Add smart_str_append for appending zend_strings
  Rename smart_str_append to smart_str_append_smart_str
  Use smart_str for exception stack traces
  Use smart_str in get_function_declaration
  Move smart_str implementation into Zend/
  UPGRADING for Integer Semantics
  Fixed bug #66242 (don't assume char is signed)
  Fixed bug #67633
  Fixed if/else if ordering
  Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG
  Use zend_ polyfilled nan/finite, check finite
  Updated 32-bit << test
  Updated << 64-bit tests
  Prevent bit shift count wrapping quirkiness on some CPUs for left shift
  Cast NaN and Infinity to zero
  Updated >> 64-bit tests
  ...
2014-09-22 10:26:17 +02:00