Commit Graph

39974 Commits

Author SHA1 Message Date
Xinchen Hui
d4df6641c8 Fixed bug #70724 (Undefined Symbols from opcache.so on Mac OS X 10.10) 2015-10-17 01:52:32 -07:00
Stanislav Malyshev
af68b3ad5f Fix undefined symbol error when compiling with LLVM
Basically, LLVM in default mode treats inline in a way incompatible
with GCC in c89 mode, which leads to undefined symbol errors.
See more here: http://stackoverflow.com/questions/12844729/linking-error-for-inline-functions
2015-10-16 17:23:18 -07:00
Ferenc Kovacs
bdd658ee10 Merge branch 'pr-1567'
* pr-1567:
  initialize *str
  calling getenv() without arguments should return the environment variables as an array
2015-10-16 18:22:02 +02:00
Felipe Pena
20a384dfa9 Fixed bug #70678 (PHP7 returns true when false is expected)
Cherry-pick from master.
2015-10-16 17:44:17 +02:00
Anatol Belski
1b72ddf0d0 sync config.w32 with sha3 implementation 2015-10-16 12:18:35 +02:00
Sara Golemon
e800da9920 Add missing NEWS entry, copyright notice, and vim settings
Should have gone with d244b54c67
2015-10-16 00:19:00 -07:00
Sara Golemon
d244b54c67 Implement SHA3 hashing algorithm 2015-10-15 20:36:49 -07:00
Xinchen Hui
2b6345b48d Merge branch 'PHP-7.0' 2015-10-15 18:47:13 +08:00
Xinchen Hui
88a69ffa58 Fixed bug #70715 (Segmentation fault inside soap client) 2015-10-15 18:46:57 +08:00
Sara Golemon
efce28ef1c Merge branch 'PHP-7.0'
* PHP-7.0:
  Scan through a range of ports in case 31338 is busy
2015-10-14 22:45:21 -07:00
Sara Golemon
a2005cec5c Scan through a range of ports in case 31338 is busy
ext/standard/tests/network/ud4loop.phpt hardcodes port 31338.
If that fails to bind, try a few more (up to 31499) before giving up.
2015-10-14 22:44:27 -07:00
Xinchen Hui
8e72b204d5 Merge branch 'PHP-7.0' 2015-10-15 10:19:55 +08:00
Xinchen Hui
a2cfcdfbe9 Fixed bug #70709 (SOAP Client generates Segfault) 2015-10-15 10:19:43 +08:00
Scott
f77cb7055d Update random.c
Ref: beb826f6fd
2015-10-14 15:16:59 -04:00
Bob Weinand
844638918e Merge branch 'PHP-7.0' 2015-10-14 12:10:07 +02:00
Bob Weinand
60b4355168 Do not create a fake Closure for real Closures
That is solved by just returning the Closure as is, which is safe due to Closures being immutable objects
2015-10-14 12:07:33 +02:00
Xinchen Hui
caedb7c5dc Merge branch 'move-reflection-tests' of https://github.com/Sobak/php-src 2015-10-14 10:27:37 +08:00
Xinchen Hui
534856c98a Move the tests to proper place 2015-10-14 10:26:02 +08:00
Xinchen Hui
07d2d7fa53 Merge branch 'PHP-7.0' 2015-10-14 10:20:13 +08:00
Xinchen Hui
010509355d Fixed Conditional jump or move depends on uninitialised value 2015-10-14 10:19:57 +08:00
Ferenc Kovacs
54670c8f05 initialize *str 2015-10-12 21:36:21 +02:00
Ferenc Kovacs
d221821cee calling getenv() without arguments should return the environment variables as an array 2015-10-12 21:27:07 +02:00
Nikita Popov
2f06c0b2ea Merge branch 'PHP-7.0' 2015-10-12 20:37:55 +02:00
Dmitry Stogov
23b372d358 Forbid "fake" closure rebinding 2015-10-12 20:34:08 +02:00
Anatol Belski
f031b3353a Merge branch 'PHP-7.0'
* PHP-7.0:
  fork test for ICU 56.1
  fork test for ICU-56.1
  fix test for ICU-56.1
