Commit Graph

8924 Commits

Author SHA1 Message Date
Stanislav Malyshev
3eb679b952 Fixed bug #68044: Integer overflow in unserialize() (32-bits only) 2014-10-14 10:51:24 -07:00
Anatol Belski
6445c4bd48 use php_socket_t instead of int 2014-10-10 19:00:19 +02:00
Tjerk Meesters
2a765d313e pack(): Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG 2014-10-10 07:20:10 +08:00
Tjerk Meesters
284358b317 Merge branch 'PHP-5.6'
* PHP-5.6:
  Add 64 bit formats to pack() and unpack()
2014-10-10 07:05:36 +08:00
Leigh
63fd969300 Add 64 bit formats to pack() and unpack() 2014-10-09 21:02:42 +01:00
Nikita Popov
df79b9b27a Update get_class_name semantics
* get_class_name is now only used for displaying the class name
   in debugging functions like var_dump, print_r, etc. It is no
   longer used in get_class() etc.
 * As it is no longer used in get_parent_class() the parent
   argument is now gone. This also fixes incorrect parent classes
   being reported in COM.
 * get_class_name is now always required (previously some places
   made it optional and some required it) and is also required
   to return a non-NULL value.
 * Remove zend_get_object_classname. This also fixes a number of
   potential leaks due to incorrect usage of this function.
2014-10-09 20:48:27 +02:00
Nikita Popov
e5e9d8346f Remove zend_get_class_entry function 2014-10-09 14:17:30 +02:00
Nikita Popov
ee5b30fa19 Remove support for classes without class entries
get_class_entry must be non-NULL and return non-NULL.
2014-10-09 13:58:14 +02:00
Nikita Popov
a3b880364f Directly use zend_string for php_implode/php_explode
Also drop some unnecessary zval separations and copies
2014-10-09 12:05:56 +02:00
Tjerk Meesters
78156520ae Merge branch 'PHP-5.6'
* PHP-5.6:
  Updated NEWS for #68129
  Updated NEWS for #68129
  Fixed bug #68129
2014-10-09 08:24:58 +08:00
Tjerk Meesters
f92c9b3ced Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Updated NEWS for #68129
  Fixed bug #68129
2014-10-09 08:24:05 +08:00
Tjerk Meesters
d0e51f5ce9 Fixed bug #68129
Empty usernames and passwords are now treated differently from no username or password

For example, empty password:

    ftp://user:@example.org

Empty username:

    ftp://:password@example.org

Empty username and empty password

    ftp://:@example.org
2014-10-09 08:21:30 +08:00
Anatol Belski
e9b2340151 fix asinh delivering -0 when the arg is 0 2014-10-03 22:18:21 +02:00
Dmitry Stogov
bd9a234645 Replaced EG(This) and EX(object) with EX(This).
Internal functions now recieves zend_execute_data as the first argument.
2014-10-03 19:32:46 +04:00
Remi Collet
26a5627cc6 only no_NO.ISO-8859-1 have to be ignored (merged) 2014-10-01 10:15:13 +02:00
Remi Collet
3e6f176733 only no_NO.ISO-8859-1 have to be ignored 2014-10-01 10:14:14 +02:00
krakjoe
7cbd8f8b8a remove bogus locale use from test 2014-10-01 10:12:06 +02:00
Nikita Popov
142a01db92 Fix a couple compile warnings 2014-09-29 20:57:17 +02:00
Anatol Belski
e46187daf5 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix test filename
2014-09-29 20:31:02 +02:00
Anatol Belski
df4d559881 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix test filename
2014-09-29 20:30:43 +02:00
Anatol Belski
7f1239232e fix test filename 2014-09-29 20:30:18 +02:00
Anatol Belski
a81a392117 Merge branch 'PHP-5.6'
* PHP-5.6:
  one more test to illustrate transfer of an arbitrary data amount throug pipes
2014-09-29 20:19:51 +02:00
Anatol Belski
cc3849f039 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  one more test to illustrate transfer of an arbitrary data amount throug pipes
2014-09-29 20:19:31 +02:00
Anatol Belski
1a2a8c6d4e one more test to illustrate transfer of an arbitrary data amount throug pipes 2014-09-29 20:18:33 +02:00
Anatol Belski
6090c3cf83 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix tests on linux
  better test cleanup
2014-09-29 18:13:16 +02:00
Anatol Belski
70ff3ad7d1 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix tests on linux
  better test cleanup
