Commit Graph

3434 Commits

Author SHA1 Message Date
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
766eb0103f Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  fix several datatype mismatch warnings
  fix signed/unsigned mismatch warning
  more signed/unsigned mismatch fix
  fix signed/unsigned mismatch warning
  fix signed/unsigned mismatch
  fix some signed/unsigned mismatch
  missing include for strlen proto
  More fixes for array/object casts with temporary variables
  Fix array/object cast of refcounted tmp var
  Deref right value for compound assign ops
2014-10-13 19:02:22 +02:00
Anatol Belski
65eb8ef8d0 fix several datatype mismatch warnings 2014-10-13 18:43:14 +02:00
Anatol Belski
97319bc833 fix signed/unsigned mismatch 2014-10-13 18:43:10 +02:00
Anatol Belski
e1cd0e0a38 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (40 commits)
  int to size_t where the underlaying API supports it
  use php_socket_t instead of int
  fix signed/unsigned mismatch warning
  fix compilation warning
  Improved specialisation $this variable accessed through IS_UNUSED operand must be IS_OBJECT, so we don't have to check for its type or perform dereference.
  Add notes about get_class_entry/get_class_name to UPGRADING
  Fix casts in GD
  Drop redundant casting code from ext/filter
  update NEWS
  update NEWS
  update NEWS
  update NEWS
  Added note to UPGRADING regarding 64-bit support in pack()/unpack()
  pack(): Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG
  Add 64 bit formats to pack() and unpack()
  Help to CPU branch predictor
  Removed unused EG(orig_error_reporting)
  Update get_class_name semantics
  Remove Z_OBJ_CLASS_NAME_P
  Improved VM stack primitives for fast paths. Slow paths are not inlined anymore.
  ...
2014-10-10 22:51:13 +02:00
Anatol Belski
6075e5a549 fix signed/unsigned mismatch warning 2014-10-10 19:00:18 +02:00
Anatol Belski
3942ed52be fix compilation warning 2014-10-10 19:00:17 +02:00
Anatol Belski
a91d3580a7 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  properly export tsrm_strtok_r()
  Fixed list() behavior inconsistency (string handling is disabled for all cases, ArrayAccess objects handling is enabled for all cases, ZEND_FETCH_DIM_TMP_VAR opcode is renamed into ZEND_FETCH_LIST, ZEND_FETCH_ADD_LOCK flag is removed).
  Fix accidental edit in previous commit
  Fix arginfo
  DateTimeZone::getOffset() now accepts a DateTimeInterface
  DateTimeZone::getOffset() now accepts a DateTimeInterface
  Moved checks and error reporting related to static methods from DO_FCALL inti INTI_FCALL* opcodes that may really deal with static methods. (In some rare cases it may lead to different order of warning messages).
  Fixed a bug that causes crash when environment variable is access while parsing php.ini
  Fixed a bug that causes crash when environment variable is access while parsing php.ini
2014-10-05 19:26:17 +02:00
Dmitry Stogov
7c7b9184b1 Fixed list() behavior inconsistency (string handling is disabled for all cases, ArrayAccess objects handling is enabled for all cases, ZEND_FETCH_DIM_TMP_VAR opcode is renamed into ZEND_FETCH_LIST, ZEND_FETCH_ADD_LOCK flag is removed). 2014-10-05 13:02:58 +04:00
Anatol Belski
11cf279196 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Fix test gc_029_zts.phpt
  Fixed a bug that causes crash when environment variable is access while parsing php.ini
  fix asinh delivering -0 when the arg is 0
  Mark test for full GC root buffer as XFAIL
  Fix two date tests
  Mark three foreach tests as XFAIL
  reveal some newer libcurl features in MINFO
  Fix bug number
  Fix bug #68188
  Fix bug #68133 and bug #68135
2014-10-04 11:14:01 +02:00
George Wang
2fd7d60ea0 Merge branch 'master' of git.php.net:php-src 2014-10-03 16:43:58 -04:00
George Wang
a7d2747890 Fixed a bug that causes crash when environment variable is access while parsing php.ini 2014-10-03 16:42:42 -04:00
Anatol Belski
ee4ae7fbc3 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  remove the remains of dsp files handling
  fix EX usage
  remove misprint parentheses
  remove misprint parentheses
  Replaced EG(This) and EX(object) with EX(This). Internal functions now recieves zend_execute_data as the first argument.
  And this one...
  It should be in extern c
  Remove useless condition
  NEWS entry for previous commit
  NEWS entry for previous commit
  add IPv6 support to php-fpm
  Micro optimization for the most frequency case
  Add hash to EXTENSIONS file
  Remove extensions which are long gone
  we also have xz release tarballs since 5.5
  Fix ZTS build
  improved file size computation in stat()
  Fixed incorrect compilation
  5.5.19 now
2014-10-03 20:30:49 +02:00
Ferenc Kovacs
e13e305b93 Merge branch 'PHP-5.6'
* PHP-5.6:
  NEWS entry for previous commit
  NEWS entry for previous commit
  add IPv6 support to php-fpm
2014-10-03 11:40:05 +02:00
Ferenc Kovacs
200e407b24 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS entry for previous commit
  add IPv6 support to php-fpm