2015-10-12 11:29:07 +02:00
Anatol Belski
5492fe9f25 fork test for ICU 56.1 2015-10-12 11:20:51 +02:00
Anatol Belski
aea420c7cf fork test for ICU-56.1 2015-10-12 11:16:27 +02:00
Anatol Belski
3fb6f0014a fix test for ICU-56.1 2015-10-12 11:10:04 +02:00
Anatol Belski
d160e98feb fix test 2015-10-12 09:46:52 +02:00
Felipe Pena
8d12ff7513 - Fixed bug #70678 (PHP7 returns true when false is expected) 2015-10-11 12:08:34 -03:00
Sobak
68750d04c7 Move ext/reflection tests into the proper directory 2015-10-11 08:41:21 +02:00
Anatol Belski
be3794831d replace typedef by an appropriate include 2015-10-10 17:31:40 +02:00
Anatol Belski
c3dd6058df rename header 2015-10-10 17:31:33 +02:00
Anatol Belski
2dc0ce2fcd enable ftok implementation 2015-10-10 17:31:19 +02:00
Anatol Belski
f313d438b4 Merge branch 'PHP-7.0'
* PHP-7.0:
  Implemented file_cache_fallback mechanism
2015-10-09 23:49:09 +02:00
Anatol Belski
ffb5d0aca3 Implemented file_cache_fallback mechanism
which is essential as an attempt to fix the "failed to reattach"
error on Windows. If file_cache is enabled, Opcache will
automaticaly switch to file_cache_only mode in the case a process
failed to map the shared segment at the required address. The
important small part of the SHM will still be mapped, which
allows information exchange between normal processes using SHM
and those using the fallback mechanism.

This is based on Dmitry's, Matt's and mine ideas. So many thanks for
support!
2015-10-09 23:47:59 +02:00
Dmitry Stogov
d3d7c5a52e Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #70674 (ReflectionFunction::getClosure() leaks memory when used for internal functions)
2015-10-09 00:45:45 +03:00
Dmitry Stogov
91fb3a7b27 Fixed bug #70674 (ReflectionFunction::getClosure() leaks memory when used for internal functions) 2015-10-09 00:45:02 +03:00
Dmitry Stogov
6571038093 Merge branch 'PHP-7.0'
* PHP-7.0:
  Correct intdiv() argument names and description
2015-10-09 00:42:26 +03:00
Andrea Faulds
fa23bebe94 Correct intdiv() argument names and description 2015-10-08 15:45:22 +01:00
Dmitry Stogov
ff4f3094e7 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #70668 (array_keys() doesn't respect references when $strict is true)
2015-10-08 14:59:55 +03:00
Dmitry Stogov
3815e97136 Fixed bug #70668 (array_keys() doesn't respect references when $strict is true) 2015-10-08 14:59:02 +03:00
Dmitry Stogov
4d1d097aca Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #70667 (strtr() causes invalid writes and a crashes)
2015-10-08 14:33:03 +03:00
Dmitry Stogov
9af07e7119 Fixed bug #70667 (strtr() causes invalid writes and a crashes) 2015-10-08 14:30:43 +03:00
Ferenc Kovacs
1e66f1b9ad Merge branch 'pr-1204'
* pr-1204:
  no need for default value
  allow passing null as the third param
  Implemented FR #55716 - Add an option to pass a custom stream context
2015-10-08 10:23:24 +02:00
Márcio Almada
ddb6d7801e Fix bug #70650 2015-10-07 16:25:59 +02:00
Dmitry Stogov
5d2813edce Fixed test.
MySQL and MariaDB of different versions have different assumptions about TIMESTAMP attributes.
Probably we need to add yet another condition to also check MariaDB version.
2015-10-07 14:09:37 +03:00
Christopher Jones
19e461b07d Merge branch 'PHP-7.0' of https://git.php.net/repository/php-src into PHP-7.0
* 'PHP-7.0' of https://git.php.net/repository/php-src:
  Fixed test running on MarinaDB.