2014-09-29 18:12:56 +02:00
Anatol Belski
859913f6d4 fix tests on linux 2014-09-29 18:12:25 +02:00
Anatol Belski
91d3cd8559 better test cleanup
and even force the XFAIL to fail as it would take too long anyway, even if it passes
2014-09-29 18:11:06 +02:00
Anatol Belski
78e23758b7 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fixed bug #51800 proc_open on Windows hangs forever

Conflicts:
	main/streams/plain_wrapper.c
2014-09-29 16:30:40 +02:00
Anatol Belski
87a37f4090 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #51800 proc_open on Windows hangs forever
2014-09-29 16:27:33 +02:00
Anatol Belski
0c982798e0 Fixed bug #51800 proc_open on Windows hangs forever
This loop can block for some minutes, theoretically. Practially
however, this is a 99% non issue for a normal use case. This is
required because read() is synchronous. The PHP streams API wants
to fill its internal buffers, therefore it might try to read some
more data than user has demanded. Also, for a case where we want
to read X bytes, but neither enough data nor EOF arrives, read()
will block until it could fill the buffer. If a counterpart station
runs slowly or delivers not all the data at once, read() would
still be waiting. If we quit too early, we possibly could loose
some data from the pipe. Thus it has to emulate the read()
behaviour, but obviously not completely, just to some grade.

Reading big data amount is for sure an issue on any platforms, it
depends on the pipe buffer size, which is controlled by the system.
On Windows, the buffer size seems to be way too small, which causes
buffer congestion and a dead lock. It is essential to read the pipe
descriptors simultaneously and possibly in the same order as the
opposite writes them.

Thus, this will work with smaller buffer data sizes passed through
pipes. As MSDN states, anonymous pipes don't support asynchronous
operations. Neither anonymous pipes do support select() as they are
not SOCKETs but file descriptors. Consequently - bigger data sizes
will need a better solution based on threads. However it is much
more expencive. Maybe a better solution could be exporting a part
of the internal doing as a userspace function which could perform
some kind of lookahead operation on the pipe descriptor.

This is just the first stone, depending on the user feedback we
might go for further improvements in this area.
2014-09-29 16:24:34 +02:00
Nikita Popov
75860fa8e1 Fix counting of "R:" references in serialize() 2014-09-24 12:06:19 +02:00
Nikita Popov
8be73f2650 Fix tests/serialize/bug64146.phpt
The var hash now retains a reference to its elements, to ensure
that addresses are not reused.

Furthermore the var hash now only stores objects and references
and directly uses their pointer as key, thus making serialization
about two times faster.
2014-09-22 23:48:31 +02:00
Nikita Popov
483697617f Remove php_varname_check
This is a leftover from PHP < 5.4.

Also removed the php_create_empty_class declaration, which no longer
exists.
2014-09-22 18:34:40 +02:00
Anatol Belski
0885e4b1b9 simplify the condition 2014-09-22 09:41:53 +02:00
Nikita Popov
a770d29df7 Add smart_str_append for appending zend_strings
Also replaces usages in Zend/ and ext/standard
2014-09-21 20:58:31 +02:00
Nikita Popov
2a7de9fdbb Rename smart_str_append to smart_str_append_smart_str
It's used only rarely and I'm running out of append names...
2014-09-21 20:49:39 +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
Anatol Belski
132cd8be0d Merge branch 'pull-request/805'
* pull-request/805:
  Removes accidentally added files.
  Reverts some unwanted changes
  Deletes patch leftovers
  Replaces php5 with php7, without whitespace changes.
2014-09-20 19:46:44 +02:00
Anatol Belski
763bfb4f3b refixed printf fmt, used portable macros 2014-09-20 15:46:19 +02:00
Anatol Belski
1b3569235a forked bug41655 test for windows 2014-09-20 15:14:31 +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
cf0303e782 Replaces php5 with php7, without whitespace changes. 2014-09-20 10:01:44 +02:00
Nikita Popov
0cd982f15c Make header C++ compatible 2014-09-19 23:54:58 +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
ad3e1830ba Use append_unsigned instead of append_long where appropriate 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
Nikita Popov
070667de8d Remove SMART_STR_USE_REALLOC 2014-09-19 23:39:07 +02:00
Anatol Belski
f6c02239ca Merge branch 'PHP-5.6'
* PHP-5.6:
  fix possible array underflow

Conflicts:
	ext/standard/image.c
2014-09-19 20:15:56 +02:00
Anatol Belski
6213d9fc91 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix possible array underflow
2014-09-19 20:13:46 +02:00