2014-10-03 11:39:09 +02:00
Robin Gloster
15ba757a2b add IPv6 support to php-fpm 2014-10-03 11:35:27 +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
Johannes Schlüter
f13da5b0d7 Merge branch 'PHP-5.6' 2014-09-27 02:18:54 +02:00
Johannes Schlüter
16b4167fdd Merge branch 'PHP-5.5' into PHP-5.6 2014-09-27 02:18:29 +02:00
Johannes Schlüter
e6105ffb22 Merge branch 'PHP-5.4' into PHP-5.5 2014-09-27 02:17:52 +02:00
Johannes Schlüter
2711948d14 This test should pass 2014-09-27 02:17:26 +02:00
Anatol Belski
aa627174ec cleanup direct tsrm_ls passing 2014-09-26 12:11:08 +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
a2dd606942 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (31 commits)
  Fixed C++ incompatibility
  update the certificate used for the test, as it expired recently
  Fixed immutable arrays support
  Fix counting of "R:" references in serialize()
  Remove dead code
  Test use($this) being an error
  Move list() condition into assign_znode
  typo
  NEWS
  Fix bug #68074 Allow to use system cipher list instead of hardcoded value
  Avoid double checks
  the order of the blocks should be Core, then exts in alphabetical order
  add missing NEWS entry for the phpdbg compilation fix
  add NEWS entry for #68088
  Make QM_ASSIGN, JMP_SET and CAST return IS_TMP_VAR.
  Removed useless helper
  Drop unused result argument
  Fix ct binding for cuf/cufa functions
  Fix detection of write to built-in function for references
  Test use of string names with \ prefix
  ...
2014-09-24 21:39:49 +02:00
Dmitry Stogov
06103d65b1 Use zval_ptr_dtor_nogc() to free IS_TMP_VAR operands.
Removed ZEND_SWITCH_FREE opcode (ZEND_FREE used instead).
2014-09-23 17:21:29 +04:00
krakjoe
6a5c006827 correct macro 2014-09-23 12:46:16 +01: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
Nikita Popov
e33f3d3b7c Move smart_str implementation into Zend/
So we can use it there as well...

For now I've retained the zend_smart_str_public.h header, though
it would probably be better to just move that one struct into
zend_types.h.
2014-09-21 20:49:39 +02:00
krakjoe
403709aaf4 fix wrong doings 2014-09-20 22:08:14 +01:00
Anatol Belski
fb17d6516d Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  fixed copying of the struct as it's not being modified
  avoid strlen usage in loop
  Removes accidentally added files.
  Reverts some unwanted changes
  Deletes patch leftovers
  Replaces php5 with php7, without whitespace changes.
2014-09-20 21:37:19 +02:00
krakjoe
b3aebda9ea native tls initial patch 2014-09-20 20:22:14 +01:00
Florian MARGAINE
268bcdc1cb Removes accidentally added files. 2014-09-20 18:27:09 +02:00
Florian MARGAINE
8eb7e7bf7f Merge branch 'master' into issue-67910
Conflicts:
	README.PARAMETER_PARSING_API
	ext/gmp/tests/001.phpt
2014-09-20 10:09:21 +02:00
Florian MARGAINE
58ed832fc9 Deletes patch leftovers 2014-09-20 10:03:54 +02:00
Florian MARGAINE
cf0303e782 Replaces php5 with php7, without whitespace changes. 2014-09-20 10:01:44 +02:00
Nikita Popov
31e842472f Make number printing functions less generic
Now that zend_ulong is 64bit on 64bit platforms, it should be
sufficient to always use it, rather than supporting multiple
types.

API changes:
 * _zend_print_unsigned_to_buf and _zend_print_signed_to_buf
   no longer exist.
 * smart_str(ing)_print_long and smart_str(ing)_print_unsigned
   no longer exist.
 * Instead of all these, zend_print_ulong_to_buf and
   zend_print_long_to_buf should be used.
 * smart_str_append_generic_ex no longer exists.
 * smart_str(ing)_append_off_t(_ex) no longer exists, use
   smart_str(ing)_append_long(_ex) instead.
2014-09-19 23:39:07 +02:00
Nikita Popov
37aaccad7d Use inline functions for most of smart_str
smart_str_free_ex no longer exists, always use smart_str_free instead.

smart_str_alloc no longer requires a newlen variable to be in scope,
instead it returns the new length.
2014-09-19 23:39:07 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Dmitry Stogov
3bc8a958c5 Fixed useless or duplicated IS_INTERNED() checks 2014-09-19 15:41:01 +04:00
jfha73
b0064fc27f Update sapi_apache2.c
Change of php5 for php7
2014-09-18 20:43:31 +02:00
jfha73
1d936e7054 Update php_functions.c 2014-09-18 20:43:30 +02:00
jfha73
5514b0b1ad Update php_apache.h 2014-09-18 20:43:28 +02:00
jfha73
637a0069aa Update and rename php5apache2.dsp to php7apache2.dsp
Change of php5 for php7
2014-09-18 20:43:27 +02:00
jfha73
f8aeb6fc43 Update php.sym
Change of php5 for php7
2014-09-18 20:43:26 +02:00