2015-10-07 20:27:38 +11:00
Christopher Jones
4a57f1821b Fix mem leak and improve test portability (Senthil) 2015-10-07 20:24:49 +11:00
Dmitry Stogov
ccb677ece8 Fixed test running on MarinaDB. 2015-10-07 12:21:43 +03:00
Anatol Belski
c0ca731d7a add comment to test 2015-10-07 09:43:28 +02:00
Dmitry Stogov
91588a98be Fixed test (system error messages may be different). 2015-10-07 03:25:12 +03:00
Dmitry Stogov
abf3c2f796 Fixed test (it failed on 32-bit Linux and worked on 64-bit Linux just because of luck). 2015-10-07 03:08:11 +03:00
Dmitry Stogov
424a26d5d4 Split test into different versions for 32-bit and 64-bit systems 2015-10-07 01:51:37 +03:00
Nikita Popov
cd2b0a7bb8 Drop HAVE_PACKED_OBJECT_VALUE
This check doesn't make sense anymore, we have no object_value
anymore.
2015-10-06 23:12:34 +02:00
Nikita Popov
0a3c1fb4c2 More zpp cleanup in ext/intl 2015-10-06 22:58:02 +02:00
Dmitry Stogov
24e88348f3 Revert "Merge branch 'array_keys_strict_refs' of https://github.com/tony2001/php-src"
This reverts commit a6be0f3fd6.
2015-10-06 23:48:12 +03:00
Sara Golemon
a2082b7c97 Add some tests for unserialize() class filtering 2015-10-06 12:04:11 -07:00
Scott
63617a678f Fixed bug #70641 (Random_* - Better compatibility on Linux distros)
See:
* https://bugs.php.net/bug.php?id=70641
* https://github.com/php/php-src/pull/1513#issuecomment-145571829
2015-10-06 01:03:04 +02:00
Bob Weinand
a6be0f3fd6 Merge branch 'array_keys_strict_refs' of https://github.com/tony2001/php-src 2015-10-05 14:50:04 +02:00
Anatol Belski
a549a3ac17 improve error message 2015-10-04 16:36:53 +02:00
Anatol Belski
c97198e181 fix incrementing on 32-bit 2015-10-04 12:19:16 +02:00
Nuno Lopes
052dd3005b fix coverage report for datelib 2015-10-04 05:45:05 -04:00
Nuno Lopes
ba4a85b012 fix coverage report for datelib 2015-10-04 05:39:01 -04:00
Xinchen Hui
2fb8bb1157 Fixed bug #70632 (Third one of segfault in gc_remove_from_buffer) 2015-10-03 20:33:24 -07:00
Xinchen Hui
6876112c89 Fixed the third one of (segfault in gc_remove_from_buffer())
This one maybe only used in debug mode, so no bug report and no test
script provided
2015-10-03 20:15:35 -07:00
Xinchen Hui
4744eec753 Fixed bug #70631 (Another Segfault in gc_remove_from_buffer()) 2015-10-03 20:08:21 -07:00
Xinchen Hui
925412ee1c Do not edit the zval cause it might be in shared memory 2015-10-03 19:50:38 -07:00
Xinchen Hui
c147d90dbf Fixed bug #70601 (Segfault in gc_remove_from_buffer()) 2015-10-03 19:38:56 -07:00
Anatol Belski
4cb6342426 remove useless checks
Other platforms than listed in the checks are not supported since
PHP 5.5. We also won't need these checks for a while, so can simplify.
2015-10-03 10:57:32 +02:00
Anatol Belski
96fe3be7f2 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix win10 support
2015-10-03 10:46:10 +02:00
Anatol Belski
83bef0ef83 fix win10 support
dwMajorVersion == 10 there, and generally this check is obsolete
as we don't support dwMajorVersion < 6 since 5.5
2015-10-03 10:44:43 +02:00
Nikita Popov
e892e2e253 Merge branch 'PHP-5.6' into PHP-7.0 2015-10-03 10:13:44 +02:00
Nikita Popov
fe1933aae2 Fixed bug #70625 2015-10-03 10:12:11 +02:00
Derick Rethans
a2f5619303 Updated to version 2015.7 (2015g) 2015-10-02 18:12:18 +01:00
Derick Rethans
c08824fd72 Updated to version 2015.7 (2015g) 2015-10-02 18:12:16 +01:00
Xinchen Hui
c98ea8465b Fixed bug #70619 (DateTimeImmutable segfault) 2015-10-02 07:19:21 -07:00
Nikita Popov
1287c48082 Fix/improve zpp usage
The ext/interbase changes are done blindly, fingers crossed.

