Xinchen Hui [Thu, 11 Aug 2016 11:58:02 +0000 (19:58 +0800)]
Merge branch 'master' of git.php.net:/php-src
* 'master' of git.php.net:/php-src:
ReflectionType improvements
Fix #72810. Add check for SKIP_ONLINE_TESTS
msql > mysqli, use a better extension name as an example in php.ini, as we do not have msql support anymore (Sorry Rasmus!)
Remove sql.safe_mode
Xinchen Hui [Thu, 11 Aug 2016 03:34:56 +0000 (11:34 +0800)]
Merge branch 'intrinsics_backport' of https://github.com/TazeTSchnitzel/php-src
* 'intrinsics_backport' of https://github.com/TazeTSchnitzel/php-src:
Use checked add/sub intrinsics instead of asm for ++ and --
Use checked arithmetic intrinsics instead of asm, when possible
This is one of the last old and odd deprecated settings we still have in PHP, it was never fully implemented in all the database extensions and should probably have been gone back in 5.4, along with safe_mode. Although if my memory strikes me right, mysql was also supporting it back then, but not mysqli.
So far only interbase was supporting this feature, and the removal of it causes two effects for interbase:
- CREATE DATABASE is now allowed no matter
- The default database set by php.ini (ibase.default_db) is no longer forced
Get rid of these slow calls to LoadLibrary()/GetProcAddress() calls on Windows, we require Windows Vista as bare minimum for PHP anyway, so it does not make any sense to do this slow emulation anyway.
GD:
- PrintWindow() is available as of Windows XP, it requires linking to User32.lib, which config.w32 for ext/gd already.
CLI:
- The borrowed functions from PostgreSQL to set the titles of the console window uses SetConsoleTitle() and GetConsoleTitle(), both are available as of Windows 2000 from Kernel32.lib which we already are linking against.
Standard:
- The disk space utility functions uses GetDiskFreeSpaceExA() which is available as of Windows XP, again links to Kernel32.lib.
- The symlink() PHP function uses CreateSymbolicLinkA() which is available from Windows Vista, again from Kernel32.lib.
- php_get_windows_name() in info.c uses GetNativeSystemInfo() which is available as of Windows XP and GetProductInfo() which is available as of Windows Vista, both are again from Kernel32.lib.
Notes:
- ext/interbase & ext/pdo_firebird uses GetProcAddress(), I'm not entirely sure how to handle this one.
- ext/sqlite3, this is apart of the bundled libsqlite3, I don't really wanna play around with our bundled libs and make it a bigger issue for those who maintain and upgrade them.
- ext/readline, the call to GetProcAddress() here does not do any system calls, so it is left as is.
- win32/ioutil.c uses GetProcAddress(), but the function it attempts to load (PathCchCanonicalizeEx()) is only available from Windows 8 and greater (Pathcch.lib linkage).
- win32/time.c uses GetSystemTimePreciseAsFileTime() which is available from Windows 8 and greater to get the current system date and time which the highest possible precision and falls back to GetSystemTimeAsFileTime() (available as of Windows 2000), again Kernel32.lib, the GetSystemTimePreciseAsFileTime() is left in a GetProcAddress().
Yasuo Ohgaki [Wed, 10 Aug 2016 00:39:17 +0000 (09:39 +0900)]
Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (1423 commits)
Add NEWS
Fix ASSERT logic
Bugfix 72791: fix memory leak in PDO persistent connections
Don't copy mime types in CLI server
Class constant visibility modifiers are now supported
Remove obsolete Id tags
Bump version in OCI8 test
Update NEWS
Fixed bug #72788 (Invalid memory access when using persistent PDO connection)
Remove typo'd commit
Fix bug 72788: Invalid memory access when database_object_handle is undefined. Also fix memory leak in dbh_free when using persistent PDO connections.
Swap min/max if min > max
Allow min > max for mt_rand(). Bug #72784
Replace dead branch with ZEND_ASSERT()
Fix array_column() packed hash initialization
Add test for bug #69107: finfo no longer detects PHP files
check malloc result
Implement #38992: invoke() and invokeArgs() static method calls should match
Fix bug #55451
Fix stream_socket_enable_crypto() test
...
Xinchen Hui [Tue, 9 Aug 2016 03:33:38 +0000 (11:33 +0800)]
Merge branch 'PHP-7.1'
* PHP-7.1:
Update NEWS
Fixed bug #72788 (Invalid memory access when using persistent PDO connection)
Remove typo'd commit
Fix bug 72788: Invalid memory access when database_object_handle is undefined. Also fix memory leak in dbh_free when using persistent PDO connections.
Xinchen Hui [Tue, 9 Aug 2016 03:32:34 +0000 (11:32 +0800)]
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Fixed bug #72788 (Invalid memory access when using persistent PDO connection)
Remove typo'd commit
Fix bug 72788: Invalid memory access when database_object_handle is undefined. Also fix memory leak in dbh_free when using persistent PDO connections.
Xinchen Hui [Tue, 9 Aug 2016 03:25:32 +0000 (11:25 +0800)]
Merge branch 'bug72788' of https://github.com/keyurdg/php-src into PHP-7.0
* 'bug72788' of https://github.com/keyurdg/php-src:
Remove typo'd commit
Fix bug 72788: Invalid memory access when database_object_handle is undefined. Also fix memory leak in dbh_free when using persistent PDO connections.
Implement #38992: invoke() and invokeArgs() static method calls should match
We don't want ReflectionMethod::invoke() to simply ignore its first argument,
if the method to invoke is a static method. Instead we match its ZPP with
that of ReflectionMethod::invokeArgs(). Furthermore, we apply the DRY
principle by factoring out the code to a common helper function to prevent
inadvertent future divergence of the implementations of both methods.
As can be seen from the necessity to adapt some test cases, this causes a
BC break for some pathological cases. Therefore we apply this patch to PHP
7.1 only, which is still in beta phase.
Fixed bug #71534 (Type confusion in exif_read_data() leading to heap overflow in debug mode)
Unlike the original patch, this does not return an unknown format in case an unsigned compatible type cannot be found (cases for SINGLE and DOUBLE removed), as these seems rare cases according to the inline comments.
Note, the test does not test if PHP is in debug mode, although the report originally states it only occurs there only.
The fix is based on a patch by hlt99 at blinkenshell dot org