Some of these are bug fixes, some make zpp usage more idiomatic.
2015-10-02 09:35:00 +02:00
Antony Dovgal
99d5634079 fix dl() function
..which was using old macro
2015-09-30 14:40:29 +01:00
Julien Pauli
a60105d7a4 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed test
  5.5.31 now
2015-09-30 13:19:37 +02:00
Julien Pauli
0fd71d1184 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed test
  5.5.31 now

Conflicts:
	configure.in
	main/php_version.h
2015-09-30 13:19:18 +02:00
Julien Pauli
d7fb43e30d Fixed test 2015-09-30 13:18:16 +02:00
Anatol Belski
3e74df74f9 fix test 2015-09-30 12:18:32 +02:00
Andrey Hristov
07a8e5ce37 Add JSON as exported type, if available. mysqlnd has it, libmysql doesn't export it (for now). 2015-09-30 09:03:35 +02:00
Andrey Hristov
7b787ebbb6 Merge branch 'PHP-5.6' into PHP-7.0 2015-09-30 09:04:00 +02:00
Anatol Belski
bfd2637068 fix test 2015-09-29 13:04:06 +02:00
marcosptf
dae3ab8e7a Update openssl_x509_checkpurpose.phpt 2015-09-29 10:41:24 +02:00
root
fc3580c9d5 add test to openssl ext 2015-09-29 10:41:22 +02:00
Dmitry Stogov
560e4fa393 Removed or simplified incorrect SEPARATE_*() macros usage. 2015-09-29 11:17:43 +03:00
Scott
694b9af5b6 Remove makedev() check. 2015-09-29 09:14:30 +02:00
Scott
46aa628605 Different error message if makedev check fails 2015-09-29 09:14:29 +02:00
Scott
6554f721f7 Add support for getrandom(2), add type check on file descriptor
Fix to_read, throw exception if syscall fails

Fixes thanks to feedback from sarnold at ##crypto on freenode

Correction on error conditions

Remove dead code (thanks @defuse)

It turns out getrandom can take >256, getentropy refuses.

Better semantics

Thanks @defuse for catching my silly mistake here

Cast to size_t to be explicit

Let's simplify the logic a bit

Let's be consistent; define everything before we do any logic

Continuously check that the file descriptor is still a valid one

Add device type check on fd initialization
2015-09-29 09:14:28 +02:00
Anatol Belski
208ed0a010 fix test
cutting out the '/' is not critical, but allows to avoid forking
2015-09-29 09:11:52 +02:00
Stanislav Malyshev
d6e8426ebf Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Better fix for bug #70433

Conflicts:
	ext/phar/dirstream.c
	ext/phar/util.c
2015-09-28 21:43:16 -07:00
Stanislav Malyshev
2e267bd3c7 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Better fix for bug #70433

Conflicts:
	ext/phar/dirstream.c
2015-09-28 21:42:08 -07:00
Stanislav Malyshev
1ddf72180a Better fix for bug #70433 2015-09-28 21:41:02 -07:00
Stanislav Malyshev
4c6f4863fa Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix memory leak
  FIx bug #70433 - Uninitialized pointer in phar_make_dirstream when zip entry filename is "/"

Conflicts:
	ext/phar/dirstream.c
2015-09-28 20:45:02 -07:00
Stanislav Malyshev
51b23cd0f0 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix memory leak
  FIx bug #70433 - Uninitialized pointer in phar_make_dirstream when zip entry filename is "/"

Conflicts:
	ext/phar/dirstream.c
2015-09-28 20:44:28 -07:00
Stanislav Malyshev
f98ab19dc0 fix memory leak 2015-09-28 20:43:18 -07:00
Stanislav Malyshev
e78ac461db FIx bug #70433 - Uninitialized pointer in phar_make_dirstream when zip entry filename is "/" 2015-09-28 17:12:35 -07:00
Stanislav Malyshev
e7574a5329 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #69720: Null pointer dereference in phar_get_fp_offset()

Conflicts:
	ext/phar/util.c
2015-09-28 17:00:32 -07:00
Stanislav Malyshev
f39a4ee0c9 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #69720: Null pointer dereference in phar_get_fp_offset()
2015-09-28 16:59:46 -07:00
Stanislav Malyshev
d698f0ae51 Fix bug #69720: Null pointer dereference in phar_get_fp_offset() 2015-09-28 15:56:51 -07:00
Stanislav Malyshev
899753f240 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #70480 (php_url_parse_ex() buffer overflow read)
2015-09-28 13:08:44 -07:00
Stanislav Malyshev
629e4da7cc Fix bug #70480 (php_url_parse_ex() buffer overflow read) 2015-09-28 11:31:14 -07:00
Andrey Hristov
be6546fac9 Add support for parameters to tick functions, on C level. This is only
for extensions that want to use register tick functions. Userland tick
functions are unaffected.
2015-09-28 11:21:17 +02:00
Andrey Hristov
7e3cd7cadf Merge branch 'PHP-5.6' into PHP-7.0 2015-09-25 14:29:06 +02:00
Andrey Hristov
59de2c037c Fixed bug #70572 segfault in mysqlnd_connect 2015-09-25 14:06:28 +02:00
Anatol Belski
37c85ebb94 check for test requirement 2015-09-25 11:50:15 +02:00
Anatol Belski
c75346624a fix data type and warning 2015-09-25 11:50:13 +02:00
Dmitry Stogov
a05fc48055 Extended zend_extension API to allow storing additional data associated with op_arrays in opcache SHM. (op_array->reserved[]) 2015-09-25 11:50:38 +03:00
Dmitry Stogov
f509706318 Make necessary separation (it might be possible to fix this in a better way, but this will requre some refactoring) 2015-09-25 10:59:27 +03:00
Anatol Belski
67aff16d94 fix ident 2015-09-25 08:30:44 +02:00
Dmitry Stogov
c21d18ef95 Cleanup: avoid useless array duplication 2015-09-25 02:20:05 +03:00
Dmitry Stogov
01d5beddf4 Cleanup 2015-09-25 01:36:10 +03:00
Dmitry Stogov
ad4fa8f758 Fixed incorrect usage of HASH_OF() macro. Replaced HASH_OF() with more appropriate Z_ARRVAL_P() or Z_OBJPROP_P(). 2015-09-24 22:39:59 +03:00
Anatol Belski
0fd7acd11d don't keep locked mutex after errors 2015-09-24 16:34:44 +02:00
Anatol Belski
df832c966c avoid dangling pointers 2015-09-24 16:33:58 +02:00
Anatol Belski
3ef3d80f25 move accel_shared_globals assignment into locked block
this might fix crashes under high concurrency
2015-09-24 16:33:57 +02:00
Anatol Belski
a7552ca310 add ovfl check, fix warnings 2015-09-24 16:33:56 +02:00
Anatol Belski
807c29ed14 fix warning 2015-09-24 16:33:54 +02:00
Dmitry Stogov
415000ed93 Fixed bug #70573 (Cloning SplPriorityQueue leads to memory leaks) 2015-09-24 16:42:59 +03:00
Adam Harvey
6413ecb439 Fix a memory leak in sqlite3_do_callback.
This was very, very obvious when using a debug build of PHP to build the
manual!

Fixes bug #70571 (Memory leak in sqlite3_do_callback).
2015-09-24 14:16:45 +02:00
Dmitry Stogov
2d55e8c186 Fix (revert) loop exit condition 2015-09-24 11:19:26 +03:00
Dmitry Stogov
262160e0e9 Attmpt to fix "Unable to reattach to base address" problem. (Matt Ficken) 2015-09-24 10:48:34 +03:00
Dmitry Stogov
92708e3e04 Cleanup: avoid reallocations 2015-09-24 02:23:09 +03:00
Dmitry Stogov
57575c0898 Cleanup: avoid reallocations 2015-09-24 01:35:16 +03:00
Dmitry Stogov
5cccd6c5b6 Fixed memory leak and avoid reallocations 2015-09-24 01:19:15 +03:00
Dmitry Stogov
51cd49b2cf Cleanup: replace removed condition with ZEND_ASSERT() 2015-09-24 00:25:51 +03:00
Anatol Belski
257693614e add test 2015-09-23 19:48:38 +02:00
Anatol Belski
ca89d9a797 expose openssl config path so it can be tested 2015-09-23 19:48:20 +02:00
Andrey Hristov
003b764a49 Fix for Bug #70384 mysqli_real_query(): Unknown type 245 sent by the server 2015-09-23 18:38:29 +02:00
Andrey Hristov
f79cd18789 Fix for Bug #70384 mysqli_real_query(): Unknown type 245 sent by the server 2015-09-23 18:25:12 +02:00
Anatol Belski
aba42e3dda use bundled openssl.cnf 2015-09-23 17:14:59 +02:00
Bishop Bettini
368d3ff0d9 Bug #70561: Fix DirectoryIterator to throw OutOfBoundsException
-------------------------------------------------------------------------------
DirectoryIterator implements SeekableIterator, which "should throw an
OutOfBoundsException if the position is not seekable". As is, seek just returns
and one must call valid(). This approach is different than most (all?) other
SeekableIterator implementations and leads to developer confusion. See the
bug report for a specific example.
2015-09-23 11:14:52 -04:00
Xinchen Hui
c87ef023aa Fixed Bug #70558 ("Couldn't fetch" error in DOMDocument::registerNodeClass()) 2015-09-23 07:01:50 -07:00
Anatol Belski
77b9acd326 add test 2015-09-23 14:17:04 +02:00
Anatol Belski
15d43095d7 expose openssl config path so it can be tested 2015-09-23 14:17:03 +02:00
Anatol Belski
8317e0fa46 add missing header
For PRIu32 and maybe more, that fixes build
2015-09-23 14:01:59 +02:00
Anatol Belski
c505d55158 silence mkdir to fix fails after unclean test run 2015-09-23 13:55:28 +02:00
Dmitry Stogov
d82ea930ed Cleanup: removed deprecated commented code. Incorrect zval_dtor() usage replaced by zval_dtor_ptr(). 2015-09-23 01:32:30 +03:00
Dmitry Stogov
95ac055fd3 Cleanup: zend_object_std_dtor() is called through free_obj handler 2015-09-23 00:12:31 +03:00
Dmitry Stogov
e2e99f16e1 Cleanup: removed deprecated commented code 2015-09-22 22:55:00 +03:00
Anatol Belski
a490485893 add test 2015-09-22 20:45:52 +02:00
Dmitry Stogov
e45f67245a Cleanup: don't keep useless dangling pointer 2015-09-22 17:48:25 +03:00
Dmitry Stogov
e050412cdd Cleanup: removed old commented code 2015-09-22 17:06:10 +03:00
Dmitry Stogov
c72559ddf6 Cleanup: removed deprecated commented code 2015-09-22 17:02:25 +03:00
Dmitry Stogov
a9bbe5c384 Make use of timelib 2015.02's support for external memory managers. 2015-09-22 09:17:50 +01:00
Derick Rethans
922f325c68 Merge branch 'PHP-5.6' into PHP-7.0 2015-09-22 09:08:47 +01:00
Derick Rethans
96d1d13d87 Update timelib to 2015.02 2015-09-22 08:59:45 +01:00