mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-16 13:36:38 +00:00
Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
acfdeccb2e | ||
|
|
8a7251c3b4 | ||
|
|
2c24590d6e | ||
|
|
919e91f841 | ||
|
|
a33d05b147 | ||
|
|
0c77b4307d | ||
|
|
54bccd7345 | ||
|
|
69155120e6 | ||
|
|
e2b5f18896 | ||
|
|
a8ceab8cda |
No files matched your search
+1
-3
@@ -89,9 +89,7 @@ before_script:
|
||||
|
||||
# Run PHPs run-tests.php
|
||||
script:
|
||||
# ARM64 CI reports nproc=32, which is excessive.
|
||||
- if [ -z "$ARM64" ]; then export JOBS=$(nproc); else export JOBS=16; fi
|
||||
- ./sapi/cli/php run-tests.php -P -d extension=`pwd`/modules/zend_test.so $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d opcache.protect_memory=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120 -j$JOBS
|
||||
- ./sapi/cli/php run-tests.php -P -d extension=`pwd`/modules/zend_test.so $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d opcache.protect_memory=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120 -j$(nproc)
|
||||
- sapi/cli/php -d extension_dir=`pwd`/modules -r 'dl("zend_test");'
|
||||
|
||||
after_success:
|
||||
|
||||
@@ -1,302 +1,11 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
03 Sep 2020, PHP 7.4.10
|
||||
|
||||
- Core:
|
||||
. Fixed bug #79884 (PHP_CONFIG_FILE_PATH is meaningless). (cmb)
|
||||
. Fixed bug #77932 (File extensions are case-sensitive). (cmb)
|
||||
. Fixed bug #79806 (realpath() erroneously resolves link to link). (cmb)
|
||||
. Fixed bug #79895 (PHP_CHECK_GCC_ARG does not allow flags with equal sign).
|
||||
(Santiago M. Mola)
|
||||
. Fixed bug #79919 (Stack use-after-scope in define()). (cmb)
|
||||
. Fixed bug #79934 (CRLF-only line in heredoc causes parsing error).
|
||||
(Pieter van den Ham)
|
||||
. Fixed bug #79947 (Memory leak on invalid offset type in compound
|
||||
assignment). (Nikita)
|
||||
|
||||
- COM:
|
||||
. Fixed bug #48585 (com_load_typelib holds reference, fails on second call).
|
||||
(cmb)
|
||||
|
||||
- Exif:
|
||||
. Fixed bug #75785 (Many errors from exif_read_data).
|
||||
(Níckolas Daniel da Silva)
|
||||
|
||||
- Gettext:
|
||||
. Fixed bug #70574 (Tests fail due to relying on Linux fallback behavior for
|
||||
gettext()). (Florian Engelhardt)
|
||||
|
||||
- LDAP:
|
||||
. Fixed memory leaks. (ptomulik)
|
||||
|
||||
- OPcache:
|
||||
. Fixed bug #73060 (php failed with error after temp folder cleaned up).
|
||||
(cmb)
|
||||
. Fixed bug #79917 (File cache segfault with a static variable in inherited
|
||||
method). (Nikita)
|
||||
|
||||
- PDO:
|
||||
. Fixed bug #64705 (errorInfo property of PDOException is null when
|
||||
PDO::__construct() fails). (Ahmed Abdou)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #79724 (Return type does not match in ext/session/mod_mm.c).
|
||||
(Nikita)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #79930 (array_merge_recursive() crashes when called with array
|
||||
with single reference). (Nikita)
|
||||
. Fixed bug #79944 (getmxrr always returns true on Alpine linux). (Nikita)
|
||||
. Fixed bug #79951 (Memory leak in str_replace of empty string). (Nikita)
|
||||
|
||||
- XML:
|
||||
. Fixed bug #79922 (Crash after multiple calls to xml_parser_free()). (cmb)
|
||||
|
||||
06 Aug 2020, PHP 7.4.9
|
||||
|
||||
- Apache:
|
||||
. Fixed bug #79030 (Upgrade apache2handler's php_apache_sapi_get_request_time
|
||||
to return usec). (Herbert256)
|
||||
|
||||
- COM:
|
||||
. Fixed bug #63208 (BSTR to PHP string conversion not binary safe). (cmb)
|
||||
. Fixed bug #63527 (DCOM does not work with Username, Password parameter).
|
||||
(cmb)
|
||||
|
||||
- Core:
|
||||
. Fixed bug #79877 (getimagesize function silently truncates after a null
|
||||
byte) (cmb)
|
||||
. Fixed bug #79740 (serialize() and unserialize() methods can not be called
|
||||
statically). (Nikita)
|
||||
. Fixed bug #79783 (Segfault in php_str_replace_common). (Nikita)
|
||||
. Fixed bug #79778 (Assertion failure if dumping closure with unresolved
|
||||
static variable). (Nikita)
|
||||
. Fixed bug #79779 (Assertion failure when assigning property of string
|
||||
offset by reference). (Nikita)
|
||||
. Fixed bug #79792 (HT iterators not removed if empty array is destroyed).
|
||||
(Nikita)
|
||||
. Fixed bug #78598 (Changing array during undef index RW error segfaults).
|
||||
(Nikita)
|
||||
. Fixed bug #79784 (Use after free if changing array during undef var during
|
||||
array write fetch). (Nikita)
|
||||
. Fixed bug #79793 (Use after free if string used in undefined index warning
|
||||
is changed). (Nikita)
|
||||
. Fixed bug #79862 (Public non-static property in child should take priority
|
||||
over private static). (Nikita)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #79756 (finfo_file crash (FILEINFO_MIME)). (cmb)
|
||||
|
||||
- FTP:
|
||||
. Fixed bug #55857 (ftp_size on large files). (cmb)
|
||||
|
||||
- Mbstring:
|
||||
. Fixed bug #79787 (mb_strimwidth does not trim string). (XXiang)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #79881 (Memory leak in openssl_pkey_get_public()). (Nikita)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #79797 (Use of freed hash key in the phar_parse_zipfile
|
||||
function). (CVE-2020-7068) (cmb)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #79487 (::getStaticProperties() ignores property modifications).
|
||||
(cmb, Nikita)
|
||||
. Fixed bug #69804 (::getStaticPropertyValue() throws on protected props).
|
||||
(cmb, Nikita)
|
||||
. Fixed bug #79820 (Use after free when type duplicated into
|
||||
ReflectionProperty gets resolved). (Christopher Broadbent)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #70362 (Can't copy() large 'data://' with open_basedir). (cmb)
|
||||
. Fixed bug #78008 (dns_check_record() always return true on Alpine).
|
||||
(Andy Postnikov)
|
||||
. Fixed bug #79839 (array_walk() does not respect property types). (Nikita)
|
||||
|
||||
09 Jul 2020, PHP 7.4.8
|
||||
|
||||
- Core:
|
||||
. Fixed bug #79595 (zend_init_fpu() alters FPU precision). (cmb, Nikita)
|
||||
. Fixed bug #79650 (php-win.exe 100% cpu lockup). (cmb)
|
||||
. Fixed bug #79668 (get_defined_functions(true) may miss functions). (cmb,
|
||||
Nikita)
|
||||
. Fixed bug #79683 (Fake reflection scope affects __toString()). (Nikita)
|
||||
. Fixed possibly unsupported timercmp() usage. (cmb)
|
||||
|
||||
- Exif:
|
||||
. Fixed bug #79687 (Sony picture - PHP Warning - Make, Model, MakerNotes).
|
||||
(cmb)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #79681 (mime_content_type/finfo returning incorrect mimetype).
|
||||
(cmb)
|
||||
|
||||
- Filter:
|
||||
. Fixed bug #73527 (Invalid memory access in php_filter_strip). (cmb)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #79676 (imagescale adds black border with IMG_BICUBIC). (cmb)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #62890 (default_socket_timeout=-1 causes connection to timeout).
|
||||
(cmb)
|
||||
|
||||
- PDO SQLite:
|
||||
. Fixed bug #79664 (PDOStatement::getColumnMeta fails on empty result set).
|
||||
(cmb)
|
||||
|
||||
- phpdbg:
|
||||
. Fixed bug #73926 (phpdbg will not accept input on restart execution). (cmb)
|
||||
. Fixed bug #73927 (phpdbg fails with windows error prompt at "watch array").
|
||||
(cmb)
|
||||
. Fixed several mostly Windows related phpdbg bugs. (cmb)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #79710 (Reproducible segfault in error_handler during GC
|
||||
involved an SplFileObject). (Nikita)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #74267 (segfault with streams and invalid data). (cmb)
|
||||
. Fixed bug #79579 (ZTS build of PHP 7.3.17 doesn't handle ERANGE for
|
||||
posix_getgrgid and others). (Böszörményi Zoltán)
|
||||
|
||||
11 Jun 2020, PHP 7.4.7
|
||||
|
||||
- Core:
|
||||
. Fixed bug #79599 (coredump in set_error_handler). (Laruence)
|
||||
. Fixed bug #79566 (Private SHM is not private on Windows). (cmb)
|
||||
. Fixed bug #79489 (.user.ini does not inherit). (cmb)
|
||||
. Fixed bug #79600 (Regression in 7.4.6 when yielding an array based
|
||||
generator). (Nikita)
|
||||
. Fixed bug #79657 ("yield from" hangs when invalid value encountered).
|
||||
(Nikita)
|
||||
|
||||
- FFI:
|
||||
. Fixed bug #79571 (FFI: var_dumping unions may segfault). (cmb)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #79615 (Wrong GIF header written in GD GIFEncode). (sageptr, cmb)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug #79596 (MySQL FLOAT truncates to int some locales). (cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #79588 (Boolean opcache settings ignore on/off values). (cmb)
|
||||
. Fixed bug #79548 (Preloading segfault with inherited method using static
|
||||
variable). (Nikita)
|
||||
. Fixed bug #79603 (RTD collision with opcache). (Nikita)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #79561 (dns_get_record() fails with DNS_ALL). (cmb)
|
||||
|
||||
14 May 2020, PHP 7.4.6
|
||||
|
||||
- Core:
|
||||
. Fixed bug #79536 (zend_clear_exception prevent exception's destructor to be
|
||||
called). (Laruence)
|
||||
. Fixed bug #78434 (Generator yields no items after valid() call). (Nikita)
|
||||
. Fixed bug #79477 (casting object into array creates references). (Nikita)
|
||||
. Fixed bug #79514 (Memory leaks while including unexistent file). (cmb,
|
||||
Nikita)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #78221 (DOMNode::normalize() doesn't remove empty text nodes).
|
||||
(cmb)
|
||||
|
||||
- EXIF:
|
||||
. Fixed bug #79336 (ext/exif/tests/bug79046.phpt fails on Big endian arch).
|
||||
(Nikita)
|
||||
|
||||
- FCGI:
|
||||
. Fixed bug #79491 (Search for .user.ini extends up to root dir). (cmb)
|
||||
|
||||
- MBString:
|
||||
. Fixed bug #79441 (Segfault in mb_chr() if internal encoding is unsupported).
|
||||
(Girgias)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #79497 (stream_socket_client() throws an unknown error sometimes
|
||||
with <1s timeout). (Joe Cai)
|
||||
|
||||
- PCRE:
|
||||
. Upgraded to PCRE2 10.34. (cmb)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #79503 (Memory leak on duplicate metadata). (cmb)
|
||||
|
||||
- SimpleXML:
|
||||
. Fixed bug #79528 (Different object of the same xml between 7.4.5 and
|
||||
7.4.4). (cmb)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #69264 (__debugInfo() ignored while extending SPL classes). (cmb)
|
||||
. Fixed bug #67369 (ArrayObject serialization drops the iterator class).
|
||||
(Alex Dowad)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #79468 (SIGSEGV when closing stream handle with a stream filter
|
||||
appended). (dinosaur)
|
||||
. Fixed bug #79447 (Serializing uninitialized typed properties with __sleep
|
||||
should not throw). (nicolas-grekas)
|
||||
|
||||
16 Apr 2020, PHP 7.4.5
|
||||
|
||||
- Core:
|
||||
. Fixed bug #79364 (When copy empty array, next key is unspecified). (cmb)
|
||||
. Fixed bug #78210 (Invalid pointer address). (cmb, Nikita)
|
||||
|
||||
- CURL:
|
||||
. Fixed bug #79199 (curl_copy_handle() memory leak). (cmb)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #79396 (DateTime hour incorrect during DST jump forward). (Nate
|
||||
Brunette)
|
||||
. Fixed bug #74940 (DateTimeZone loose comparison always true). (cmb)
|
||||
|
||||
- FPM:
|
||||
. Implement request #77062 (Allow numeric [UG]ID in FPM listen.{owner,group})
|
||||
(Andre Nathan)
|
||||
|
||||
- Iconv:
|
||||
. Fixed bug #79200 (Some iconv functions cut Windows-1258). (cmb)
|
||||
|
||||
- OPcache:
|
||||
. Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).
|
||||
(Dmitry)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #79413 (session_create_id() fails for active sessions). (cmb)
|
||||
|
||||
- Shmop:
|
||||
. Fixed bug #79427 (Integer Overflow in shmop_open()). (cmb)
|
||||
|
||||
- SimpleXML:
|
||||
. Fixed bug #61597 (SXE properties may lack attributes and content). (cmb)
|
||||
|
||||
- SOAP:
|
||||
. Fixed bug #79357 (SOAP request segfaults when any request parameter is
|
||||
missing). (Nikita)
|
||||
|
||||
- Spl:
|
||||
. Fixed bug #75673 (SplStack::unserialize() behavior). (cmb)
|
||||
. Fixed bug #79393 (Null coalescing operator failing with SplFixedArray).
|
||||
(cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #79330 (shell_exec() silently truncates after a null byte). (stas)
|
||||
. Fixed bug #79465 (OOB Read in urldecode()). (CVE-2020-7067) (stas)
|
||||
. Fixed bug #79410 (system() swallows last chunk if it is exactly 4095 bytes
|
||||
without newline). (Christian Schneider)
|
||||
|
||||
- Zip:
|
||||
. Fixed Bug #79296 (ZipArchive::open fails on empty file). (Remi)
|
||||
. Fixed bug #79424 (php_zip_glob uses gl_pathc after call to globfree).
|
||||
(Max Rees)
|
||||
|
||||
19 Mar 2020, PHP 7.4.4
|
||||
|
||||
- Core:
|
||||
. Fixed bug #79329 (get_headers() silently truncates after a null byte)
|
||||
(CVE-2020-7066) (cmb)
|
||||
. Fixed bug #79244 (php crashes during parsing INI file). (Laruence)
|
||||
. Fixed bug #63206 (restore_error_handler does not restore previous errors
|
||||
mask). (Mark Plomer)
|
||||
@@ -328,12 +37,12 @@ PHP NEWS
|
||||
(cmb)
|
||||
|
||||
- EXIF:
|
||||
. Fixed bug #79282 (Use-of-uninitialized-value in exif). (CVE-2020-7064)
|
||||
. Fixed bug #79282 (Use-of-uninitialized-value in exif) (CVE-2020-7064)
|
||||
(Nikita)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #79283 (Segfault in libmagic patch contains a buffer
|
||||
overflow). (cmb)
|
||||
overflow) (cmb)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #77653 (operator displayed instead of the real error message).
|
||||
@@ -341,8 +50,8 @@ PHP NEWS
|
||||
. Fixed bug #79014 (PHP-FPM & Primary script unknown). (Jakub Zelenka)
|
||||
|
||||
- MBstring:
|
||||
. Fixed bug #79371 (mb_strtolower (UTF-32LE): stack-buffer-overflow at
|
||||
php_unicode_tolower_full). (CVE-2020-7065) (cmb)
|
||||
. Fixed bug #79371 (mb_strtolower (UTF-32LE): stack-buffer-overflow at
|
||||
php_unicode_tolower_full) (CVE-2020-7065) (cmb)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #64032 (mysqli reports different client_version). (cmb)
|
||||
@@ -373,8 +82,6 @@ PHP NEWS
|
||||
. Fixed bug #79294 (::columnType() may fail after SQLite3Stmt::reset()). (cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #79329 (get_headers() silently truncates after a null byte).
|
||||
(CVE-2020-7066) (cmb)
|
||||
. Fixed bug #79254 (getenv() w/o arguments not showing changes). (cmb)
|
||||
. Fixed bug #79265 (Improper injection of Host header when using fopen for
|
||||
http requests). (Miguel Xavier Penha Neto)
|
||||
|
||||
+7
-9
@@ -615,16 +615,14 @@ TSRM_API int shmget(key_t key, size_t size, int flags)
|
||||
{/*{{{*/
|
||||
shm_pair *shm;
|
||||
char shm_segment[26], shm_info[29];
|
||||
HANDLE shm_handle = NULL, info_handle = NULL;
|
||||
HANDLE shm_handle, info_handle;
|
||||
BOOL created = FALSE;
|
||||
|
||||
if (key != IPC_PRIVATE) {
|
||||
snprintf(shm_segment, sizeof(shm_segment), "TSRM_SHM_SEGMENT:%d", key);
|
||||
snprintf(shm_info, sizeof(shm_info), "TSRM_SHM_DESCRIPTOR:%d", key);
|
||||
snprintf(shm_segment, sizeof(shm_segment), "TSRM_SHM_SEGMENT:%d", key);
|
||||
snprintf(shm_info, sizeof(shm_info), "TSRM_SHM_DESCRIPTOR:%d", key);
|
||||
|
||||
shm_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_segment);
|
||||
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
|
||||
}
|
||||
shm_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_segment);
|
||||
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
|
||||
|
||||
if (!shm_handle && !info_handle) {
|
||||
if (flags & IPC_CREAT) {
|
||||
@@ -635,8 +633,8 @@ TSRM_API int shmget(key_t key, size_t size, int flags)
|
||||
DWORD high = 0;
|
||||
DWORD low = size;
|
||||
#endif
|
||||
shm_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, high, low, key == IPC_PRIVATE ? NULL : shm_segment);
|
||||
info_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(shm->descriptor), key == IPC_PRIVATE ? NULL : shm_info);
|
||||
shm_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, high, low, shm_segment);
|
||||
info_handle = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(shm->descriptor), shm_info);
|
||||
created = TRUE;
|
||||
}
|
||||
if (!shm_handle || !info_handle) {
|
||||
|
||||
@@ -20,7 +20,12 @@ function test() {
|
||||
test();
|
||||
echo "bug\n";
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Exception: ops 1 in %sbug53511.php:4
|
||||
Fatal error: Uncaught Exception: ops 2 in %sbug53511.php:11
|
||||
Stack trace:
|
||||
#0 %sbug53511.php(17): test()
|
||||
#1 {main}
|
||||
|
||||
Next Exception: ops 1 in %sbug53511.php:4
|
||||
Stack trace:
|
||||
#0 %sbug53511.php(12): Foo->__destruct()
|
||||
#1 %sbug53511.php(17): test()
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace N2 {
|
||||
echo $a->hello(), PHP_EOL;
|
||||
echo $a->foo(), PHP_EOL;
|
||||
try {
|
||||
} catch(namespace\Foo $e)
|
||||
} catch(namespace \Foo $e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
--TEST--
|
||||
Bug #63816: implementation child interface and after parent cause fatal error
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface RootInterface
|
||||
{
|
||||
function foo();
|
||||
}
|
||||
|
||||
interface FirstChildInterface extends RootInterface
|
||||
{
|
||||
function foo();
|
||||
}
|
||||
|
||||
interface SecondChildInterface extends RootInterface
|
||||
{
|
||||
function foo();
|
||||
}
|
||||
|
||||
class A implements FirstChildInterface, SecondChildInterface
|
||||
{
|
||||
function foo()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class B implements RootInterface, FirstChildInterface
|
||||
{
|
||||
function foo()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class C implements FirstChildInterface, RootInterface
|
||||
{
|
||||
function foo()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
@@ -14,5 +14,5 @@ var_dump($a);
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
["b"]=>
|
||||
int(2)
|
||||
int(1)
|
||||
}
|
||||
@@ -15,6 +15,6 @@ var_dump(parse_ini_file($ini_file));
|
||||
unlink(__DIR__ . "/bug70748.ini");
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: syntax error, unexpected end of file, expecting '}' in %sbug70748.ini on line %d
|
||||
Warning: syntax error, unexpected $end, expecting '}' in %sbug70748.ini on line %d
|
||||
in %sbug70748.php on line %d
|
||||
bool(false)
|
||||
@@ -1,31 +0,0 @@
|
||||
--TEST--
|
||||
Bug #78598: Changing array during undef index RW error segfaults
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$my_var = null;
|
||||
set_error_handler(function() use(&$my_var) {
|
||||
$my_var = 0;
|
||||
});
|
||||
|
||||
$my_var[0] .= "xyz";
|
||||
var_dump($my_var);
|
||||
|
||||
$my_var = null;
|
||||
$my_var[0][0][0] .= "xyz";
|
||||
var_dump($my_var);
|
||||
|
||||
$my_var = null;
|
||||
$my_var["foo"] .= "xyz";
|
||||
var_dump($my_var);
|
||||
|
||||
$my_var = null;
|
||||
$my_var["foo"]["bar"]["baz"] .= "xyz";
|
||||
var_dump($my_var);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
@@ -1,22 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79364 (When copy empty array, next key is unspecified)
|
||||
--FILE--
|
||||
<?php
|
||||
$a = [1, 2];
|
||||
unset($a[1], $a[0]);
|
||||
$b = $a;
|
||||
|
||||
$a[] = 3;
|
||||
$b[] = 4;
|
||||
|
||||
var_dump($a, $b);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
array(1) {
|
||||
[2]=>
|
||||
int(4)
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79477: casting object into array creates references
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test {
|
||||
public $prop = 'default value';
|
||||
}
|
||||
|
||||
$obj = new Test;
|
||||
$obj->{1} = null;
|
||||
|
||||
$arr = (array) $obj;
|
||||
$arr['prop'] = 'new value';
|
||||
|
||||
echo $obj->prop, "\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
default value
|
||||
@@ -1,13 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79514 (Memory leaks while including unexistent file)
|
||||
--FILE--
|
||||
<?php
|
||||
$mem1 = memory_get_usage(true);
|
||||
for ($i = 0; $i < 100000; $i++) {
|
||||
@include __DIR__ . '/bug79514.doesnotexist';
|
||||
}
|
||||
$mem2 = memory_get_usage(true);
|
||||
var_dump($mem2 - $mem1 < 100000);
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
@@ -1,27 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79599 (coredump in set_error_handler)
|
||||
--FILE--
|
||||
<?php
|
||||
set_error_handler(function($code, $message){
|
||||
throw new \Exception($message);
|
||||
});
|
||||
function test1(){
|
||||
$a[] = $b;
|
||||
}
|
||||
function test2(){
|
||||
$a[$c] = $b;
|
||||
}
|
||||
try{
|
||||
test1();
|
||||
}catch(\Exception $e){
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
try{
|
||||
test2();
|
||||
}catch(\Exception $e){
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
string(21) "Undefined variable: b"
|
||||
string(21) "Undefined variable: b"
|
||||
@@ -1,42 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79657: "yield from" hangs when invalid value encountered
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function throwException(): iterable
|
||||
{
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
function loop(): iterable
|
||||
{
|
||||
$callbacks = [
|
||||
function () {
|
||||
yield 'first';
|
||||
},
|
||||
function () {
|
||||
yield from throwException();
|
||||
}
|
||||
];
|
||||
|
||||
foreach ($callbacks as $callback) {
|
||||
yield from $callback();
|
||||
}
|
||||
}
|
||||
|
||||
function get(string $first, int $second): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
get(...loop());
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Exception in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): throwException()
|
||||
#1 %s(%d): {closure}()
|
||||
#2 %s(%d): loop()
|
||||
#3 {main}
|
||||
thrown in %s on line %d
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79668 (get_defined_functions(true) may miss functions)
|
||||
--INI--
|
||||
disable_functions=sha1_file,password_hash
|
||||
--FILE--
|
||||
<?php
|
||||
$df = get_defined_functions(true);
|
||||
foreach (['sha1', 'sha1_file', 'hash', 'password_hash'] as $funcname) {
|
||||
var_dump(in_array($funcname, $df['internal'], true));
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
@@ -1,22 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79740: serialize() and unserialize() methods can not be called statically
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
public function serialize() { }
|
||||
public function unserialize() { }
|
||||
}
|
||||
|
||||
var_dump(is_callable(['A', 'serialize']));
|
||||
var_dump(is_callable(['A', 'unserialize']));
|
||||
A::serialize();
|
||||
A::unserialize();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
Deprecated: Non-static method A::serialize() should not be called statically in %s on line %d
|
||||
|
||||
Deprecated: Non-static method A::unserialize() should not be called statically in %s on line %d
|
||||
@@ -1,26 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79778: Assertion failure if dumping closure with unresolved static variable
|
||||
--FILE--
|
||||
<?php
|
||||
$closure1 = function() {
|
||||
static $var = CONST_REF;
|
||||
};
|
||||
var_dump($closure1);
|
||||
print_r($closure1);
|
||||
?>
|
||||
--EXPECT--
|
||||
object(Closure)#1 (1) {
|
||||
["static"]=>
|
||||
array(1) {
|
||||
["var"]=>
|
||||
string(14) "<constant ast>"
|
||||
}
|
||||
}
|
||||
Closure Object
|
||||
(
|
||||
[static] => Array
|
||||
(
|
||||
[var] => <constant ast>
|
||||
)
|
||||
|
||||
)
|
||||
@@ -1,12 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79779: Assertion failure when assigning property of string offset by reference
|
||||
--FILE--
|
||||
<?php
|
||||
$str = "";
|
||||
$str[1]->a = &$b;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Cannot use string offset as an object in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
@@ -1,11 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79783: Segfault in php_str_replace_common
|
||||
--FILE--
|
||||
<?php
|
||||
str_replace("a", "b", "c", strlen("d"));
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Cannot pass parameter 4 by reference in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
@@ -1,20 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79784: Use after free if changing array during undef var during array write fetch
|
||||
--FILE--
|
||||
<?php
|
||||
set_error_handler(function () {
|
||||
$GLOBALS['a'] = null;
|
||||
});
|
||||
|
||||
$a[$c] = 'x' ;
|
||||
var_dump($a);
|
||||
$a[$c] .= 'x' ;
|
||||
var_dump($a);
|
||||
$a[$c][$c] = 'x' ;
|
||||
var_dump($a);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79792: HT iterators not removed if empty array is destroyed
|
||||
--FILE--
|
||||
<?php
|
||||
$a = [42];
|
||||
foreach ($a as &$c) {
|
||||
// Make the array empty.
|
||||
unset($a[0]);
|
||||
// Destroy the array.
|
||||
$a = null;
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Warning: Invalid argument supplied for foreach() in %s on line %d
|
||||
===DONE===
|
||||
@@ -1,32 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79793: Use after free if string used in undefined index warning is changed
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$key = "foo";
|
||||
$key .= "bar";
|
||||
set_error_handler(function($_, $m) use (&$key) {
|
||||
echo "$m\n";
|
||||
$key .= "baz";
|
||||
});
|
||||
|
||||
$ary = [];
|
||||
$ary[$key]++;
|
||||
var_dump($ary);
|
||||
$ary[$key] += 1;
|
||||
var_dump($ary);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Undefined index: foobar
|
||||
array(1) {
|
||||
["foobar"]=>
|
||||
int(1)
|
||||
}
|
||||
Undefined index: foobarbaz
|
||||
array(2) {
|
||||
["foobar"]=>
|
||||
int(1)
|
||||
["foobarbaz"]=>
|
||||
int(1)
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79862: Public non-static property in child should take priority over private static
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class a {
|
||||
private static $prop1;
|
||||
private static $prop2;
|
||||
private $prop3;
|
||||
private $prop4;
|
||||
private static $prop5;
|
||||
private static $prop6;
|
||||
public function __construct() {
|
||||
$this->prop1 = 1;
|
||||
$this->prop2 = 2;
|
||||
$this->prop3 = 3;
|
||||
$this->prop4 = 4;
|
||||
$this->prop5 = 5;
|
||||
$this->prop6 = 6;
|
||||
var_dump(self::$prop1);
|
||||
var_dump(self::$prop2);
|
||||
var_dump(self::$prop5);
|
||||
var_dump(self::$prop6);
|
||||
var_dump($this);
|
||||
}
|
||||
}
|
||||
class c extends a {
|
||||
public $prop1;
|
||||
protected $prop2;
|
||||
public static $prop3;
|
||||
protected static $prop4;
|
||||
public static $prop5;
|
||||
protected static $prop6;
|
||||
}
|
||||
|
||||
$c = new c;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Accessing static property c::$prop5 as non static in %s on line %d
|
||||
|
||||
Notice: Accessing static property c::$prop6 as non static in %s on line %d
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
object(c)#1 (6) {
|
||||
["prop1"]=>
|
||||
int(1)
|
||||
["prop2":protected]=>
|
||||
int(2)
|
||||
["prop3":"a":private]=>
|
||||
int(3)
|
||||
["prop4":"a":private]=>
|
||||
int(4)
|
||||
["prop5"]=>
|
||||
int(5)
|
||||
["prop6"]=>
|
||||
int(6)
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79919 (Stack use-after-scope in define())
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('simplexml')) die('skip simplexml extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$b = error_log(0);
|
||||
$b = simplexml_load_string('<xml/>', null, $b);
|
||||
define(0, $b);
|
||||
?>
|
||||
--EXPECT--
|
||||
0
|
||||
@@ -1,29 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79934: CRLF-only line in heredoc causes parsing error
|
||||
--DESCRIPTION--
|
||||
This test covers different variations of whitespace-only lines in heredoc strings.
|
||||
These whitespace-only lines should be ignored when stripping indentation.
|
||||
--FILE--
|
||||
<?php
|
||||
// lines with only CRLF should not cause a parse error
|
||||
eval("\$s1 = <<<HEREDOC\r\n a\r\n\r\n b\r\n HEREDOC;");
|
||||
var_dump(addcslashes($s1, "\r\n"));
|
||||
|
||||
// lines with only a LF should not cause a parse error
|
||||
eval("\$s2 = <<<HEREDOC\n a\n\n b\n HEREDOC;");
|
||||
var_dump(addcslashes($s2, "\n"));
|
||||
|
||||
// lines with only a CR should not cause a parse error
|
||||
eval("\$s3 = <<<HEREDOC\r a\r\r b\r HEREDOC;");
|
||||
var_dump(addcslashes($s3, "\r"));
|
||||
|
||||
// lines with only whitespace should not cause a parse error
|
||||
eval("\$s4 = <<<HEREDOC\r a\r\n \r\n b\r HEREDOC;");
|
||||
var_dump(addcslashes($s4, "\n\r"));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(10) "a\r\n\r\nb"
|
||||
string(6) "a\n\nb"
|
||||
string(6) "a\r\rb"
|
||||
string(10) "a\r\n\r\nb"
|
||||
@@ -1,13 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79947: Memory leak on invalid offset type in compound assignment
|
||||
--FILE--
|
||||
<?php
|
||||
$array = [];
|
||||
$key = [];
|
||||
$array[$key] += [$key];
|
||||
var_dump($array);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Illegal offset type in %s on line %d
|
||||
array(0) {
|
||||
}
|
||||
@@ -9,7 +9,6 @@ namespace {
|
||||
|
||||
var_dump(FOO); // Ok
|
||||
var_dump(foo); // Deprecated
|
||||
var_dump(\foo); // Deprecated
|
||||
|
||||
var_dump(NS\FOO); // Ok
|
||||
var_dump(ns\FOO); // Ok
|
||||
@@ -73,13 +72,10 @@ int(42)
|
||||
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 8
|
||||
int(42)
|
||||
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 9
|
||||
int(42)
|
||||
int(24)
|
||||
int(24)
|
||||
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 13
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 12
|
||||
int(24)
|
||||
bool(true)
|
||||
bool(true)
|
||||
@@ -88,24 +84,24 @@ bool(true)
|
||||
bool(true)
|
||||
int(42)
|
||||
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 22
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 21
|
||||
int(42)
|
||||
int(24)
|
||||
int(24)
|
||||
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 25
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 24
|
||||
int(24)
|
||||
int(24)
|
||||
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 30
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 29
|
||||
int(24)
|
||||
int(24)
|
||||
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 35
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 34
|
||||
int(24)
|
||||
int(42)
|
||||
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 40
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 39
|
||||
int(42)
|
||||
bool(true)
|
||||
bool(true)
|
||||
@@ -114,18 +110,18 @@ bool(true)
|
||||
bool(true)
|
||||
int(42)
|
||||
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 49
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 48
|
||||
int(42)
|
||||
int(24)
|
||||
int(24)
|
||||
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 52
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS\FOO" in %s on line 51
|
||||
int(24)
|
||||
int(42)
|
||||
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 56
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 55
|
||||
int(42)
|
||||
int(43)
|
||||
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 60
|
||||
Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "FOO" in %s on line 59
|
||||
int(43)
|
||||
@@ -1,20 +0,0 @@
|
||||
--TEST--
|
||||
Leak when setting recursive previous exception in finally handling
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
try {
|
||||
try {
|
||||
throw new Exception("Test");
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
} finally {
|
||||
throw $e;
|
||||
}
|
||||
} catch (Exception $e2) {
|
||||
echo $e2->getMessage(), "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Test
|
||||
@@ -1,27 +0,0 @@
|
||||
--TEST--
|
||||
Bug #78434: Generator skips first item after valid() call
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$function = function () {
|
||||
yield 0;
|
||||
};
|
||||
|
||||
$wrapper = function () use ($function) {
|
||||
$generator = $function();
|
||||
$generator->valid();
|
||||
yield from $generator;
|
||||
|
||||
$generator = $function();
|
||||
$generator->valid();
|
||||
yield from $generator;
|
||||
};
|
||||
|
||||
foreach ($wrapper() as $value) {
|
||||
echo $value, "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
0
|
||||
0
|
||||
@@ -1,24 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79600: Regression in 7.4.6 when yielding an array based generator
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function createArrayGenerator() {
|
||||
yield from [
|
||||
1,
|
||||
2,
|
||||
];
|
||||
}
|
||||
|
||||
function createGeneratorFromArrayGenerator() {
|
||||
yield from createArrayGenerator();
|
||||
}
|
||||
|
||||
foreach (createGeneratorFromArrayGenerator() as $value) {
|
||||
echo $value, "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
1
|
||||
2
|
||||
@@ -10,6 +10,9 @@ function from($levels) {
|
||||
}
|
||||
|
||||
function gen($gen, $level) {
|
||||
if ($level % 2) {
|
||||
yield $gen->current();
|
||||
}
|
||||
yield from $gen;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
--TEST--
|
||||
Assigning stringable object to static string property
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test1 {
|
||||
public static $ref;
|
||||
}
|
||||
class Test2 {
|
||||
public string $str = "str";
|
||||
}
|
||||
class Test3 {
|
||||
public function __toString() {
|
||||
$x = "foo";
|
||||
return $x . "bar";
|
||||
}
|
||||
}
|
||||
|
||||
$test2 = new Test2;
|
||||
Test1::$ref =& $test2->str;
|
||||
Test1::$ref = new Test3;
|
||||
var_dump(Test1::$ref);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(6) "foobar"
|
||||
@@ -1,47 +0,0 @@
|
||||
--TEST--
|
||||
Variable assignment in catch must respect typed references
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test {
|
||||
public int $i = 42;
|
||||
public string $s = "str";
|
||||
}
|
||||
|
||||
$test = new Test;
|
||||
|
||||
$ref =& $test->i;
|
||||
try {
|
||||
try {
|
||||
throw new Exception("ex");
|
||||
} catch (Exception $ref) {
|
||||
echo "Unreachable\n";
|
||||
}
|
||||
} catch (TypeError $e) {
|
||||
var_dump($test->i);
|
||||
echo $e . "\n\n";
|
||||
}
|
||||
|
||||
$ref =& $test->s;
|
||||
try {
|
||||
try {
|
||||
throw new Exception("ex");
|
||||
} catch (Exception $ref) {
|
||||
echo "Unreachable\n";
|
||||
}
|
||||
} catch (TypeError $e) {
|
||||
var_dump($test->s);
|
||||
echo $e . "\n\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(42)
|
||||
TypeError: Cannot assign Exception to reference held by property Test::$i of type int in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
|
||||
string(3) "str"
|
||||
TypeError: Cannot assign Exception to reference held by property Test::$s of type string in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
@@ -1,46 +0,0 @@
|
||||
--TEST--
|
||||
Converting undefined index/offset notice to exception
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
set_error_handler(function($_, $msg) {
|
||||
throw new Exception($msg);
|
||||
});
|
||||
|
||||
$test = [];
|
||||
try {
|
||||
$test[0] .= "xyz";
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
var_dump($test);
|
||||
|
||||
try {
|
||||
$test["key"] .= "xyz";
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
var_dump($test);
|
||||
|
||||
unset($test);
|
||||
try {
|
||||
$GLOBALS["test"] .= "xyz";
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
try {
|
||||
var_dump($test);
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Undefined offset: 0
|
||||
array(0) {
|
||||
}
|
||||
Undefined index: key
|
||||
array(0) {
|
||||
}
|
||||
Undefined index: test
|
||||
Undefined variable: test
|
||||
+1
-13
@@ -81,7 +81,6 @@ ZEND_API char *(*zend_getenv)(char *name, size_t name_len);
|
||||
ZEND_API zend_string *(*zend_resolve_path)(const char *filename, size_t filename_len);
|
||||
ZEND_API int (*zend_post_startup_cb)(void) = NULL;
|
||||
ZEND_API void (*zend_post_shutdown_cb)(void) = NULL;
|
||||
ZEND_API int (*zend_preload_autoload)(zend_string *filename) = NULL;
|
||||
|
||||
void (*zend_on_timeout)(int seconds);
|
||||
|
||||
@@ -165,12 +164,6 @@ static ZEND_INI_MH(OnUpdateAssertions) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#if ZEND_DEBUG
|
||||
# define SIGNAL_CHECK_DEFAULT "1"
|
||||
#else
|
||||
# define SIGNAL_CHECK_DEFAULT "0"
|
||||
#endif
|
||||
|
||||
ZEND_INI_BEGIN()
|
||||
ZEND_INI_ENTRY("error_reporting", NULL, ZEND_INI_ALL, OnUpdateErrorReporting)
|
||||
STD_ZEND_INI_ENTRY("zend.assertions", "1", ZEND_INI_ALL, OnUpdateAssertions, assertions, zend_executor_globals, executor_globals)
|
||||
@@ -179,7 +172,7 @@ ZEND_INI_BEGIN()
|
||||
ZEND_INI_ENTRY("zend.script_encoding", NULL, ZEND_INI_ALL, OnUpdateScriptEncoding)
|
||||
STD_ZEND_INI_BOOLEAN("zend.detect_unicode", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals)
|
||||
#ifdef ZEND_SIGNALS
|
||||
STD_ZEND_INI_BOOLEAN("zend.signal_check", SIGNAL_CHECK_DEFAULT, ZEND_INI_SYSTEM, OnUpdateBool, check, zend_signal_globals_t, zend_signal_globals)
|
||||
STD_ZEND_INI_BOOLEAN("zend.signal_check", "0", ZEND_INI_SYSTEM, OnUpdateBool, check, zend_signal_globals_t, zend_signal_globals)
|
||||
#endif
|
||||
STD_ZEND_INI_BOOLEAN("zend.exception_ignore_args", "0", ZEND_INI_ALL, OnUpdateBool, exception_ignore_args, zend_executor_globals, executor_globals)
|
||||
ZEND_INI_END()
|
||||
@@ -1086,11 +1079,6 @@ void zend_shutdown(void) /* {{{ */
|
||||
CG(map_ptr_base) = NULL;
|
||||
CG(map_ptr_size) = 0;
|
||||
}
|
||||
if (CG(script_encoding_list)) {
|
||||
free(CG(script_encoding_list));
|
||||
CG(script_encoding_list) = NULL;
|
||||
CG(script_encoding_list_size) = 0;
|
||||
}
|
||||
#endif
|
||||
zend_destroy_rsrc_list_dtors();
|
||||
}
|
||||
|
||||
@@ -292,9 +292,6 @@ extern ZEND_API zend_string *(*zend_resolve_path)(const char *filename, size_t f
|
||||
extern ZEND_API int (*zend_post_startup_cb)(void);
|
||||
extern ZEND_API void (*zend_post_shutdown_cb)(void);
|
||||
|
||||
/* Callback for loading of not preloaded part of the script */
|
||||
extern ZEND_API int (*zend_preload_autoload)(zend_string *filename);
|
||||
|
||||
ZEND_API ZEND_COLD void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
|
||||
ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
|
||||
/* If filename is NULL the default filename is used. */
|
||||
|
||||
@@ -895,7 +895,9 @@ repeat:
|
||||
case IS_OBJECT:
|
||||
if (Z_TYPE(val_free) == IS_UNDEF) {
|
||||
if (Z_OBJ_HT_P(val)->get) {
|
||||
val = Z_OBJ_HT_P(val)->get(val, &val_free);
|
||||
zval rv;
|
||||
val = Z_OBJ_HT_P(val)->get(val, &rv);
|
||||
ZVAL_COPY_VALUE(&val_free, val);
|
||||
goto repeat;
|
||||
} else if (Z_OBJ_HT_P(val)->cast_object) {
|
||||
if (Z_OBJ_HT_P(val)->cast_object(val, &val_free, IS_STRING) == SUCCESS) {
|
||||
@@ -1808,6 +1810,7 @@ ZEND_FUNCTION(get_defined_functions)
|
||||
zend_string *key;
|
||||
zend_function *func;
|
||||
zend_bool exclude_disabled = 0;
|
||||
char *disable_functions = NULL;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &exclude_disabled) == FAILURE) {
|
||||
return;
|
||||
@@ -1817,11 +1820,19 @@ ZEND_FUNCTION(get_defined_functions)
|
||||
array_init(&user);
|
||||
array_init(return_value);
|
||||
|
||||
if (exclude_disabled) {
|
||||
disable_functions = INI_STR("disable_functions");
|
||||
}
|
||||
ZEND_HASH_FOREACH_STR_KEY_PTR(EG(function_table), key, func) {
|
||||
if (key && ZSTR_VAL(key)[0] != 0) {
|
||||
if (func->type == ZEND_INTERNAL_FUNCTION
|
||||
&& (!exclude_disabled || func->internal_function.handler != ZEND_FN(display_disabled_function))) {
|
||||
add_next_index_str(&internal, zend_string_copy(key));
|
||||
if (func->type == ZEND_INTERNAL_FUNCTION) {
|
||||
if (disable_functions != NULL) {
|
||||
if (strstr(disable_functions, func->common.function_name->val) == NULL) {
|
||||
add_next_index_str(&internal, zend_string_copy(key));
|
||||
}
|
||||
} else {
|
||||
add_next_index_str(&internal, zend_string_copy(key));
|
||||
}
|
||||
} else if (func->type == ZEND_USER_FUNCTION) {
|
||||
add_next_index_str(&user, zend_string_copy(key));
|
||||
}
|
||||
|
||||
@@ -531,17 +531,10 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp) /* {{{
|
||||
debug_info = zend_new_array(8);
|
||||
|
||||
if (closure->func.type == ZEND_USER_FUNCTION && closure->func.op_array.static_variables) {
|
||||
zval *var;
|
||||
HashTable *static_variables =
|
||||
ZEND_MAP_PTR_GET(closure->func.op_array.static_variables_ptr);
|
||||
ZVAL_ARR(&val, zend_array_dup(static_variables));
|
||||
zend_hash_update(debug_info, ZSTR_KNOWN(ZEND_STR_STATIC), &val);
|
||||
ZEND_HASH_FOREACH_VAL(Z_ARRVAL(val), var) {
|
||||
if (Z_TYPE_P(var) == IS_CONSTANT_AST) {
|
||||
zval_ptr_dtor(var);
|
||||
ZVAL_STRING(var, "<constant ast>");
|
||||
}
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
}
|
||||
|
||||
if (Z_TYPE(closure->this_ptr) != IS_UNDEF) {
|
||||
|
||||
+16
-46
@@ -1072,21 +1072,11 @@ ZEND_API int do_bind_class(zval *lcname, zend_string *lc_parent_name) /* {{{ */
|
||||
ce = zend_hash_find_ptr(EG(class_table), Z_STR_P(lcname));
|
||||
if (ce) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "Cannot declare %s %s, because the name is already in use", zend_get_object_type(ce), ZSTR_VAL(ce->name));
|
||||
return FAILURE;
|
||||
} else {
|
||||
do {
|
||||
ZEND_ASSERT(EG(current_execute_data)->func->op_array.fn_flags & ZEND_ACC_PRELOADED);
|
||||
if (zend_preload_autoload
|
||||
&& zend_preload_autoload(EG(current_execute_data)->func->op_array.filename) == SUCCESS) {
|
||||
zv = zend_hash_find_ex(EG(class_table), Z_STR_P(rtd_key), 1);
|
||||
if (EXPECTED(zv != NULL)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
zend_error_noreturn(E_ERROR, "Class %s wasn't preloaded", Z_STRVAL_P(lcname));
|
||||
return FAILURE;
|
||||
} while (0);
|
||||
ZEND_ASSERT(EG(current_execute_data)->func->op_array.fn_flags & ZEND_ACC_PRELOADED);
|
||||
zend_error_noreturn(E_ERROR, "Class %s wasn't preloaded", Z_STRVAL_P(lcname));
|
||||
}
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
/* Register the derived class */
|
||||
@@ -3009,11 +2999,7 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */
|
||||
zend_compile_var(&arg_node, arg, BP_VAR_R, 0);
|
||||
if (arg_node.op_type & (IS_CONST|IS_TMP_VAR)) {
|
||||
/* Function call was converted into builtin instruction */
|
||||
if (!fbc || ARG_MUST_BE_SENT_BY_REF(fbc, arg_num)) {
|
||||
opcode = ZEND_SEND_VAL_EX;
|
||||
} else {
|
||||
opcode = ZEND_SEND_VAL;
|
||||
}
|
||||
opcode = ZEND_SEND_VAL;
|
||||
} else {
|
||||
if (fbc) {
|
||||
if (ARG_MUST_BE_SENT_BY_REF(fbc, arg_num)) {
|
||||
@@ -5817,14 +5803,8 @@ void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_boo
|
||||
}
|
||||
} else if (zend_string_equals_literal(lcname, "serialize")) {
|
||||
ce->serialize_func = (zend_function *) op_array;
|
||||
if (!is_static) {
|
||||
op_array->fn_flags |= ZEND_ACC_ALLOW_STATIC;
|
||||
}
|
||||
} else if (zend_string_equals_literal(lcname, "unserialize")) {
|
||||
ce->unserialize_func = (zend_function *) op_array;
|
||||
if (!is_static) {
|
||||
op_array->fn_flags |= ZEND_ACC_ALLOW_STATIC;
|
||||
}
|
||||
} else if (ZSTR_VAL(lcname)[0] != '_' || ZSTR_VAL(lcname)[1] != '_') {
|
||||
if (!is_static) {
|
||||
op_array->fn_flags |= ZEND_ACC_ALLOW_STATIC;
|
||||
@@ -5944,12 +5924,11 @@ static void zend_begin_func_decl(znode *result, zend_op_array *op_array, zend_as
|
||||
return;
|
||||
}
|
||||
|
||||
/* Generate RTD keys until we find one that isn't in use yet. */
|
||||
key = NULL;
|
||||
do {
|
||||
zend_tmp_string_release(key);
|
||||
key = zend_build_runtime_definition_key(lcname, decl->start_lineno);
|
||||
} while (!zend_hash_add_ptr(CG(function_table), key, op_array));
|
||||
key = zend_build_runtime_definition_key(lcname, decl->start_lineno);
|
||||
if (!zend_hash_add_ptr(CG(function_table), key, op_array)) {
|
||||
zend_error_noreturn(E_ERROR,
|
||||
"Runtime definition key collision for function %s. This is a bug", ZSTR_VAL(name));
|
||||
}
|
||||
|
||||
if (op_array->fn_flags & ZEND_ACC_CLOSURE) {
|
||||
opline = zend_emit_op_tmp(result, ZEND_DECLARE_LAMBDA_FUNCTION, NULL, NULL);
|
||||
@@ -6415,15 +6394,8 @@ zend_op *zend_compile_class_decl(zend_ast *ast, zend_bool toplevel) /* {{{ */
|
||||
|
||||
zend_register_seen_symbol(lcname, ZEND_SYMBOL_CLASS);
|
||||
} else {
|
||||
/* Find an anon class name that is not in use yet. */
|
||||
name = NULL;
|
||||
lcname = NULL;
|
||||
do {
|
||||
zend_tmp_string_release(name);
|
||||
zend_tmp_string_release(lcname);
|
||||
name = zend_generate_anon_class_name(decl->start_lineno);
|
||||
lcname = zend_string_tolower(name);
|
||||
} while (zend_hash_exists(CG(class_table), lcname));
|
||||
name = zend_generate_anon_class_name(decl->start_lineno);
|
||||
lcname = zend_string_tolower(name);
|
||||
}
|
||||
lcname = zend_new_interned_string(lcname);
|
||||
|
||||
@@ -6580,20 +6552,18 @@ zend_op *zend_compile_class_decl(zend_ast *ast, zend_bool toplevel) /* {{{ */
|
||||
opline->result_type = IS_VAR;
|
||||
opline->result.var = get_temporary_variable();
|
||||
if (!zend_hash_add_ptr(CG(class_table), lcname, ce)) {
|
||||
/* We checked above that the class name is not used. This really shouldn't happen. */
|
||||
zend_error_noreturn(E_ERROR,
|
||||
"Runtime definition key collision for %s. This is a bug", ZSTR_VAL(name));
|
||||
}
|
||||
} else {
|
||||
/* Generate RTD keys until we find one that isn't in use yet. */
|
||||
zend_string *key = NULL;
|
||||
do {
|
||||
zend_tmp_string_release(key);
|
||||
key = zend_build_runtime_definition_key(lcname, decl->start_lineno);
|
||||
} while (!zend_hash_add_ptr(CG(class_table), key, ce));
|
||||
zend_string *key = zend_build_runtime_definition_key(lcname, decl->start_lineno);
|
||||
|
||||
/* RTD key is placed after lcname literal in op1 */
|
||||
zend_add_literal_string(&key);
|
||||
if (!zend_hash_add_ptr(CG(class_table), key, ce)) {
|
||||
zend_error_noreturn(E_ERROR,
|
||||
"Runtime definition key collision for class %s. This is a bug", ZSTR_VAL(name));
|
||||
}
|
||||
|
||||
opline->opcode = ZEND_DECLARE_CLASS;
|
||||
if (extends_ast && toplevel
|
||||
|
||||
+3
-11
@@ -76,15 +76,9 @@ void zend_exception_set_previous(zend_object *exception, zend_object *add_previo
|
||||
zval pv, zv, rv;
|
||||
zend_class_entry *base_ce;
|
||||
|
||||
if (!exception || !add_previous) {
|
||||
if (exception == add_previous || !add_previous || !exception) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (exception == add_previous) {
|
||||
OBJ_RELEASE(add_previous);
|
||||
return;
|
||||
}
|
||||
|
||||
ZVAL_OBJ(&pv, add_previous);
|
||||
if (!instanceof_function(Z_OBJCE(pv), zend_ce_throwable)) {
|
||||
zend_error_noreturn(E_CORE_ERROR, "Previous exception must implement Throwable");
|
||||
@@ -185,18 +179,16 @@ ZEND_API ZEND_COLD void zend_throw_exception_internal(zval *exception) /* {{{ */
|
||||
|
||||
ZEND_API void zend_clear_exception(void) /* {{{ */
|
||||
{
|
||||
zend_object *exception;
|
||||
if (EG(prev_exception)) {
|
||||
|
||||
OBJ_RELEASE(EG(prev_exception));
|
||||
EG(prev_exception) = NULL;
|
||||
}
|
||||
if (!EG(exception)) {
|
||||
return;
|
||||
}
|
||||
/* exception may have destructor */
|
||||
exception = EG(exception);
|
||||
OBJ_RELEASE(EG(exception));
|
||||
EG(exception) = NULL;
|
||||
OBJ_RELEASE(exception);
|
||||
if (EG(current_execute_data)) {
|
||||
EG(current_execute_data)->opline = EG(opline_before_exception);
|
||||
}
|
||||
|
||||
+66
-119
@@ -1446,21 +1446,9 @@ static zend_never_inline ZEND_COLD void zend_wrong_string_offset(EXECUTE_DATA_D)
|
||||
while (opline < end) {
|
||||
if (opline->op1_type == IS_VAR && opline->op1.var == var) {
|
||||
switch (opline->opcode) {
|
||||
case ZEND_FETCH_OBJ_W:
|
||||
case ZEND_FETCH_OBJ_RW:
|
||||
case ZEND_FETCH_OBJ_FUNC_ARG:
|
||||
case ZEND_FETCH_OBJ_UNSET:
|
||||
case ZEND_ASSIGN_OBJ:
|
||||
case ZEND_ASSIGN_OBJ_OP:
|
||||
case ZEND_ASSIGN_OBJ_REF:
|
||||
msg = "Cannot use string offset as an object";
|
||||
break;
|
||||
case ZEND_FETCH_DIM_W:
|
||||
case ZEND_FETCH_DIM_RW:
|
||||
case ZEND_FETCH_DIM_FUNC_ARG:
|
||||
case ZEND_FETCH_DIM_UNSET:
|
||||
case ZEND_FETCH_LIST_W:
|
||||
case ZEND_ASSIGN_DIM:
|
||||
case ZEND_ASSIGN_DIM_OP:
|
||||
msg = "Cannot use string offset as an array";
|
||||
break;
|
||||
@@ -1478,6 +1466,21 @@ static zend_never_inline ZEND_COLD void zend_wrong_string_offset(EXECUTE_DATA_D)
|
||||
case ZEND_POST_DEC:
|
||||
msg = "Cannot increment/decrement string offsets";
|
||||
break;
|
||||
case ZEND_FETCH_DIM_W:
|
||||
case ZEND_FETCH_DIM_RW:
|
||||
case ZEND_FETCH_DIM_FUNC_ARG:
|
||||
case ZEND_FETCH_DIM_UNSET:
|
||||
case ZEND_FETCH_LIST_W:
|
||||
case ZEND_ASSIGN_DIM:
|
||||
msg = "Cannot use string offset as an array";
|
||||
break;
|
||||
case ZEND_FETCH_OBJ_W:
|
||||
case ZEND_FETCH_OBJ_RW:
|
||||
case ZEND_FETCH_OBJ_FUNC_ARG:
|
||||
case ZEND_FETCH_OBJ_UNSET:
|
||||
case ZEND_ASSIGN_OBJ:
|
||||
msg = "Cannot use string offset as an object";
|
||||
break;
|
||||
case ZEND_ASSIGN_REF:
|
||||
case ZEND_ADD_ARRAY_ELEMENT:
|
||||
case ZEND_INIT_ARRAY:
|
||||
@@ -1958,44 +1961,6 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_undefined_index(const
|
||||
zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(offset));
|
||||
}
|
||||
|
||||
static zend_never_inline ZEND_COLD int ZEND_FASTCALL zend_undefined_offset_write(
|
||||
HashTable *ht, zend_long lval)
|
||||
{
|
||||
/* The array may be destroyed while throwing the notice.
|
||||
* Temporarily increase the refcount to detect this situation. */
|
||||
if (!(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE)) {
|
||||
GC_ADDREF(ht);
|
||||
}
|
||||
zend_undefined_offset(lval);
|
||||
if (!(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE) && !GC_DELREF(ht)) {
|
||||
zend_array_destroy(ht);
|
||||
return FAILURE;
|
||||
}
|
||||
if (EG(exception)) {
|
||||
return FAILURE;
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
static zend_never_inline ZEND_COLD int ZEND_FASTCALL zend_undefined_index_write(
|
||||
HashTable *ht, zend_string *offset)
|
||||
{
|
||||
/* The array may be destroyed while throwing the notice.
|
||||
* Temporarily increase the refcount to detect this situation. */
|
||||
if (!(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE)) {
|
||||
GC_ADDREF(ht);
|
||||
}
|
||||
zend_undefined_index(offset);
|
||||
if (!(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE) && !GC_DELREF(ht)) {
|
||||
zend_array_destroy(ht);
|
||||
return FAILURE;
|
||||
}
|
||||
if (EG(exception)) {
|
||||
return FAILURE;
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_undefined_method(const zend_class_entry *ce, const zend_string *method)
|
||||
{
|
||||
zend_throw_error(NULL, "Call to undefined method %s::%s()", ZSTR_VAL(ce->name), ZSTR_VAL(method));
|
||||
@@ -2051,6 +2016,8 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_use_new_element_for_s
|
||||
|
||||
static ZEND_COLD void zend_binary_assign_op_dim_slow(zval *container, zval *dim OPLINE_DC EXECUTE_DATA_DC)
|
||||
{
|
||||
zend_free_op free_op_data1;
|
||||
|
||||
if (UNEXPECTED(Z_TYPE_P(container) == IS_STRING)) {
|
||||
if (opline->op2_type == IS_UNUSED) {
|
||||
zend_use_new_element_for_string();
|
||||
@@ -2061,27 +2028,16 @@ static ZEND_COLD void zend_binary_assign_op_dim_slow(zval *container, zval *dim
|
||||
} else if (EXPECTED(!Z_ISERROR_P(container))) {
|
||||
zend_use_scalar_as_array();
|
||||
}
|
||||
get_op_data_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, &free_op_data1);
|
||||
FREE_OP(free_op_data1);
|
||||
}
|
||||
|
||||
static zend_never_inline zend_uchar slow_index_convert(HashTable *ht, const zval *dim, zend_value *value EXECUTE_DATA_DC)
|
||||
static zend_never_inline zend_uchar slow_index_convert(const zval *dim, zend_value *value EXECUTE_DATA_DC)
|
||||
{
|
||||
switch (Z_TYPE_P(dim)) {
|
||||
case IS_UNDEF: {
|
||||
/* The array may be destroyed while throwing the notice.
|
||||
* Temporarily increase the refcount to detect this situation. */
|
||||
if (!(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE)) {
|
||||
GC_ADDREF(ht);
|
||||
}
|
||||
case IS_UNDEF:
|
||||
ZVAL_UNDEFINED_OP2();
|
||||
if (!(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE) && !GC_DELREF(ht)) {
|
||||
zend_array_destroy(ht);
|
||||
return IS_NULL;
|
||||
}
|
||||
if (EG(exception)) {
|
||||
return IS_NULL;
|
||||
}
|
||||
/* break missing intentionally */
|
||||
}
|
||||
case IS_NULL:
|
||||
value->str = ZSTR_EMPTY_ALLOC();
|
||||
return IS_STRING;
|
||||
@@ -2126,10 +2082,9 @@ num_undef:
|
||||
retval = &EG(uninitialized_zval);
|
||||
break;
|
||||
case BP_VAR_RW:
|
||||
if (UNEXPECTED(zend_undefined_offset_write(ht, hval) == FAILURE)) {
|
||||
return NULL;
|
||||
}
|
||||
/* break missing intentionally */
|
||||
zend_undefined_offset(hval);
|
||||
retval = zend_hash_index_update(ht, hval, &EG(uninitialized_zval));
|
||||
break;
|
||||
case BP_VAR_W:
|
||||
retval = zend_hash_index_add_new(ht, hval, &EG(uninitialized_zval));
|
||||
break;
|
||||
@@ -2157,9 +2112,7 @@ str_index:
|
||||
retval = &EG(uninitialized_zval);
|
||||
break;
|
||||
case BP_VAR_RW:
|
||||
if (UNEXPECTED(zend_undefined_index_write(ht, offset_key))) {
|
||||
return NULL;
|
||||
}
|
||||
zend_undefined_index(offset_key);
|
||||
/* break missing intentionally */
|
||||
case BP_VAR_W:
|
||||
ZVAL_NULL(retval);
|
||||
@@ -2177,14 +2130,8 @@ str_index:
|
||||
retval = &EG(uninitialized_zval);
|
||||
break;
|
||||
case BP_VAR_RW:
|
||||
/* Key may be released while throwing the undefined index warning. */
|
||||
zend_string_addref(offset_key);
|
||||
if (UNEXPECTED(zend_undefined_index_write(ht, offset_key) == FAILURE)) {
|
||||
zend_string_release(offset_key);
|
||||
return NULL;
|
||||
}
|
||||
retval = zend_hash_add_new(ht, offset_key, &EG(uninitialized_zval));
|
||||
zend_string_release(offset_key);
|
||||
zend_undefined_index(offset_key);
|
||||
retval = zend_hash_update(ht, offset_key, &EG(uninitialized_zval));
|
||||
break;
|
||||
case BP_VAR_W:
|
||||
retval = zend_hash_add_new(ht, offset_key, &EG(uninitialized_zval));
|
||||
@@ -2196,7 +2143,7 @@ str_index:
|
||||
goto try_again;
|
||||
} else {
|
||||
zend_value val;
|
||||
zend_uchar t = slow_index_convert(ht, dim, &val EXECUTE_DATA_CC);
|
||||
zend_uchar t = slow_index_convert(dim, &val EXECUTE_DATA_CC);
|
||||
|
||||
if (t == IS_STRING) {
|
||||
offset_key = val.str;
|
||||
@@ -3221,41 +3168,45 @@ ZEND_API zend_bool ZEND_FASTCALL zend_verify_ref_assignable_zval(zend_reference
|
||||
return 1;
|
||||
}
|
||||
|
||||
static zend_always_inline void i_zval_ptr_dtor_noref(zval *zval_ptr) {
|
||||
if (Z_REFCOUNTED_P(zval_ptr)) {
|
||||
zend_refcounted *ref = Z_COUNTED_P(zval_ptr);
|
||||
ZEND_ASSERT(Z_TYPE_P(zval_ptr) != IS_REFERENCE);
|
||||
if (!GC_DELREF(ref)) {
|
||||
rc_dtor_func(ref);
|
||||
} else if (UNEXPECTED(GC_MAY_LEAK(ref))) {
|
||||
gc_possible_root(ref);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *orig_value, zend_uchar value_type, zend_bool strict, zend_refcounted *ref)
|
||||
ZEND_API zval* zend_assign_to_typed_ref(zval *variable_ptr, zval *value, zend_uchar value_type, zend_bool strict, zend_refcounted *ref)
|
||||
{
|
||||
zend_bool need_copy = ZEND_CONST_COND(value_type & (IS_CONST|IS_CV), 1) ||
|
||||
((value_type & IS_VAR) && UNEXPECTED(ref) && GC_REFCOUNT(ref) > 1);
|
||||
zend_bool ret;
|
||||
zval value;
|
||||
ZVAL_COPY(&value, orig_value);
|
||||
ret = zend_verify_ref_assignable_zval(Z_REF_P(variable_ptr), &value, strict);
|
||||
variable_ptr = Z_REFVAL_P(variable_ptr);
|
||||
if (EXPECTED(ret)) {
|
||||
i_zval_ptr_dtor_noref(variable_ptr);
|
||||
ZVAL_COPY_VALUE(variable_ptr, &value);
|
||||
} else {
|
||||
zval_ptr_dtor_nogc(&value);
|
||||
zval tmp;
|
||||
|
||||
if (need_copy) {
|
||||
ZVAL_COPY(&tmp, value);
|
||||
value = &tmp;
|
||||
}
|
||||
if (value_type & (IS_VAR|IS_TMP_VAR)) {
|
||||
if (UNEXPECTED(ref)) {
|
||||
if (UNEXPECTED(GC_DELREF(ref) == 0)) {
|
||||
zval_ptr_dtor(orig_value);
|
||||
efree_size(ref, sizeof(zend_reference));
|
||||
}
|
||||
} else {
|
||||
i_zval_ptr_dtor_noref(orig_value);
|
||||
ret = zend_verify_ref_assignable_zval(Z_REF_P(variable_ptr), value, strict);
|
||||
if (need_copy) {
|
||||
Z_TRY_DELREF_P(value);
|
||||
}
|
||||
if (!ret) {
|
||||
if (value_type & (IS_VAR|IS_TMP_VAR)) {
|
||||
zval_ptr_dtor(value);
|
||||
}
|
||||
return Z_REFVAL_P(variable_ptr);
|
||||
}
|
||||
|
||||
variable_ptr = Z_REFVAL_P(variable_ptr);
|
||||
if (EXPECTED(Z_REFCOUNTED_P(variable_ptr))) {
|
||||
zend_refcounted *garbage = Z_COUNTED_P(variable_ptr);
|
||||
|
||||
zend_copy_to_variable(variable_ptr, value, value_type, ref);
|
||||
if (GC_DELREF(garbage) == 0) {
|
||||
rc_dtor_func(garbage);
|
||||
} else { /* we need to split */
|
||||
/* optimized version of GC_ZVAL_CHECK_POSSIBLE_ROOT(variable_ptr) */
|
||||
if (UNEXPECTED(GC_MAY_LEAK(garbage))) {
|
||||
gc_possible_root(garbage);
|
||||
}
|
||||
}
|
||||
return variable_ptr;
|
||||
}
|
||||
|
||||
zend_copy_to_variable(variable_ptr, value, value_type, ref);
|
||||
return variable_ptr;
|
||||
}
|
||||
|
||||
@@ -4465,15 +4416,11 @@ static zend_always_inline int _zend_quick_get_constant(
|
||||
is_deprecated = !zend_string_equals(c->name, Z_STR_P(access_key));
|
||||
} else {
|
||||
check_short_name:
|
||||
/* Namespaces are always case-insensitive. Only compare shortname. */
|
||||
ns_sep = zend_memrchr(ZSTR_VAL(c->name), '\\', ZSTR_LEN(c->name));
|
||||
if (ns_sep) {
|
||||
shortname_offset = ns_sep - ZSTR_VAL(c->name) + 1;
|
||||
shortname_len = ZSTR_LEN(c->name) - shortname_offset;
|
||||
} else {
|
||||
shortname_offset = 0;
|
||||
shortname_len = ZSTR_LEN(c->name);
|
||||
}
|
||||
ZEND_ASSERT(ns_sep);
|
||||
/* Namespaces are always case-insensitive. Only compare shortname. */
|
||||
shortname_offset = ns_sep - ZSTR_VAL(c->name) + 1;
|
||||
shortname_len = ZSTR_LEN(c->name) - shortname_offset;
|
||||
|
||||
is_deprecated = memcmp(ZSTR_VAL(c->name) + shortname_offset, Z_STRVAL_P(orig_key - 1) + shortname_offset, shortname_len) != 0;
|
||||
}
|
||||
|
||||
@@ -287,9 +287,8 @@ void shutdown_executor(void) /* {{{ */
|
||||
if (op_array->static_variables) {
|
||||
HashTable *ht = ZEND_MAP_PTR_GET(op_array->static_variables_ptr);
|
||||
if (ht) {
|
||||
if (!(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE) && GC_DELREF(ht) == 0) {
|
||||
zend_array_destroy(ht);
|
||||
}
|
||||
ZEND_ASSERT(GC_REFCOUNT(ht) == 1);
|
||||
zend_array_destroy(ht);
|
||||
ZEND_MAP_PTR_SET(op_array->static_variables_ptr, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
+12
-9
@@ -55,9 +55,10 @@ END_EXTERN_C()
|
||||
Implementation notes:
|
||||
|
||||
x86_64:
|
||||
- Since all x86_64 compilers use SSE by default, we do not define these
|
||||
macros there. We ignore the compiler option -mfpmath=i387, because there is
|
||||
no reason to use it on x86_64.
|
||||
- Since all x86_64 compilers use SSE by default, it is probably unnecessary
|
||||
to use these macros there. We define them anyway since we are too lazy
|
||||
to differentiate the architecture. Also, the compiler option -mfpmath=i387
|
||||
justifies this decision.
|
||||
|
||||
General:
|
||||
- It would be nice if one could detect whether SSE if used for math via some
|
||||
@@ -66,7 +67,9 @@ END_EXTERN_C()
|
||||
|
||||
MS Visual C:
|
||||
- Since MSVC users typically don't use autoconf or CMake, we will detect
|
||||
MSVC via compile time define.
|
||||
MSVC via compile time define. Floating point precision change isn't
|
||||
supported on 64 bit platforms, so it's NOP. See
|
||||
http://msdn.microsoft.com/en-us/library/c9676k6h(v=vs.110).aspx
|
||||
*/
|
||||
|
||||
/* MSVC detection (MSVC people usually don't use autoconf) */
|
||||
@@ -74,7 +77,7 @@ END_EXTERN_C()
|
||||
# define HAVE__CONTROLFP_S
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
#if defined(HAVE__CONTROLFP_S) && !defined(__x86_64__)
|
||||
#ifdef HAVE__CONTROLFP_S
|
||||
|
||||
/* float.h defines _controlfp_s */
|
||||
# include <float.h>
|
||||
@@ -138,7 +141,7 @@ END_EXTERN_C()
|
||||
return _xpfpa_result; \
|
||||
} while (0)
|
||||
|
||||
#elif defined(HAVE__CONTROLFP) && !defined(__x86_64__)
|
||||
#elif defined(HAVE__CONTROLFP)
|
||||
|
||||
/* float.h defines _controlfp */
|
||||
# include <float.h>
|
||||
@@ -197,7 +200,7 @@ END_EXTERN_C()
|
||||
return _xpfpa_result; \
|
||||
} while (0)
|
||||
|
||||
#elif defined(HAVE__FPU_SETCW) && !defined(__x86_64__) /* glibc systems */
|
||||
#elif defined(HAVE__FPU_SETCW) /* glibc systems */
|
||||
|
||||
/* fpu_control.h defines _FPU_[GS]ETCW */
|
||||
# include <fpu_control.h>
|
||||
@@ -256,7 +259,7 @@ END_EXTERN_C()
|
||||
return _xpfpa_result; \
|
||||
} while (0)
|
||||
|
||||
#elif defined(HAVE_FPSETPREC) && !defined(__x86_64__) /* FreeBSD */
|
||||
#elif defined(HAVE_FPSETPREC) /* FreeBSD */
|
||||
|
||||
/* fpu_control.h defines _FPU_[GS]ETCW */
|
||||
# include <machine/ieeefp.h>
|
||||
@@ -312,7 +315,7 @@ END_EXTERN_C()
|
||||
return _xpfpa_result; \
|
||||
} while (0)
|
||||
|
||||
#elif defined(HAVE_FPU_INLINE_ASM_X86) && !defined(__x86_64__)
|
||||
#elif defined(HAVE_FPU_INLINE_ASM_X86)
|
||||
|
||||
/*
|
||||
Custom x86 inline assembler implementation.
|
||||
|
||||
@@ -271,6 +271,10 @@ static void zend_generator_free_storage(zend_object *object) /* {{{ */
|
||||
}
|
||||
|
||||
zend_object_std_dtor(&generator->std);
|
||||
|
||||
if (generator->iterator) {
|
||||
zend_iterator_dtor(generator->iterator);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -605,7 +609,6 @@ void zend_generator_yield_from(zend_generator *generator, zend_generator *from)
|
||||
generator->node.parent = from;
|
||||
zend_generator_get_current(generator);
|
||||
GC_DELREF(&from->std);
|
||||
generator->flags |= ZEND_GENERATOR_DO_INIT;
|
||||
}
|
||||
|
||||
ZEND_API zend_generator *zend_generator_update_current(zend_generator *generator, zend_generator *leaf)
|
||||
@@ -782,13 +785,11 @@ try_again:
|
||||
|
||||
if (UNEXPECTED((orig_generator->flags & ZEND_GENERATOR_DO_INIT) != 0 && !Z_ISUNDEF(generator->value))) {
|
||||
/* We must not advance Generator if we yield from a Generator being currently run */
|
||||
orig_generator->flags &= ~ZEND_GENERATOR_DO_INIT;
|
||||
return;
|
||||
}
|
||||
|
||||
if (UNEXPECTED(!Z_ISUNDEF(generator->values))) {
|
||||
if (EXPECTED(zend_generator_get_next_delegated_value(generator) == SUCCESS)) {
|
||||
orig_generator->flags &= ~ZEND_GENERATOR_DO_INIT;
|
||||
return;
|
||||
}
|
||||
/* If there are no more deletegated values, resume the generator
|
||||
@@ -853,7 +854,6 @@ try_again:
|
||||
} else {
|
||||
generator = zend_generator_get_current(orig_generator);
|
||||
zend_generator_throw_exception(generator, NULL);
|
||||
orig_generator->flags &= ~ZEND_GENERATOR_DO_INIT;
|
||||
goto try_again;
|
||||
}
|
||||
}
|
||||
@@ -864,15 +864,15 @@ try_again:
|
||||
goto try_again;
|
||||
}
|
||||
}
|
||||
|
||||
orig_generator->flags &= ~ZEND_GENERATOR_DO_INIT;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static inline void zend_generator_ensure_initialized(zend_generator *generator) /* {{{ */
|
||||
{
|
||||
if (UNEXPECTED(Z_TYPE(generator->value) == IS_UNDEF) && EXPECTED(generator->execute_data) && EXPECTED(generator->node.parent == NULL)) {
|
||||
generator->flags |= ZEND_GENERATOR_DO_INIT;
|
||||
zend_generator_resume(generator);
|
||||
generator->flags &= ~ZEND_GENERATOR_DO_INIT;
|
||||
generator->flags |= ZEND_GENERATOR_AT_FIRST_YIELD;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -1627,11 +1627,11 @@ ZEND_API void ZEND_FASTCALL zend_array_destroy(HashTable *ht)
|
||||
}
|
||||
} while (++p != end);
|
||||
}
|
||||
zend_hash_iterators_remove(ht);
|
||||
SET_INCONSISTENT(HT_DESTROYED);
|
||||
} else if (EXPECTED(HT_FLAGS(ht) & HASH_FLAG_UNINITIALIZED)) {
|
||||
goto free_ht;
|
||||
}
|
||||
zend_hash_iterators_remove(ht);
|
||||
SET_INCONSISTENT(HT_DESTROYED);
|
||||
efree(HT_GET_DATA_ADDR(ht));
|
||||
free_ht:
|
||||
FREE_HASHTABLE(ht);
|
||||
@@ -2055,7 +2055,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
|
||||
target->nTableMask = HT_MIN_MASK;
|
||||
target->nNumUsed = 0;
|
||||
target->nNumOfElements = 0;
|
||||
target->nNextFreeElement = source->nNextFreeElement;
|
||||
target->nNextFreeElement = 0;
|
||||
target->nInternalPointer = 0;
|
||||
target->nTableSize = HT_MIN_SIZE;
|
||||
HT_SET_DATA_ADDR(target, &uninitialized_bucket);
|
||||
@@ -2805,7 +2805,7 @@ convert:
|
||||
{
|
||||
HashTable *new_ht = zend_new_array(zend_hash_num_elements(ht));
|
||||
|
||||
ZEND_HASH_FOREACH_KEY_VAL_IND(ht, num_key, str_key, zv) {
|
||||
ZEND_HASH_FOREACH_KEY_VAL(ht, num_key, str_key, zv) {
|
||||
do {
|
||||
if (Z_OPT_REFCOUNTED_P(zv)) {
|
||||
if (Z_ISREF_P(zv) && Z_REFCOUNT_P(zv) == 1) {
|
||||
|
||||
@@ -86,14 +86,7 @@ static zend_function *zend_duplicate_user_function(zend_function *func) /* {{{ *
|
||||
if (!(GC_FLAGS(new_function->op_array.static_variables) & IS_ARRAY_IMMUTABLE)) {
|
||||
GC_ADDREF(new_function->op_array.static_variables);
|
||||
}
|
||||
|
||||
if (CG(compiler_options) & ZEND_COMPILE_PRELOAD) {
|
||||
ZEND_ASSERT(new_function->op_array.fn_flags & ZEND_ACC_PRELOADED);
|
||||
ZEND_MAP_PTR_NEW(new_function->op_array.static_variables_ptr);
|
||||
} else {
|
||||
ZEND_MAP_PTR_INIT(new_function->op_array.static_variables_ptr, &new_function->op_array.static_variables);
|
||||
}
|
||||
|
||||
ZEND_MAP_PTR_INIT(new_function->op_array.static_variables_ptr, &new_function->op_array.static_variables);
|
||||
return new_function;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -292,7 +292,6 @@ static void zval_ini_dtor(zval *zv)
|
||||
%define api.pure full
|
||||
%define parse.error verbose
|
||||
|
||||
%token END 0 "end of file"
|
||||
%token TC_SECTION
|
||||
%token TC_RAW
|
||||
%token TC_CONSTANT
|
||||
|
||||
@@ -1118,7 +1118,6 @@ static const char *next_newline(const char *str, const char *end, size_t *newlin
|
||||
for (; str < end; str++) {
|
||||
if (*str == '\r') {
|
||||
*newline_len = str + 1 < end && *(str + 1) == '\n' ? 2 : 1;
|
||||
return str;
|
||||
} else if (*str == '\n') {
|
||||
*newline_len = 1;
|
||||
return str;
|
||||
|
||||
@@ -421,11 +421,7 @@ dynamic:
|
||||
if (flags & ZEND_ACC_CHANGED) {
|
||||
zend_property_info *p = zend_get_parent_private_property(scope, ce, member);
|
||||
|
||||
/* If there is a public/protected instance property on ce, don't try to use a
|
||||
* private static property on scope. If both are static, prefer the static
|
||||
* property on scope. This will throw a static property notice, rather than
|
||||
* a visibility error. */
|
||||
if (p && (!(p->flags & ZEND_ACC_STATIC) || (flags & ZEND_ACC_STATIC))) {
|
||||
if (p) {
|
||||
property_info = p;
|
||||
flags = property_info->flags;
|
||||
goto found;
|
||||
@@ -1800,10 +1796,7 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty
|
||||
case IS_STRING:
|
||||
ce = Z_OBJCE_P(readobj);
|
||||
if (ce->__tostring) {
|
||||
zend_class_entry *fake_scope = EG(fake_scope);
|
||||
EG(fake_scope) = NULL;
|
||||
zend_call_method_with_0_params(readobj, ce, &ce->__tostring, "__tostring", &retval);
|
||||
EG(fake_scope) = fake_scope;
|
||||
if (EXPECTED(Z_TYPE(retval) == IS_STRING)) {
|
||||
ZVAL_COPY_VALUE(writeobj, &retval);
|
||||
return SUCCESS;
|
||||
|
||||
@@ -328,6 +328,7 @@ void zend_signal_activate(void)
|
||||
|
||||
SIGG(active) = 1;
|
||||
SIGG(depth) = 0;
|
||||
SIGG(check) = ZEND_DEBUG;
|
||||
} /* }}} */
|
||||
|
||||
/* {{{ zend_signal_deactivate
|
||||
|
||||
@@ -238,8 +238,6 @@ ZEND_API int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *
|
||||
return 0;
|
||||
}
|
||||
switch (fh1->type) {
|
||||
case ZEND_HANDLE_FILENAME:
|
||||
return strcmp(fh1->filename, fh2->filename) == 0;
|
||||
case ZEND_HANDLE_FP:
|
||||
return fh1->handle.fp == fh2->handle.fp;
|
||||
case ZEND_HANDLE_STREAM:
|
||||
|
||||
+3
-30
@@ -55,14 +55,6 @@
|
||||
#define IO_REPARSE_TAG_ONEDRIVE (0x80000021L)
|
||||
#endif
|
||||
|
||||
# ifndef IO_REPARSE_TAG_ACTIVISION_HSM
|
||||
# define IO_REPARSE_TAG_ACTIVISION_HSM (0x00000047L)
|
||||
# endif
|
||||
|
||||
# ifndef IO_REPARSE_TAG_PROJFS
|
||||
# define IO_REPARSE_TAG_PROJFS (0x9000001CL)
|
||||
# endif
|
||||
|
||||
# ifndef VOLUME_NAME_NT
|
||||
# define VOLUME_NAME_NT 0x2
|
||||
# endif
|
||||
@@ -596,7 +588,6 @@ static size_t tsrm_realpath_r(char *path, size_t start, size_t len, int *ll, tim
|
||||
}
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
retry_reparse_point:
|
||||
if (save) {
|
||||
pathw = php_win32_ioutil_any_to_w(path);
|
||||
if (!pathw) {
|
||||
@@ -619,7 +610,7 @@ retry_reparse_point:
|
||||
tmp = do_alloca(len+1, use_heap);
|
||||
memcpy(tmp, path, len+1);
|
||||
|
||||
retry_reparse_tag_cloud:
|
||||
retry:
|
||||
if(save &&
|
||||
!(IS_UNC_PATH(path, len) && len >= 3 && path[2] != '?') &&
|
||||
(dataw.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
|
||||
@@ -680,7 +671,7 @@ retry_reparse_tag_cloud:
|
||||
dataw.dwFileAttributes = fileInformation.dwFileAttributes;
|
||||
CloseHandle(hLink);
|
||||
(*ll)--;
|
||||
goto retry_reparse_tag_cloud;
|
||||
goto retry;
|
||||
}
|
||||
free_alloca(tmp, use_heap);
|
||||
CloseHandle(hLink);
|
||||
@@ -762,9 +753,7 @@ retry_reparse_tag_cloud:
|
||||
else if (pbuffer->ReparseTag == IO_REPARSE_TAG_DEDUP ||
|
||||
/* Starting with 1709. */
|
||||
(pbuffer->ReparseTag & ~IO_REPARSE_TAG_CLOUD_MASK) == IO_REPARSE_TAG_CLOUD ||
|
||||
IO_REPARSE_TAG_ONEDRIVE == pbuffer->ReparseTag ||
|
||||
IO_REPARSE_TAG_ACTIVISION_HSM == pbuffer->ReparseTag ||
|
||||
IO_REPARSE_TAG_PROJFS == pbuffer->ReparseTag) {
|
||||
IO_REPARSE_TAG_ONEDRIVE == pbuffer->ReparseTag) {
|
||||
isabsolute = 1;
|
||||
substitutename = malloc((len + 1) * sizeof(char));
|
||||
if (!substitutename) {
|
||||
@@ -827,22 +816,6 @@ retry_reparse_tag_cloud:
|
||||
free_alloca(pbuffer, use_heap_large);
|
||||
free(substitutename);
|
||||
|
||||
{
|
||||
DWORD attrs;
|
||||
|
||||
FREE_PATHW()
|
||||
pathw = php_win32_ioutil_any_to_w(path);
|
||||
if (!pathw) {
|
||||
return (size_t)-1;
|
||||
}
|
||||
attrs = GetFileAttributesW(pathw);
|
||||
if (!isVolume && attrs != INVALID_FILE_ATTRIBUTES && (attrs & FILE_ATTRIBUTE_REPARSE_POINT)) {
|
||||
free_alloca(tmp, use_heap);
|
||||
FREE_PATHW()
|
||||
goto retry_reparse_point;
|
||||
}
|
||||
}
|
||||
|
||||
if(isabsolute == 1) {
|
||||
if (!((j == 3) && (path[1] == ':') && (path[2] == '\\'))) {
|
||||
/* use_realpath is 0 in the call below coz path is absolute*/
|
||||
|
||||
+17
-23
@@ -1272,7 +1272,6 @@ ZEND_VM_C_LABEL(assign_dim_op_new_array):
|
||||
} else {
|
||||
zend_binary_assign_op_dim_slow(container, dim OPLINE_CC EXECUTE_DATA_CC);
|
||||
ZEND_VM_C_LABEL(assign_dim_op_ret_null):
|
||||
FREE_UNFETCHED_OP_DATA();
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
||||
}
|
||||
@@ -2620,14 +2619,15 @@ ZEND_VM_HANDLER(23, ZEND_ASSIGN_DIM, VAR|CV, CONST|TMPVAR|UNUSED|NEXT|CV, SPEC(O
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
ZEND_VM_C_LABEL(try_assign_dim_array):
|
||||
value = GET_OP_DATA_ZVAL_PTR(BP_VAR_R);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (OP2_TYPE == IS_UNUSED) {
|
||||
value = GET_OP_DATA_ZVAL_PTR(BP_VAR_R);
|
||||
if (OP_DATA_TYPE == IS_CV || OP_DATA_TYPE == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
FREE_OP_DATA();
|
||||
zend_cannot_add_element();
|
||||
ZEND_VM_C_GOTO(assign_dim_error);
|
||||
} else if (OP_DATA_TYPE == IS_CV) {
|
||||
@@ -2656,6 +2656,7 @@ ZEND_VM_C_LABEL(try_assign_dim_array):
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
ZEND_VM_C_GOTO(assign_dim_error);
|
||||
}
|
||||
value = GET_OP_DATA_ZVAL_PTR(BP_VAR_R);
|
||||
value = zend_assign_to_variable(variable_ptr, value, OP_DATA_TYPE, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -4631,15 +4632,17 @@ ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, JMP_ADDR, LAST_CATCH|CACHE_SLOT)
|
||||
|
||||
exception = EG(exception);
|
||||
ex = EX_VAR(opline->result.var);
|
||||
{
|
||||
/* Always perform a strict assignment. There is a reasonable expectation that if you
|
||||
* write "catch (Exception $e)" then $e will actually be instanceof Exception. As such,
|
||||
* we should not permit coercion to string here. */
|
||||
zval tmp;
|
||||
ZVAL_OBJ(&tmp, exception);
|
||||
if (UNEXPECTED(Z_ISREF_P(ex))) {
|
||||
ex = Z_REFVAL_P(ex);
|
||||
}
|
||||
zval_ptr_dtor(ex);
|
||||
ZVAL_OBJ(ex, EG(exception));
|
||||
if (UNEXPECTED(EG(exception) != exception)) {
|
||||
GC_ADDREF(EG(exception));
|
||||
HANDLE_EXCEPTION();
|
||||
} else {
|
||||
EG(exception) = NULL;
|
||||
zend_assign_to_variable(ex, &tmp, IS_TMP_VAR, /* strict */ 1);
|
||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7314,17 +7317,8 @@ ZEND_VM_HANDLER(146, ZEND_DECLARE_ANON_CLASS, ANY, ANY, CACHE_SLOT)
|
||||
zv = zend_hash_find_ex(EG(class_table), rtd_key, 1);
|
||||
if (UNEXPECTED(zv == NULL)) {
|
||||
SAVE_OPLINE();
|
||||
do {
|
||||
ZEND_ASSERT(EX(func)->op_array.fn_flags & ZEND_ACC_PRELOADED);
|
||||
if (zend_preload_autoload
|
||||
&& zend_preload_autoload(EX(func)->op_array.filename) == SUCCESS) {
|
||||
zv = zend_hash_find_ex(EG(class_table), rtd_key, 1);
|
||||
if (EXPECTED(zv != NULL)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
zend_error_noreturn(E_ERROR, "Anonymous class wasn't preloaded");
|
||||
} while (0);
|
||||
ZEND_ASSERT(EX(func)->op_array.fn_flags & ZEND_ACC_PRELOADED);
|
||||
zend_error_noreturn(E_ERROR, "Anonymous class wasn't preloaded");
|
||||
}
|
||||
ZEND_ASSERT(zv != NULL);
|
||||
ce = Z_CE_P(zv);
|
||||
@@ -8307,10 +8301,10 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY)
|
||||
}
|
||||
|
||||
if (ret == NULL) {
|
||||
ZVAL_NULL(&retval);
|
||||
ret = &retval;
|
||||
}
|
||||
|
||||
ZVAL_NULL(ret);
|
||||
if (!zend_execute_internal) {
|
||||
/* saves one function call if zend_execute_internal is not used */
|
||||
fbc->internal_function.handler(call, ret);
|
||||
@@ -9384,10 +9378,10 @@ ZEND_VM_DEFINE_OP(137, ZEND_OP_DATA);
|
||||
ZEND_VM_HELPER(zend_interrupt_helper, ANY, ANY)
|
||||
{
|
||||
EG(vm_interrupt) = 0;
|
||||
SAVE_OPLINE();
|
||||
if (EG(timed_out)) {
|
||||
zend_timeout(0);
|
||||
} else if (zend_interrupt_function) {
|
||||
SAVE_OPLINE();
|
||||
zend_interrupt_function(execute_data);
|
||||
ZEND_VM_ENTER();
|
||||
}
|
||||
|
||||
+110
-62
@@ -2449,17 +2449,8 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_ANON_CLASS_SPEC_HANDLE
|
||||
zv = zend_hash_find_ex(EG(class_table), rtd_key, 1);
|
||||
if (UNEXPECTED(zv == NULL)) {
|
||||
SAVE_OPLINE();
|
||||
do {
|
||||
ZEND_ASSERT(EX(func)->op_array.fn_flags & ZEND_ACC_PRELOADED);
|
||||
if (zend_preload_autoload
|
||||
&& zend_preload_autoload(EX(func)->op_array.filename) == SUCCESS) {
|
||||
zv = zend_hash_find_ex(EG(class_table), rtd_key, 1);
|
||||
if (EXPECTED(zv != NULL)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
zend_error_noreturn(E_ERROR, "Anonymous class wasn't preloaded");
|
||||
} while (0);
|
||||
ZEND_ASSERT(EX(func)->op_array.fn_flags & ZEND_ACC_PRELOADED);
|
||||
zend_error_noreturn(E_ERROR, "Anonymous class wasn't preloaded");
|
||||
}
|
||||
ZEND_ASSERT(zv != NULL);
|
||||
ce = Z_CE_P(zv);
|
||||
@@ -2815,10 +2806,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z
|
||||
}
|
||||
|
||||
if (ret == NULL) {
|
||||
ZVAL_NULL(&retval);
|
||||
ret = &retval;
|
||||
}
|
||||
|
||||
ZVAL_NULL(ret);
|
||||
if (!zend_execute_internal) {
|
||||
/* saves one function call if zend_execute_internal is not used */
|
||||
fbc->internal_function.handler(call, ret);
|
||||
@@ -2877,10 +2868,10 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_JMP_FORWARD_SPEC_H
|
||||
static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_interrupt_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
|
||||
{
|
||||
EG(vm_interrupt) = 0;
|
||||
SAVE_OPLINE();
|
||||
if (EG(timed_out)) {
|
||||
zend_timeout(0);
|
||||
} else if (zend_interrupt_function) {
|
||||
SAVE_OPLINE();
|
||||
zend_interrupt_function(execute_data);
|
||||
ZEND_VM_ENTER();
|
||||
}
|
||||
@@ -3753,15 +3744,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CATCH_SPEC_CONST_HANDLER(ZEND_
|
||||
|
||||
exception = EG(exception);
|
||||
ex = EX_VAR(opline->result.var);
|
||||
{
|
||||
/* Always perform a strict assignment. There is a reasonable expectation that if you
|
||||
* write "catch (Exception $e)" then $e will actually be instanceof Exception. As such,
|
||||
* we should not permit coercion to string here. */
|
||||
zval tmp;
|
||||
ZVAL_OBJ(&tmp, exception);
|
||||
if (UNEXPECTED(Z_ISREF_P(ex))) {
|
||||
ex = Z_REFVAL_P(ex);
|
||||
}
|
||||
zval_ptr_dtor(ex);
|
||||
ZVAL_OBJ(ex, EG(exception));
|
||||
if (UNEXPECTED(EG(exception) != exception)) {
|
||||
GC_ADDREF(EG(exception));
|
||||
HANDLE_EXCEPTION();
|
||||
} else {
|
||||
EG(exception) = NULL;
|
||||
zend_assign_to_variable(ex, &tmp, IS_TMP_VAR, /* strict */ 1);
|
||||
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22205,7 +22198,6 @@ assign_dim_op_new_array:
|
||||
} else {
|
||||
zend_binary_assign_op_dim_slow(container, dim OPLINE_CC EXECUTE_DATA_CC);
|
||||
assign_dim_op_ret_null:
|
||||
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
||||
}
|
||||
@@ -23108,14 +23100,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CONST == IS_UNUSED) {
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CONST == IS_CV) {
|
||||
@@ -23144,6 +23137,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -23222,14 +23216,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CONST == IS_UNUSED) {
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_TMP_VAR == IS_CV) {
|
||||
@@ -23258,6 +23253,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -23337,14 +23333,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CONST == IS_UNUSED) {
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_VAR == IS_CV) {
|
||||
@@ -23373,6 +23370,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -23452,14 +23450,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CONST == IS_UNUSED) {
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
if (IS_CV == IS_CV || IS_CV == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CV == IS_CV) {
|
||||
@@ -23488,6 +23487,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -24495,7 +24495,6 @@ assign_dim_op_new_array:
|
||||
} else {
|
||||
zend_binary_assign_op_dim_slow(container, dim OPLINE_CC EXECUTE_DATA_CC);
|
||||
assign_dim_op_ret_null:
|
||||
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
||||
}
|
||||
@@ -25403,14 +25402,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CONST == IS_CV) {
|
||||
@@ -25439,6 +25439,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -25517,14 +25518,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_TMP_VAR == IS_CV) {
|
||||
@@ -25553,6 +25555,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -25632,14 +25635,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_VAR == IS_CV) {
|
||||
@@ -25668,6 +25672,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -25747,14 +25752,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
if (IS_CV == IS_CV || IS_CV == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CV == IS_CV) {
|
||||
@@ -25783,6 +25789,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -26900,7 +26907,6 @@ assign_dim_op_new_array:
|
||||
} else {
|
||||
zend_binary_assign_op_dim_slow(container, dim OPLINE_CC EXECUTE_DATA_CC);
|
||||
assign_dim_op_ret_null:
|
||||
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
||||
}
|
||||
@@ -26979,14 +26985,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_UNUSED == IS_UNUSED) {
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CONST == IS_CV) {
|
||||
@@ -27015,6 +27022,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -27093,14 +27101,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_UNUSED == IS_UNUSED) {
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_TMP_VAR == IS_CV) {
|
||||
@@ -27129,6 +27138,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -27208,14 +27218,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_UNUSED == IS_UNUSED) {
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_VAR == IS_CV) {
|
||||
@@ -27244,6 +27255,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -27323,14 +27335,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_UNUSED == IS_UNUSED) {
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
if (IS_CV == IS_CV || IS_CV == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CV == IS_CV) {
|
||||
@@ -27359,6 +27372,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -28175,7 +28189,6 @@ assign_dim_op_new_array:
|
||||
} else {
|
||||
zend_binary_assign_op_dim_slow(container, dim OPLINE_CC EXECUTE_DATA_CC);
|
||||
assign_dim_op_ret_null:
|
||||
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
||||
}
|
||||
@@ -29078,14 +29091,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CV == IS_UNUSED) {
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CONST == IS_CV) {
|
||||
@@ -29114,6 +29128,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -29192,14 +29207,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CV == IS_UNUSED) {
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_TMP_VAR == IS_CV) {
|
||||
@@ -29228,6 +29244,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -29307,14 +29324,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CV == IS_UNUSED) {
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_VAR == IS_CV) {
|
||||
@@ -29343,6 +29361,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -29422,14 +29441,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CV == IS_UNUSED) {
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
if (IS_CV == IS_CV || IS_CV == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CV == IS_CV) {
|
||||
@@ -29458,6 +29478,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -39124,7 +39145,6 @@ assign_dim_op_new_array:
|
||||
} else {
|
||||
zend_binary_assign_op_dim_slow(container, dim OPLINE_CC EXECUTE_DATA_CC);
|
||||
assign_dim_op_ret_null:
|
||||
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
||||
}
|
||||
@@ -40280,14 +40300,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CONST == IS_UNUSED) {
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CONST == IS_CV) {
|
||||
@@ -40316,6 +40337,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -40394,14 +40416,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CONST == IS_UNUSED) {
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_TMP_VAR == IS_CV) {
|
||||
@@ -40430,6 +40453,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -40509,14 +40533,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CONST == IS_UNUSED) {
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_VAR == IS_CV) {
|
||||
@@ -40545,6 +40570,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -40624,14 +40650,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CONST == IS_UNUSED) {
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
if (IS_CV == IS_CV || IS_CV == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CV == IS_CV) {
|
||||
@@ -40660,6 +40687,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -42624,7 +42652,6 @@ assign_dim_op_new_array:
|
||||
} else {
|
||||
zend_binary_assign_op_dim_slow(container, dim OPLINE_CC EXECUTE_DATA_CC);
|
||||
assign_dim_op_ret_null:
|
||||
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
||||
}
|
||||
@@ -43779,14 +43806,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CONST == IS_CV) {
|
||||
@@ -43815,6 +43843,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -43893,14 +43922,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_TMP_VAR == IS_CV) {
|
||||
@@ -43929,6 +43959,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -44008,14 +44039,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_VAR == IS_CV) {
|
||||
@@ -44044,6 +44076,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -44123,14 +44156,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_UNUSED) {
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
if (IS_CV == IS_CV || IS_CV == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CV == IS_CV) {
|
||||
@@ -44159,6 +44193,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -45605,7 +45640,6 @@ assign_dim_op_new_array:
|
||||
} else {
|
||||
zend_binary_assign_op_dim_slow(container, dim OPLINE_CC EXECUTE_DATA_CC);
|
||||
assign_dim_op_ret_null:
|
||||
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
||||
}
|
||||
@@ -45809,14 +45843,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_UNUSED == IS_UNUSED) {
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CONST == IS_CV) {
|
||||
@@ -45845,6 +45880,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -45923,14 +45959,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_UNUSED == IS_UNUSED) {
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_TMP_VAR == IS_CV) {
|
||||
@@ -45959,6 +45996,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -46038,14 +46076,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_UNUSED == IS_UNUSED) {
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_VAR == IS_CV) {
|
||||
@@ -46074,6 +46113,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -46153,14 +46193,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_UNUSED == IS_UNUSED) {
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
if (IS_CV == IS_CV || IS_CV == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CV == IS_CV) {
|
||||
@@ -46189,6 +46230,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -47708,7 +47750,6 @@ assign_dim_op_new_array:
|
||||
} else {
|
||||
zend_binary_assign_op_dim_slow(container, dim OPLINE_CC EXECUTE_DATA_CC);
|
||||
assign_dim_op_ret_null:
|
||||
FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var);
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
||||
}
|
||||
@@ -48859,14 +48900,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CV == IS_UNUSED) {
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CONST == IS_CV) {
|
||||
@@ -48895,6 +48937,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = RT_CONSTANT((opline+1), (opline+1)->op1);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CONST, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -48973,14 +49016,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CV == IS_UNUSED) {
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_TMP_VAR == IS_CV) {
|
||||
@@ -49009,6 +49053,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_tmp((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -49088,14 +49133,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CV == IS_UNUSED) {
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
zval_ptr_dtor_nogc(free_op_data);
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_VAR == IS_CV) {
|
||||
@@ -49124,6 +49170,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_var((opline+1)->op1.var, &free_op_data EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_VAR, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -49203,14 +49250,15 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_
|
||||
|
||||
if (EXPECTED(Z_TYPE_P(object_ptr) == IS_ARRAY)) {
|
||||
try_assign_dim_array:
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
SEPARATE_ARRAY(object_ptr);
|
||||
if (IS_CV == IS_UNUSED) {
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
if (IS_CV == IS_CV || IS_CV == IS_VAR) {
|
||||
ZVAL_DEREF(value);
|
||||
}
|
||||
variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value);
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
|
||||
zend_cannot_add_element();
|
||||
goto assign_dim_error;
|
||||
} else if (IS_CV == IS_CV) {
|
||||
@@ -49239,6 +49287,7 @@ try_assign_dim_array:
|
||||
if (UNEXPECTED(variable_ptr == NULL)) {
|
||||
goto assign_dim_error;
|
||||
}
|
||||
value = _get_zval_ptr_cv_BP_VAR_R((opline+1)->op1.var EXECUTE_DATA_CC);
|
||||
value = zend_assign_to_variable(variable_ptr, value, IS_CV, EX_USES_STRICT_TYPES());
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
@@ -61292,7 +61341,6 @@ void zend_vm_dtor(void)
|
||||
if (zend_handlers_table) {
|
||||
zend_hash_destroy(zend_handlers_table);
|
||||
free(zend_handlers_table);
|
||||
zend_handlers_table = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,6 @@ void zend_vm_dtor(void)
|
||||
if (zend_handlers_table) {
|
||||
zend_hash_destroy(zend_handlers_table);
|
||||
free(zend_handlers_table);
|
||||
zend_handlers_table = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,10 +91,6 @@ if not exist "%PHP_BUILD_CACHE_ENCHANT_DICT_DIR%\en_US.aff" (
|
||||
mkdir %USERPROFILE%\enchant\myspell
|
||||
copy %PHP_BUILD_CACHE_ENCHANT_DICT_DIR%\* %USERPROFILE%\enchant\myspell
|
||||
|
||||
set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_OBJ_DIR%\Release
|
||||
if "%THREAD_SAFE%" equ "1" set TEST_PHPDBG_EXECUTABLE=%TEST_PHPDBG_EXECUTABLE%_TS
|
||||
set TEST_PHPDBG_EXECUTABLE=%TEST_PHPDBG_EXECUTABLE%\phpdbg.exe
|
||||
|
||||
mkdir c:\tests_tmp
|
||||
|
||||
set TEST_PHP_JUNIT=c:\junit.out.xml
|
||||
|
||||
+2
-3
@@ -12,11 +12,10 @@ trigger:
|
||||
- UPGRADING.INTERNALS
|
||||
|
||||
jobs:
|
||||
# We specify --with-mm here, because it cannot be used together with --enable-maintainer-zts.
|
||||
- template: azure/job.yml
|
||||
parameters:
|
||||
configurationName: DEBUG_NTS
|
||||
configurationParameters: '--enable-debug --disable-maintainer-zts --with-mm'
|
||||
configurationParameters: '--enable-debug --disable-maintainer-zts'
|
||||
- template: azure/job.yml
|
||||
parameters:
|
||||
configurationName: RELEASE_ZTS
|
||||
@@ -37,7 +36,7 @@ jobs:
|
||||
- template: azure/job.yml
|
||||
parameters:
|
||||
configurationName: RELEASE_NTS
|
||||
configurationParameters: '--disable-debug --disable-maintainer-zts --with-mm'
|
||||
configurationParameters: '--disable-debug --disable-maintainer-zts'
|
||||
- template: azure/i386/job.yml
|
||||
parameters:
|
||||
configurationName: I386_DEBUG_NTS
|
||||
|
||||
+1
-4
@@ -7,9 +7,6 @@ steps:
|
||||
sudo apt install bison \
|
||||
re2c \
|
||||
locales \
|
||||
ldap-utils \
|
||||
openssl \
|
||||
slapd \
|
||||
language-pack-de \
|
||||
re2c \
|
||||
libgmp-dev \
|
||||
@@ -32,9 +29,9 @@ steps:
|
||||
libpq-dev \
|
||||
libreadline-dev \
|
||||
libldap2-dev \
|
||||
libsasl2-dev \
|
||||
libsodium-dev \
|
||||
libargon2-0-dev \
|
||||
libmm-dev \
|
||||
postgresql \
|
||||
postgresql-contrib \
|
||||
llvm \
|
||||
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
- script: |
|
||||
git clone https://github.com/amphp/amp.git --branch=master --depth=1
|
||||
cd amp
|
||||
php /usr/bin/composer install --no-progress --ignore-platform-reqs
|
||||
php7.3 /usr/bin/composer install --no-progress --ignore-platform-reqs
|
||||
export USE_ZEND_ALLOC=0
|
||||
sed -i 's/$exit = true/$exit = false/g' vendor/phpunit/phpunit/src/TextUI/Command.php
|
||||
php vendor/bin/phpunit
|
||||
|
||||
@@ -20,7 +20,11 @@ jobs:
|
||||
- script: make -j$(/usr/bin/nproc) >/dev/null
|
||||
displayName: 'Make Build'
|
||||
- template: install.yml
|
||||
- template: setup.yml
|
||||
- script: |
|
||||
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
|
||||
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
|
||||
sudo -u postgres psql -c "CREATE DATABASE test;"
|
||||
displayName: 'Setup'
|
||||
- template: test.yml
|
||||
parameters:
|
||||
configurationName: ${{ parameters.configurationName }}
|
||||
|
||||
+3
-2
@@ -7,8 +7,7 @@ steps:
|
||||
sudo apt-get update -y | true
|
||||
sudo apt-get install -y gcc-multilib
|
||||
sudo apt-get install -y g++-multilib
|
||||
sudo apt-get purge -y libxml2 libsqlite3-0
|
||||
# TODO: Reenable postgresql + postgresql-contrib packages once they work again.
|
||||
sudo apt-get install -y valgrind:i386
|
||||
sudo apt-get install -y bison \
|
||||
re2c \
|
||||
locales \
|
||||
@@ -42,5 +41,7 @@ steps:
|
||||
libffi-dev:i386 \
|
||||
libfreetype6-dev:i386 \
|
||||
libsodium-dev:i386 \
|
||||
postgresql \
|
||||
postgresql-contrib \
|
||||
${{ parameters.packages }}
|
||||
displayName: 'APT'
|
||||
+2
-5
@@ -70,7 +70,6 @@ jobs:
|
||||
- script: make -j$(/usr/bin/nproc) >/dev/null
|
||||
displayName: 'Make Build'
|
||||
- script: |
|
||||
set -e
|
||||
sudo make install
|
||||
sudo mkdir /etc/php.d
|
||||
sudo chmod 777 /etc/php.d
|
||||
@@ -80,11 +79,9 @@ jobs:
|
||||
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
|
||||
displayName: 'Install Build'
|
||||
- script: |
|
||||
set -e
|
||||
sudo service mysql start
|
||||
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
|
||||
#sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
|
||||
#sudo -u postgres psql -c "CREATE DATABASE test;"
|
||||
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
|
||||
sudo -u postgres psql -c "CREATE DATABASE test;"
|
||||
displayName: 'Setup'
|
||||
- template: test.yml
|
||||
parameters:
|
||||
|
||||
@@ -17,7 +17,6 @@ steps:
|
||||
-j$(/usr/bin/nproc) \
|
||||
-g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \
|
||||
--offline \
|
||||
--show-diff \
|
||||
--show-slow 1000 \
|
||||
--set-timeout 120 \
|
||||
${{ parameters.runTestsParameters }}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
steps:
|
||||
- script: |
|
||||
set -e
|
||||
sudo make install
|
||||
sudo mkdir /etc/php.d
|
||||
sudo chmod 777 /etc/php.d
|
||||
|
||||
+5
-1
@@ -17,7 +17,11 @@ jobs:
|
||||
- script: make -j$(/usr/bin/nproc) >/dev/null
|
||||
displayName: 'Make Build'
|
||||
- template: install.yml
|
||||
- template: setup.yml
|
||||
- script: |
|
||||
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
|
||||
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
|
||||
sudo -u postgres psql -c "CREATE DATABASE test;"
|
||||
displayName: 'Setup'
|
||||
- template: test.yml
|
||||
parameters:
|
||||
configurationName: ${{ parameters.configurationName }}
|
||||
|
||||
+3
-13
@@ -2,12 +2,11 @@ parameters:
|
||||
packages: ''
|
||||
|
||||
steps:
|
||||
- script: brew update
|
||||
displayName: 'Update Homebrew'
|
||||
- script: |
|
||||
brew install pkg-config \
|
||||
autoconf \
|
||||
bison
|
||||
bison \
|
||||
re2c
|
||||
displayName: 'Install Build Tools'
|
||||
- script: |
|
||||
brew install openssl@1.1 \
|
||||
@@ -24,20 +23,11 @@ steps:
|
||||
zlib \
|
||||
t1lib \
|
||||
gd \
|
||||
libzip \
|
||||
gmp \
|
||||
tidyp \
|
||||
libxml2 \
|
||||
libxslt \
|
||||
postgresql
|
||||
# Make sure we don't get broken libzip 1.7.0
|
||||
brew upgrade libzip
|
||||
brew link icu4c gettext --force
|
||||
displayName: 'Install Build Dependencies'
|
||||
- script: |
|
||||
wget https://github.com/skvadrik/re2c/releases/download/2.0.1/re2c-2.0.1.tar.xz
|
||||
tar -xf re2c-2.0.1.tar.xz
|
||||
cd re2c-2.0.1
|
||||
./configure
|
||||
make -j$(sysctl -n hw.ncpu)
|
||||
make install
|
||||
displayName: 'Build re2c'
|
||||
@@ -13,7 +13,6 @@ steps:
|
||||
-j$(sysctl -n hw.ncpu) \
|
||||
-g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \
|
||||
--offline \
|
||||
--show-diff \
|
||||
--show-slow 1000 \
|
||||
--set-timeout 120 \
|
||||
${{ parameters.runTestsParameters }}
|
||||
|
||||
@@ -35,7 +35,6 @@ jobs:
|
||||
--enable-fpm \
|
||||
--with-pdo-mysql=mysqlnd \
|
||||
--with-mysqli=mysqlnd \
|
||||
--disable-mysqlnd-compression-support \
|
||||
--without-pear \
|
||||
--enable-exif \
|
||||
--enable-sysvsem \
|
||||
@@ -63,7 +62,6 @@ jobs:
|
||||
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
|
||||
displayName: 'Install Build'
|
||||
- script: |
|
||||
sudo service mysql start
|
||||
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
|
||||
displayName: 'Setup'
|
||||
- template: test.yml
|
||||
|
||||
@@ -1,169 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -ev
|
||||
|
||||
# Create TLS certificate
|
||||
sudo mkdir -p /etc/ldap/ssl
|
||||
|
||||
alt_names() {
|
||||
(
|
||||
(
|
||||
(hostname && hostname -a && hostname -A && hostname -f) |
|
||||
xargs -n 1 |
|
||||
sort -u |
|
||||
sed -e 's/\(\S\+\)/DNS:\1/g'
|
||||
) && (
|
||||
(hostname -i && hostname -I && echo "127.0.0.1 ::1") |
|
||||
xargs -n 1 |
|
||||
sort -u |
|
||||
sed -e 's/\(\S\+\)/IP:\1/g'
|
||||
)
|
||||
) | paste -d, -s
|
||||
}
|
||||
|
||||
sudo openssl req -newkey rsa:4096 -x509 -nodes -days 3650 \
|
||||
-out /etc/ldap/ssl/server.crt -keyout /etc/ldap/ssl/server.key \
|
||||
-subj "/C=US/ST=Arizona/L=Localhost/O=localhost/CN=localhost" \
|
||||
-addext "subjectAltName = `alt_names`"
|
||||
|
||||
sudo chown -R openldap:openldap /etc/ldap/ssl
|
||||
|
||||
# Display the TLS certificate (should be world readable)
|
||||
openssl x509 -noout -text -in /etc/ldap/ssl/server.crt
|
||||
|
||||
# Point to the certificate generated
|
||||
if ! grep -q 'TLS_CACERT \/etc\/ldap\/ssl\/server.crt' /etc/ldap/ldap.conf; then
|
||||
sudo sed -e 's|^\s*TLS_CACERT|# TLS_CACERT|' -i /etc/ldap/ldap.conf
|
||||
echo 'TLS_CACERT /etc/ldap/ssl/server.crt' | sudo tee -a /etc/ldap/ldap.conf
|
||||
fi
|
||||
|
||||
# Configure LDAP protocols to serve.
|
||||
sudo sed -e 's|^\s*SLAPD_SERVICES\s*=.*$|SLAPD_SERVICES="ldap:/// ldaps:/// ldapi:///"|' -i /etc/default/slapd
|
||||
|
||||
# Configure LDAP database.
|
||||
DBDN=`sudo ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config '(&(olcRootDN=*)(olcSuffix=*))' dn | grep -i '^dn:' | sed -e 's/^dn:\s*//'`;
|
||||
|
||||
sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif
|
||||
|
||||
sudo service slapd restart
|
||||
|
||||
sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// << EOF
|
||||
dn: $DBDN
|
||||
changetype: modify
|
||||
replace: olcSuffix
|
||||
olcSuffix: dc=my-domain,dc=com
|
||||
-
|
||||
replace: olcRootDN
|
||||
olcRootDN: cn=Manager,dc=my-domain,dc=com
|
||||
-
|
||||
replace: olcRootPW
|
||||
olcRootPW: secret
|
||||
|
||||
dn: cn=config
|
||||
changetype: modify
|
||||
add: olcTLSCACertificateFile
|
||||
olcTLSCACertificateFile: /etc/ldap/ssl/server.crt
|
||||
-
|
||||
add: olcTLSCertificateFile
|
||||
olcTLSCertificateFile: /etc/ldap/ssl/server.crt
|
||||
-
|
||||
add: olcTLSCertificateKeyFile
|
||||
olcTLSCertificateKeyFile: /etc/ldap/ssl/server.key
|
||||
-
|
||||
add: olcTLSVerifyClient
|
||||
olcTLSVerifyClient: never
|
||||
-
|
||||
add: olcAuthzRegexp
|
||||
olcAuthzRegexp: uid=usera,cn=digest-md5,cn=auth cn=usera,dc=my-domain,dc=com
|
||||
-
|
||||
replace: olcLogLevel
|
||||
olcLogLevel: -1
|
||||
|
||||
dn: cn=module{0},cn=config
|
||||
changetype: modify
|
||||
add: olcModuleLoad
|
||||
olcModuleLoad: sssvlv
|
||||
-
|
||||
add: olcModuleLoad
|
||||
olcModuleLoad: ppolicy
|
||||
-
|
||||
add: olcModuleLoad
|
||||
olcModuleLoad: dds
|
||||
EOF
|
||||
|
||||
sudo service slapd restart
|
||||
|
||||
sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// << EOF
|
||||
dn: olcOverlay=sssvlv,$DBDN
|
||||
objectClass: olcOverlayConfig
|
||||
objectClass: olcSssVlvConfig
|
||||
olcOverlay: sssvlv
|
||||
olcSssVlvMax: 10
|
||||
olcSssVlvMaxKeys: 5
|
||||
|
||||
dn: olcOverlay=ppolicy,$DBDN
|
||||
objectClass: olcOverlayConfig
|
||||
objectClass: olcPPolicyConfig
|
||||
olcOverlay: ppolicy
|
||||
### This would clutter our DIT and make tests to fail, while ppolicy does not
|
||||
### seem to work as we expect (it does not seem to provide expected controls)
|
||||
## olcPPolicyDefault: cn=default,ou=pwpolicies,dc=my-domain,dc=com
|
||||
## olcPPolicyHashCleartext: FALSE
|
||||
## olcPPolicyUseLockout: TRUE
|
||||
|
||||
dn: olcOverlay=dds,$DBDN
|
||||
objectClass: olcOverlayConfig
|
||||
objectClass: olcDdsConfig
|
||||
olcOverlay: dds
|
||||
EOF
|
||||
|
||||
sudo service slapd restart
|
||||
|
||||
sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// << EOF
|
||||
dn: $DBDN
|
||||
changetype: modify
|
||||
add: olcDbIndex
|
||||
olcDbIndex: entryExpireTimestamp eq
|
||||
EOF
|
||||
|
||||
sudo service slapd restart
|
||||
|
||||
ldapadd -H ldapi:/// -D cn=Manager,dc=my-domain,dc=com -w secret <<EOF
|
||||
dn: dc=my-domain,dc=com
|
||||
objectClass: top
|
||||
objectClass: organization
|
||||
objectClass: dcObject
|
||||
dc: my-domain
|
||||
o: php ldap tests
|
||||
|
||||
### This would clutter our DIT and make tests to fail, while ppolicy does not
|
||||
### seem to work as we expect (it does not seem to provide expected controls)
|
||||
## dn: ou=pwpolicies,dc=my-domain,dc=com
|
||||
## objectClass: top
|
||||
## objectClass: organizationalUnit
|
||||
## ou: pwpolicies
|
||||
##
|
||||
## dn: cn=default,ou=pwpolicies,dc=my-domain,dc=com
|
||||
## objectClass: top
|
||||
## objectClass: person
|
||||
## objectClass: pwdPolicy
|
||||
## cn: default
|
||||
## sn: default
|
||||
## pwdAttribute: userPassword
|
||||
## pwdMaxAge: 2592000
|
||||
## pwdExpireWarning: 3600
|
||||
## #pwdInHistory: 0
|
||||
## pwdCheckQuality: 0
|
||||
## pwdMaxFailure: 5
|
||||
## pwdLockout: TRUE
|
||||
## #pwdLockoutDuration: 0
|
||||
## #pwdGraceAuthNLimit: 0
|
||||
## #pwdFailureCountInterval: 0
|
||||
## pwdMustChange: FALSE
|
||||
## pwdMinLength: 3
|
||||
## pwdAllowUserChange: TRUE
|
||||
## pwdSafeModify: FALSE
|
||||
EOF
|
||||
|
||||
# Verify TLS connection
|
||||
|
||||
ldapsearch -d 255 -H ldaps://localhost -D cn=Manager,dc=my-domain,dc=com -w secret -s base -b dc=my-domain,dc=com 'objectclass=*'
|
||||
@@ -1,13 +0,0 @@
|
||||
steps:
|
||||
- script: |
|
||||
set -e
|
||||
sudo service mysql start
|
||||
sudo service postgresql start
|
||||
sudo service slapd start
|
||||
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
|
||||
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
|
||||
sudo -u postgres psql -c "CREATE DATABASE test;"
|
||||
displayName: 'Setup'
|
||||
- script: ./azure/setup-slapd.sh
|
||||
displayName: 'Configure slapd'
|
||||
|
||||
+1
-2
@@ -12,13 +12,12 @@ steps:
|
||||
export TEST_PHP_JUNIT=junit.xml
|
||||
export REPORT_EXIT_STATUS=no
|
||||
export SKIP_IO_CAPTURE_TESTS=1
|
||||
export MSAN_SYMBOLIZER_PATH=/usr/lib/llvm-6.0/bin/llvm-symbolizer
|
||||
export MSAN_SYMBOLIZER_PATH=/usr/lib/llvm-3.8/bin/llvm-symbolizer
|
||||
rm -rf junit.xml | true
|
||||
php run-tests.php -P -q \
|
||||
-j$(/usr/bin/nproc) \
|
||||
-g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \
|
||||
--offline \
|
||||
--show-diff \
|
||||
--show-slow 1000 \
|
||||
--set-timeout 120 \
|
||||
${{ parameters.runTestsParameters }}
|
||||
|
||||
+1
-3
@@ -14,9 +14,7 @@ LCOV_EXCLUDES = \
|
||||
'$(top_srcdir)/ext/mbstring/libmbfl/*' \
|
||||
'$(top_srcdir)/ext/opcache/jit/libudis86/*' \
|
||||
'$(top_srcdir)/ext/pcre/pcre2lib/*' \
|
||||
'$(top_srcdir)/ext/xmlrpc/libxmlrpc/*' \
|
||||
'$(top_srcdir)/parse_date.re' \
|
||||
'$(top_srcdir)/parse_iso_intervals.re'
|
||||
'$(top_srcdir)/ext/xmlrpc/libxmlrpc/*'
|
||||
|
||||
GCOVR_EXCLUDES = \
|
||||
'ext/bcmath/libbcmath/.*' \
|
||||
|
||||
+7
-8
@@ -308,8 +308,8 @@ dnl
|
||||
dnl PHP_CHECK_GCC_ARG(arg, action-if-found, action-if-not-found)
|
||||
dnl
|
||||
AC_DEFUN([PHP_CHECK_GCC_ARG],[
|
||||
gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z=-,a-z__)
|
||||
AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z=-,a-z__), [
|
||||
gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_)
|
||||
AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [
|
||||
echo 'void somefunc() { };' > conftest.c
|
||||
cmd='$CC $1 -c conftest.c'
|
||||
if eval $cmd 2>&1 | $EGREP -e $1 >/dev/null ; then
|
||||
@@ -1464,16 +1464,16 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <stdio.h>
|
||||
|
||||
struct cookiedata {
|
||||
off64_t pos;
|
||||
__off64_t pos;
|
||||
};
|
||||
|
||||
ssize_t reader(void *cookie, char *buffer, size_t size)
|
||||
__ssize_t reader(void *cookie, char *buffer, size_t size)
|
||||
{ return size; }
|
||||
ssize_t writer(void *cookie, const char *buffer, size_t size)
|
||||
__ssize_t writer(void *cookie, const char *buffer, size_t size)
|
||||
{ return size; }
|
||||
int closer(void *cookie)
|
||||
{ return 0; }
|
||||
int seeker(void *cookie, off64_t *position, int whence)
|
||||
int seeker(void *cookie, __off64_t *position, int whence)
|
||||
{ ((struct cookiedata*)cookie)->pos = *position; return 0; }
|
||||
|
||||
cookie_io_functions_t funcs = {reader, writer, seeker, closer};
|
||||
@@ -1733,7 +1733,7 @@ dnl Search for the sendmail binary.
|
||||
dnl
|
||||
AC_DEFUN([PHP_PROG_SENDMAIL], [
|
||||
PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
|
||||
AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/sbin/sendmail, $PATH:$PHP_ALT_PATH)
|
||||
AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
|
||||
PHP_SUBST(PROG_SENDMAIL)
|
||||
])
|
||||
|
||||
@@ -2416,7 +2416,6 @@ AC_DEFUN([PHP_CHECK_STDINT_TYPES], [
|
||||
AC_CHECK_SIZEOF([long])
|
||||
AC_CHECK_SIZEOF([long long])
|
||||
AC_CHECK_SIZEOF([size_t])
|
||||
AC_CHECK_SIZEOF([off_t])
|
||||
AC_CHECK_TYPES([int8, int16, int32, int64, int8_t, int16_t, int32_t, int64_t, uint8, uint16, uint32, uint64, uint8_t, uint16_t, uint32_t, uint64_t, u_int8_t, u_int16_t, u_int32_t, u_int64_t], [], [], [
|
||||
#if HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
|
||||
+2
-10
@@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice.
|
||||
dnl ----------------------------------------------------------------------------
|
||||
|
||||
AC_PREREQ([2.68])
|
||||
AC_INIT([PHP],[7.4.10],[https://bugs.php.net],[php],[https://www.php.net])
|
||||
AC_INIT([PHP],[7.4.4],[https://bugs.php.net],[php],[https://www.php.net])
|
||||
AC_CONFIG_SRCDIR([main/php_version.h])
|
||||
AC_CONFIG_AUX_DIR([build])
|
||||
AC_PRESERVE_HELP_ORDER
|
||||
@@ -440,7 +440,6 @@ resolv.h \
|
||||
strings.h \
|
||||
syslog.h \
|
||||
sysexits.h \
|
||||
sys/auxv.h \
|
||||
sys/ioctl.h \
|
||||
sys/file.h \
|
||||
sys/mman.h \
|
||||
@@ -720,12 +719,6 @@ if test "x$php_crypt_r" = "x1"; then
|
||||
PHP_CRYPT_R_STYLE
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for aarch64 CRC32 API], ac_cv_func___crc32d,
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <arm_acle.h>]],[[__crc32d(0, 0);]])],[ac_cv_func___crc32d=yes],[ac_cv_func___crc32d="no"])])
|
||||
if test "$ac_cv_func___crc32d" = "yes"; then
|
||||
AC_DEFINE([HAVE_AARCH64_CRC32], [1], [Define when aarch64 CRC32 API is available.])
|
||||
fi
|
||||
|
||||
dnl Check for asm goto support.
|
||||
AC_CACHE_CHECK([for asm goto], ac_cv__asm_goto,
|
||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
@@ -1323,8 +1316,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
|
||||
|
||||
UNAME=`uname -a | xargs`
|
||||
PHP_UNAME=${PHP_UNAME:-$UNAME}
|
||||
PHP_UNAME=`uname -a | xargs`
|
||||
AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
|
||||
PHP_OS=`uname | xargs`
|
||||
AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
|
||||
|
||||
@@ -297,8 +297,6 @@
|
||||
|
||||
e.g. `ChangeLog-7.php` from the `NEWS` file
|
||||
|
||||
* You may want to try `php-web/bin/news2html` to automate this task.
|
||||
|
||||
* Go over the list and put every element on one line.
|
||||
* Check for `&`, `<` and `>` and escape them if necessary.
|
||||
* Remove all the names at the ends of lines.
|
||||
@@ -314,12 +312,13 @@
|
||||
|
||||
V. `s/FR #\([0-9]\+\)/FR <?php bugl(\1); ?>/`
|
||||
|
||||
* You may want to try `php-web/bin/news2html` to automate this task.
|
||||
|
||||
6. Add a short notice to phpweb stating that there is a new release, and
|
||||
highlight the major important things (security fixes) and when it is
|
||||
important to upgrade.
|
||||
|
||||
* Call `php bin/createNewsEntry` in your local phpweb checkout.
|
||||
* Use the "frontpage" and "releases" category.
|
||||
* Add the content for the news entry.
|
||||
|
||||
7. Commit and push all the changes to their respective git repos
|
||||
|
||||
File renamed without changes.
@@ -133,7 +133,7 @@ PHP_FUNCTION(com_create_instance)
|
||||
info.pwszName = php_com_string_to_olestring(server_name, server_name_len, obj->code_page);
|
||||
|
||||
if (user_name) {
|
||||
authid.User = (OLECHAR*)user_name;
|
||||
authid.User = php_com_string_to_olestring(user_name, -1, obj->code_page);
|
||||
authid.UserLength = (ULONG)user_name_len;
|
||||
|
||||
if (password) {
|
||||
@@ -248,7 +248,7 @@ PHP_FUNCTION(com_create_instance)
|
||||
TL = php_com_load_typelib_via_cache(typelib_name, obj->code_page, &cached);
|
||||
|
||||
if (TL) {
|
||||
if (COMG(autoreg_on)) {
|
||||
if (COMG(autoreg_on) && !cached) {
|
||||
php_com_import_typelib(TL, mode, obj->code_page);
|
||||
}
|
||||
|
||||
@@ -840,7 +840,9 @@ PHP_FUNCTION(com_load_typelib)
|
||||
php_com_initialize();
|
||||
pTL = php_com_load_typelib_via_cache(name, codepage, &cached);
|
||||
if (pTL) {
|
||||
if (php_com_import_typelib(pTL, cs ? CONST_CS : 0, codepage) == SUCCESS) {
|
||||
if (cached) {
|
||||
RETVAL_TRUE;
|
||||
} else if (php_com_import_typelib(pTL, cs ? CONST_CS : 0, codepage) == SUCCESS) {
|
||||
RETVAL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -251,7 +251,9 @@ static PHP_INI_MH(OnTypeLibFileUpdate)
|
||||
}
|
||||
|
||||
if ((pTL = php_com_load_typelib_via_cache(typelib_name, COMG(code_page), &cached)) != NULL) {
|
||||
php_com_import_typelib(pTL, mode, COMG(code_page));
|
||||
if (!cached) {
|
||||
php_com_import_typelib(pTL, mode, COMG(code_page));
|
||||
}
|
||||
ITypeLib_Release(pTL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,58 +103,3 @@ PHP_COM_DOTNET_API char *php_com_olestring_to_string(OLECHAR *olestring, size_t
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
BSTR php_com_string_to_bstr(zend_string *string, int codepage)
|
||||
{
|
||||
BSTR bstr = NULL;
|
||||
DWORD flags = codepage == CP_UTF8 ? 0 : MB_PRECOMPOSED | MB_ERR_INVALID_CHARS;
|
||||
size_t mb_len = ZSTR_LEN(string);
|
||||
int wc_len;
|
||||
|
||||
if ((wc_len = MultiByteToWideChar(codepage, flags, ZSTR_VAL(string), (int)mb_len + 1, NULL, 0)) <= 0) {
|
||||
goto fail;
|
||||
}
|
||||
if ((bstr = SysAllocStringLen(NULL, (UINT)(wc_len - 1))) == NULL) {
|
||||
goto fail;
|
||||
}
|
||||
if ((wc_len = MultiByteToWideChar(codepage, flags, ZSTR_VAL(string), (int)mb_len + 1, bstr, wc_len)) <= 0) {
|
||||
goto fail;
|
||||
}
|
||||
return bstr;
|
||||
|
||||
fail:
|
||||
char *msg = php_win32_error_to_msg(GetLastError());
|
||||
php_error_docref(NULL, E_WARNING,
|
||||
"Could not convert string to unicode: `%s'", msg);
|
||||
LocalFree(msg);
|
||||
SysFreeString(bstr);
|
||||
return SysAllocString(L"");
|
||||
}
|
||||
|
||||
zend_string *php_com_bstr_to_string(BSTR bstr, int codepage)
|
||||
{
|
||||
zend_string *string = NULL;
|
||||
UINT wc_len = SysStringLen(bstr);
|
||||
int mb_len;
|
||||
|
||||
mb_len = WideCharToMultiByte(codepage, 0, bstr, wc_len + 1, NULL, 0, NULL, NULL);
|
||||
if (mb_len > 0) {
|
||||
string = zend_string_alloc(mb_len - 1, 0);
|
||||
mb_len = WideCharToMultiByte(codepage, 0, bstr, wc_len + 1, ZSTR_VAL(string), mb_len, NULL, NULL);
|
||||
}
|
||||
|
||||
if (mb_len <= 0) {
|
||||
char *msg = php_win32_error_to_msg(GetLastError());
|
||||
|
||||
php_error_docref(NULL, E_WARNING,
|
||||
"Could not convert string from unicode: `%s'", msg);
|
||||
LocalFree(msg);
|
||||
|
||||
if (string != NULL) {
|
||||
zend_string_release(string);
|
||||
}
|
||||
string = ZSTR_EMPTY_ALLOC();
|
||||
}
|
||||
|
||||
return string;
|
||||
}
|
||||
@@ -96,6 +96,7 @@ bogus:
|
||||
|
||||
PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage)
|
||||
{
|
||||
OLECHAR *olestring;
|
||||
php_com_dotnet_object *obj;
|
||||
zend_uchar ztype = IS_NULL;
|
||||
|
||||
@@ -163,7 +164,13 @@ PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codep
|
||||
|
||||
case IS_STRING:
|
||||
V_VT(v) = VT_BSTR;
|
||||
V_BSTR(v) = php_com_string_to_bstr(Z_STR_P(z), codepage);
|
||||
olestring = php_com_string_to_olestring(Z_STRVAL_P(z), Z_STRLEN_P(z), codepage);
|
||||
if (CP_UTF8 == codepage) {
|
||||
V_BSTR(v) = SysAllocStringByteLen((char*)olestring, (UINT)(wcslen(olestring) * sizeof(OLECHAR)));
|
||||
} else {
|
||||
V_BSTR(v) = SysAllocStringByteLen((char*)olestring, (UINT)(Z_STRLEN_P(z) * sizeof(OLECHAR)));
|
||||
}
|
||||
efree(olestring);
|
||||
break;
|
||||
|
||||
case IS_RESOURCE:
|
||||
@@ -229,8 +236,12 @@ PHP_COM_DOTNET_API int php_com_zval_from_variant(zval *z, VARIANT *v, int codepa
|
||||
case VT_BSTR:
|
||||
olestring = V_BSTR(v);
|
||||
if (olestring) {
|
||||
zend_string *str = php_com_bstr_to_string(olestring, codepage);
|
||||
ZVAL_STR(z, str);
|
||||
size_t len;
|
||||
char *str = php_com_olestring_to_string(olestring,
|
||||
&len, codepage);
|
||||
ZVAL_STRINGL(z, str, len);
|
||||
// TODO: avoid reallocation???
|
||||
efree(str);
|
||||
olestring = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -86,8 +86,6 @@ PHP_COM_DOTNET_API char *php_com_olestring_to_string(OLECHAR *olestring,
|
||||
size_t *string_len, int codepage);
|
||||
PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string,
|
||||
size_t string_len, int codepage);
|
||||
BSTR php_com_string_to_bstr(zend_string *string, int codepage);
|
||||
zend_string *php_com_bstr_to_string(BSTR bstr, int codepage);
|
||||
|
||||
|
||||
/* com_com.c */
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
--TEST--
|
||||
Bug #63208 (BSTR to PHP string conversion not binary safe)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$string = "\u{0905}b\0cd";
|
||||
$variant = new VARIANT($string, VT_ARRAY | VT_UI1, CP_UTF8); // Array of bytes
|
||||
$converted = (string) $variant;
|
||||
var_dump(bin2hex($string));
|
||||
var_dump(bin2hex($converted));
|
||||
?>
|
||||
--EXPECT--
|
||||
string(14) "e0a48562006364"
|
||||
string(14) "e0a48562006364"
|
||||
@@ -2,7 +2,7 @@
|
||||
Bug #79332 (php_istreams are never freed)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available');
|
||||
if (!extension_loaded('com_dotnet')) die('com_dotnet extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -2183,7 +2183,7 @@ static inline int build_mime_structure_from_hash(php_curl *ch, zval *zpostfields
|
||||
}
|
||||
#endif
|
||||
|
||||
ZEND_HASH_FOREACH_KEY_VAL_IND(postfields, num_key, string_key, current) {
|
||||
ZEND_HASH_FOREACH_KEY_VAL(postfields, num_key, string_key, current) {
|
||||
zend_string *postval, *tmp_postval;
|
||||
/* Pretend we have a string_key here */
|
||||
if (!string_key) {
|
||||
@@ -2367,6 +2367,8 @@ PHP_FUNCTION(curl_copy_handle)
|
||||
}
|
||||
#endif
|
||||
|
||||
Z_ADDREF_P(zid);
|
||||
|
||||
ZVAL_RES(return_value, zend_register_resource(dupch, le_curl));
|
||||
dupch->res = Z_RES_P(return_value);
|
||||
}
|
||||
@@ -2919,7 +2921,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
ZEND_HASH_FOREACH_VAL_IND(ph, current) {
|
||||
ZEND_HASH_FOREACH_VAL(ph, current) {
|
||||
ZVAL_DEREF(current);
|
||||
val = zval_get_tmp_string(current, &tmp_val);
|
||||
slist = curl_slist_append(slist, ZSTR_VAL(val));
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79199 (curl_copy_handle() memory leak)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('curl')) die('skip curl extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$mem_old = 0;
|
||||
for($i = 0; $i < 50; ++$i) {
|
||||
$c1 = curl_init();
|
||||
$c2 = curl_copy_handle($c1);
|
||||
curl_close($c2);
|
||||
curl_close($c1);
|
||||
$mem_new = memory_get_usage();
|
||||
if ($mem_new <= $mem_old) {
|
||||
break;
|
||||
}
|
||||
$mem_old = $mem_new;
|
||||
}
|
||||
echo $i < 50 ? "okay" : "leak", PHP_EOL;
|
||||
?>
|
||||
--EXPECT--
|
||||
okay
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Bug #79741: curl_setopt CURLOPT_POSTFIELDS asserts on object with declared properties
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test {
|
||||
public $prop = "value";
|
||||
}
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, new Test);
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
+790
-828
File diff suppressed because it is too large.
Load diff
@@ -680,8 +680,6 @@ static zval *date_period_read_property(zval *object, zval *member, int type, voi
|
||||
static zval *date_period_write_property(zval *object, zval *member, zval *value, void **cache_slot);
|
||||
static zval *date_period_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot);
|
||||
|
||||
static int date_object_compare_timezone(zval *tz1, zval *tz2);
|
||||
|
||||
/* {{{ Module struct */
|
||||
zend_module_entry date_module_entry = {
|
||||
STANDARD_MODULE_HEADER_EX,
|
||||
@@ -2154,7 +2152,6 @@ static void date_register_classes(void) /* {{{ */
|
||||
date_object_handlers_timezone.offset = XtOffsetOf(php_timezone_obj, std);
|
||||
date_object_handlers_timezone.free_obj = date_object_free_storage_timezone;
|
||||
date_object_handlers_timezone.clone_obj = date_object_clone_timezone;
|
||||
date_object_handlers_timezone.compare_objects = date_object_compare_timezone;
|
||||
date_object_handlers_timezone.get_properties_for = date_object_get_properties_for_timezone;
|
||||
date_object_handlers_timezone.get_gc = date_object_get_gc_timezone;
|
||||
date_object_handlers_timezone.get_debug_info = date_object_get_debug_info_timezone;
|
||||
@@ -2383,31 +2380,6 @@ static zend_object *date_object_clone_timezone(zval *this_ptr) /* {{{ */
|
||||
return &new_obj->std;
|
||||
} /* }}} */
|
||||
|
||||
static int date_object_compare_timezone(zval *tz1, zval *tz2) /* {{{ */
|
||||
{
|
||||
php_timezone_obj *o1, *o2;
|
||||
|
||||
o1 = Z_PHPTIMEZONE_P(tz1);
|
||||
o2 = Z_PHPTIMEZONE_P(tz2);
|
||||
|
||||
ZEND_ASSERT(o1->initialized && o2->initialized);
|
||||
|
||||
if (o1->type != o2->type) {
|
||||
php_error_docref(NULL, E_WARNING, "Trying to compare different kinds of DateTimeZone objects");
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (o1->type) {
|
||||
case TIMELIB_ZONETYPE_OFFSET:
|
||||
return o1->tzi.utc_offset == o2->tzi.utc_offset ? 0 : 1;
|
||||
case TIMELIB_ZONETYPE_ABBR:
|
||||
return strcmp(o1->tzi.z.abbr, o2->tzi.z.abbr) ? 1 : 0;
|
||||
case TIMELIB_ZONETYPE_ID:
|
||||
return strcmp(o1->tzi.tz->name, o2->tzi.tz->name) ? 1 : 0;
|
||||
EMPTY_SWITCH_DEFAULT_CASE();
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
static void php_timezone_to_string(php_timezone_obj *tzobj, zval *zv)
|
||||
{
|
||||
switch (tzobj->type) {
|
||||
@@ -3601,7 +3573,6 @@ static void php_date_time_set(zval *object, zend_long h, zend_long i, zend_long
|
||||
dateobj->time->s = s;
|
||||
dateobj->time->us = ms;
|
||||
timelib_update_ts(dateobj->time, NULL);
|
||||
timelib_update_from_sse(dateobj->time);
|
||||
} /* }}} */
|
||||
|
||||
/* {{{ proto DateTime date_time_set(DateTime object, int hour, int minute[, int second[, int microseconds]])
|
||||
|
||||
@@ -1,60 +1,54 @@
|
||||
--TEST--
|
||||
Test of compare object handler for DateTimeZone objects
|
||||
Test of compare object handler for DateTime objects
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$timezones = array(
|
||||
['+0200', '-0200'],
|
||||
['EST', 'PST'],
|
||||
['Europe/Amsterdam', 'Europe/Berlin']
|
||||
);
|
||||
// NB: DateTimeZone class does not define a customized compare class handler so standard object handler will be used
|
||||
|
||||
foreach ($timezones as [$timezone1, $timezone2]) {
|
||||
compare_timezones($timezone1, $timezone1);
|
||||
compare_timezones($timezone1, $timezone2);
|
||||
echo "Simple test for DateTimeZone compare object handler\n";
|
||||
|
||||
//Set the default time zone
|
||||
date_default_timezone_set("Europe/London");
|
||||
|
||||
class DateTimeZoneExt1 extends DateTimeZone {
|
||||
}
|
||||
|
||||
var_dump(new DateTimeZone('Europe/Berlin') == new DateTimeZone('CET'));
|
||||
|
||||
function compare_timezones($timezone1, $timezone2)
|
||||
{
|
||||
$tz1 = new DateTimeZone($timezone1);
|
||||
$tz2 = new DateTimeZone($timezone2);
|
||||
echo "compare $timezone1 with $timezone2\n";
|
||||
echo "< ";
|
||||
var_dump($tz1 < $tz2);
|
||||
echo "= ";
|
||||
var_dump($tz1 == $tz2);
|
||||
echo "> ";
|
||||
var_dump($tz1 > $tz2);
|
||||
class DateTimeZoneExt2 extends DateTimeZone{
|
||||
public $foo = "Hello";
|
||||
private $bar = 99;
|
||||
}
|
||||
|
||||
class DateTimeZoneExt3 extends DateTimeZoneExt2 {
|
||||
}
|
||||
|
||||
$obj1 = new DateTimeZone("Europe/London");
|
||||
$obj2 = new DateTimeZoneExt1("Europe/London");
|
||||
$obj3 = new DateTimeZoneExt2("Europe/London");
|
||||
$obj4 = new DateTimeZoneExt3("Europe/London");
|
||||
|
||||
echo "\n-- All the following tests should compare equal --\n";
|
||||
var_dump($obj1 == $obj1);
|
||||
echo "\n-- All the following tests should compare NOT equal --\n";
|
||||
var_dump($obj1 == $obj2);
|
||||
var_dump($obj1 == $obj3);
|
||||
var_dump($obj1 == $obj4);
|
||||
var_dump($obj2 == $obj3);
|
||||
var_dump($obj2 == $obj4);
|
||||
var_dump($obj3 == $obj4);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
compare +0200 with +0200
|
||||
< bool(false)
|
||||
= bool(true)
|
||||
> bool(false)
|
||||
compare +0200 with -0200
|
||||
< bool(false)
|
||||
= bool(false)
|
||||
> bool(false)
|
||||
compare EST with EST
|
||||
< bool(false)
|
||||
= bool(true)
|
||||
> bool(false)
|
||||
compare EST with PST
|
||||
< bool(false)
|
||||
= bool(false)
|
||||
> bool(false)
|
||||
compare Europe/Amsterdam with Europe/Amsterdam
|
||||
< bool(false)
|
||||
= bool(true)
|
||||
> bool(false)
|
||||
compare Europe/Amsterdam with Europe/Berlin
|
||||
< bool(false)
|
||||
= bool(false)
|
||||
> bool(false)
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
Simple test for DateTimeZone compare object handler
|
||||
|
||||
Warning: main(): Trying to compare different kinds of DateTimeZone objects in %s on line %d
|
||||
-- All the following tests should compare equal --
|
||||
bool(true)
|
||||
|
||||
-- All the following tests should compare NOT equal --
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
===DONE===
|
||||
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Bug #48187 (DateTime::diff() corrupting microtime() result)
|
||||
--FILE--
|
||||
<?php
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
// two arbitrary dates
|
||||
$date1 = new DateTime('2005-07-23');
|
||||
$date2 = new DateTime('2006-02-14');
|
||||
|
||||
$begin_u = microtime(true);
|
||||
$begin_t = time();
|
||||
|
||||
if (microtime(true) - $begin_u < 1) {
|
||||
var_dump('microtime() difference less 1 second');
|
||||
} else {
|
||||
var_dump('microtime() difference greater or equal 1 second');
|
||||
}
|
||||
|
||||
if (time() - $begin_t < 1) {
|
||||
var_dump('time() difference less 1 second');
|
||||
} else {
|
||||
var_dump('time() difference greater or equal 1 second');
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
string(36) "microtime() difference less 1 second"
|
||||
string(31) "time() difference less 1 second"
|
||||
@@ -1,24 +0,0 @@
|
||||
--TEST--
|
||||
Test for setting Date/Time during a forward DST transition
|
||||
--FILE--
|
||||
<?php
|
||||
date_default_timezone_set('America/Chicago');
|
||||
|
||||
$date = new DateTime('2020-03-08 01:30:00');
|
||||
echo $date->setTime(2, 0)->format('Y-m-d H:i:s T/e - U') . "\n";
|
||||
|
||||
$date = new DateTime('2020-03-08 01:30:00');
|
||||
echo $date->setTime(2, 30)->format('Y-m-d H:i:s T/e - U') . "\n";
|
||||
|
||||
$date = new DateTime('2020-03-08 01:30:00');
|
||||
echo $date->setTime(3, 0)->format('Y-m-d H:i:s T/e - U') . "\n";
|
||||
|
||||
$date = new DateTime('2020-03-08 01:30:00');
|
||||
echo $date->setTime(1, 59, 59)->format('Y-m-d H:i:s T/e - U') . "\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
2020-03-08 03:00:00 CDT/America/Chicago - 1583654400
|
||||
2020-03-08 03:30:00 CDT/America/Chicago - 1583656200
|
||||
2020-03-08 03:00:00 CDT/America/Chicago - 1583654400
|
||||
2020-03-08 01:59:59 CST/America/Chicago - 1583654399
|
||||
@@ -1360,14 +1360,6 @@ xmlNode *dom_get_elements_by_tag_name_ns_raw(xmlNodePtr nodep, char *ns, char *l
|
||||
/* }}} */
|
||||
/* }}} end dom_element_get_elements_by_tag_name_ns_raw */
|
||||
|
||||
static inline zend_bool is_empty_node(xmlNodePtr nodep)
|
||||
{
|
||||
xmlChar *strContent = xmlNodeGetContent(nodep);
|
||||
zend_bool ret = strContent == NULL || *strContent == '\0';
|
||||
xmlFree(strContent);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* {{{ void dom_normalize (xmlNodePtr nodep) */
|
||||
void dom_normalize (xmlNodePtr nodep)
|
||||
{
|
||||
@@ -1393,13 +1385,6 @@ void dom_normalize (xmlNodePtr nodep)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (is_empty_node(child)) {
|
||||
nextp = child->next;
|
||||
xmlUnlinkNode(child);
|
||||
php_libxml_node_free_resource(child);
|
||||
child = nextp;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case XML_ELEMENT_NODE:
|
||||
dom_normalize (child);
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
--TEST--
|
||||
Bug #78221 (DOMNode::normalize() doesn't remove empty text nodes)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('dom')) die('skip dom extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$doc = new DOMDocument();
|
||||
$doc->loadHTML('<p id=x>foo</p>');
|
||||
$p = $doc->getElementById('x');
|
||||
$p->childNodes[0]->textContent = '';
|
||||
$p->normalize();
|
||||
var_dump($p->childNodes->length);
|
||||
?>
|
||||
--EXPECT--
|
||||
int(0)
|
||||
+20
-53
@@ -64,7 +64,7 @@ typedef unsigned char uchar;
|
||||
|
||||
#define EFREE_IF(ptr) if (ptr) efree(ptr)
|
||||
|
||||
#define MAX_IFD_NESTING_LEVEL 200
|
||||
#define MAX_IFD_NESTING_LEVEL 150
|
||||
|
||||
/* {{{ arginfo */
|
||||
ZEND_BEGIN_ARG_INFO(arginfo_exif_tagname, 0)
|
||||
@@ -1487,7 +1487,7 @@ static signed short php_ifd_get16s(void *value, int motorola_intel)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ php_ifd_get32u
|
||||
/* {{{ php_ifd_get32s
|
||||
* Convert a 32 bit unsigned value from file's native byte order */
|
||||
static unsigned php_ifd_get32u(void *void_value, int motorola_intel)
|
||||
{
|
||||
@@ -1506,33 +1506,6 @@ static unsigned php_ifd_get32u(void *void_value, int motorola_intel)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ php_ifd_get64u
|
||||
* Convert a 64 bit unsigned value from file's native byte order */
|
||||
static uint64_t php_ifd_get64u(void *void_value, int motorola_intel)
|
||||
{
|
||||
uchar *value = (uchar *) void_value;
|
||||
if (motorola_intel) {
|
||||
return ((uint64_t)value[0] << 56)
|
||||
| ((uint64_t)value[1] << 48)
|
||||
| ((uint64_t)value[2] << 40)
|
||||
| ((uint64_t)value[3] << 32)
|
||||
| ((uint64_t)value[4] << 24)
|
||||
| ((uint64_t)value[5] << 16)
|
||||
| ((uint64_t)value[6] << 8 )
|
||||
| ((uint64_t)value[7] );
|
||||
} else {
|
||||
return ((uint64_t)value[7] << 56)
|
||||
| ((uint64_t)value[6] << 48)
|
||||
| ((uint64_t)value[5] << 40)
|
||||
| ((uint64_t)value[4] << 32)
|
||||
| ((uint64_t)value[3] << 24)
|
||||
| ((uint64_t)value[2] << 16)
|
||||
| ((uint64_t)value[1] << 8 )
|
||||
| ((uint64_t)value[0] );
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ php_ifd_get32u
|
||||
* Convert a 32 bit signed value from file's native byte order */
|
||||
static unsigned php_ifd_get32s(void *value, int motorola_intel)
|
||||
@@ -1574,15 +1547,17 @@ static void php_ifd_set32u(char *data, size_t value, int motorola_intel)
|
||||
/* }}} */
|
||||
|
||||
static float php_ifd_get_float(char *data) {
|
||||
union { uint32_t i; float f; } u;
|
||||
u.i = php_ifd_get32u(data, 0);
|
||||
return u.f;
|
||||
/* Copy to avoid alignment issues */
|
||||
float f;
|
||||
memcpy(&f, data, sizeof(float));
|
||||
return f;
|
||||
}
|
||||
|
||||
static double php_ifd_get_double(char *data) {
|
||||
union { uint64_t i; double f; } u;
|
||||
u.i = php_ifd_get64u(data, 0);
|
||||
return u.f;
|
||||
/* Copy to avoid alignment issues */
|
||||
double f;
|
||||
memcpy(&f, data, sizeof(double));
|
||||
return f;
|
||||
}
|
||||
|
||||
#ifdef EXIF_DEBUG
|
||||
@@ -3184,7 +3159,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
|
||||
if (value_len < 2 || maker_note->offset >= value_len - 1) {
|
||||
/* Do not go past the value end */
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "IFD data too short: 0x%04X offset 0x%04X", value_len, maker_note->offset);
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
dir_start = value_ptr + maker_note->offset;
|
||||
@@ -3210,23 +3185,6 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
|
||||
|
||||
NumDirEntries = php_ifd_get16u(dir_start, ImageInfo->motorola_intel);
|
||||
|
||||
/* It can be that motorola_intel is wrongly mapped, let's try inverting it */
|
||||
if ((2+NumDirEntries*12) > value_len) {
|
||||
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Potentially invalid endianess, trying again with different endianness before imminent failure.");
|
||||
|
||||
ImageInfo->motorola_intel = ImageInfo->motorola_intel == 0 ? 1 : 0;
|
||||
NumDirEntries = php_ifd_get16u(dir_start, ImageInfo->motorola_intel);
|
||||
}
|
||||
|
||||
if ((2+NumDirEntries*12) > value_len) {
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD size: 2 + 0x%04X*12 = 0x%04X > 0x%04X", NumDirEntries, 2+NumDirEntries*12, value_len);
|
||||
return FALSE;
|
||||
}
|
||||
if ((dir_start - value_ptr) > value_len - (2+NumDirEntries*12)) {
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD size: 0x%04X > 0x%04X", (dir_start - value_ptr) + (2+NumDirEntries*12), value_len);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
switch (maker_note->offset_mode) {
|
||||
case MN_OFFSET_MAKER:
|
||||
offset_base = value_ptr;
|
||||
@@ -3257,6 +3215,15 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
|
||||
break;
|
||||
}
|
||||
|
||||
if ((2+NumDirEntries*12) > value_len) {
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD size: 2 + 0x%04X*12 = 0x%04X > 0x%04X", NumDirEntries, 2+NumDirEntries*12, value_len);
|
||||
return FALSE;
|
||||
}
|
||||
if ((dir_start - value_ptr) > value_len - (2+NumDirEntries*12)) {
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD size: 0x%04X > 0x%04X", (dir_start - value_ptr) + (2+NumDirEntries*12), value_len);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for (de=0;de<NumDirEntries;de++) {
|
||||
size_t offset = 2 + 12 * de;
|
||||
if (!exif_process_IFD_TAG(ImageInfo, dir_start + offset,
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB |
@@ -1,17 +0,0 @@
|
||||
--TEST--
|
||||
Bug #75785 fix corrupt EXIF header issues; Related to mixed endianness. (Thank you @Richard Matzinger for providing the test photo)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
|
||||
--FILE--
|
||||
<?php
|
||||
$mixedEndiannessFile = dirname(__FILE__).'/P1000506.JPG';
|
||||
$tags = exif_read_data($mixedEndiannessFile, 'EXIF', true, false);
|
||||
|
||||
echo $tags['GPS']['GPSLatitude'][0] . PHP_EOL;
|
||||
echo $tags['GPS']['GPSLongitude'][0] . PHP_EOL;
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
38/1
|
||||
122/1
|
||||
===DONE===
|
||||
@@ -10,8 +10,6 @@ DONE
|
||||
--EXPECTF--
|
||||
Warning: exif_thumbnail(bug77563.jpg): IFD data too short: 0x0009 offset 0x0008 in %s%ebug77563.php on line %d
|
||||
|
||||
Warning: exif_thumbnail(bug77563.jpg): Illegal IFD offset in %s%ebug77563.php on line %d
|
||||
|
||||
Warning: exif_thumbnail(bug77563.jpg): File structure corrupted in %s%ebug77563.php on line %d
|
||||
|
||||
Warning: exif_thumbnail(bug77563.jpg): Invalid JPEG file in %s%ebug77563.php on line %d
|
||||
|
||||
@@ -13,32 +13,5 @@ Warning: exif_read_data(): Process tag(x927C=MakerNote): Illegal format code 0x2
|
||||
|
||||
Warning: exif_read_data(): IFD data too short: 0x0000 offset 0x000C in %s on line %d
|
||||
|
||||
Warning: exif_read_data(): Error in TIFF: filesize(x002A) less than start of IFD dir(x46494C4F) in %s on line %d
|
||||
array(8) {
|
||||
["FileDateTime"]=>
|
||||
int(0)
|
||||
["FileSize"]=>
|
||||
int(42)
|
||||
["FileType"]=>
|
||||
int(8)
|
||||
["MimeType"]=>
|
||||
string(10) "image/tiff"
|
||||
["SectionsFound"]=>
|
||||
string(13) "ANY_TAG, IFD0"
|
||||
["COMPUTED"]=>
|
||||
array(2) {
|
||||
["IsColor"]=>
|
||||
int(0)
|
||||
["ByteOrderMotorola"]=>
|
||||
int(1)
|
||||
}
|
||||
["Make"]=>
|
||||
array(2) {
|
||||
[0]=>
|
||||
int(1179994697)
|
||||
[1]=>
|
||||
int(1179208781)
|
||||
}
|
||||
["MakerNote"]=>
|
||||
NULL
|
||||
}
|
||||
Warning: exif_read_data(): Invalid TIFF file in %s on line %d
|
||||
bool(false)
|
||||
+18
-42
@@ -43,11 +43,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __BIGGEST_ALIGNMENT__
|
||||
/* XXX need something better, perhaps with regard to SIMD, etc. */
|
||||
# define __BIGGEST_ALIGNMENT__ sizeof(size_t)
|
||||
#endif
|
||||
|
||||
ZEND_DECLARE_MODULE_GLOBALS(ffi)
|
||||
|
||||
typedef enum _zend_ffi_tag_kind {
|
||||
@@ -459,7 +454,7 @@ static zend_never_inline zend_ffi_cdata *zend_ffi_cdata_to_zval_slow_ret(void *p
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static zend_always_inline void zend_ffi_cdata_to_zval(zend_ffi_cdata *cdata, void *ptr, zend_ffi_type *type, int read_type, zval *rv, zend_ffi_flags flags, zend_bool is_ret, zend_bool debug_union) /* {{{ */
|
||||
static zend_always_inline void zend_ffi_cdata_to_zval(zend_ffi_cdata *cdata, void *ptr, zend_ffi_type *type, int read_type, zval *rv, zend_ffi_flags flags, zend_bool is_ret) /* {{{ */
|
||||
{
|
||||
if (read_type == BP_VAR_R) {
|
||||
zend_ffi_type_kind kind = type->kind;
|
||||
@@ -514,9 +509,6 @@ again:
|
||||
if (*(void**)ptr == NULL) {
|
||||
ZVAL_NULL(rv);
|
||||
return;
|
||||
} else if (debug_union) {
|
||||
ZVAL_STR(rv, zend_strpprintf(0, "%p", *(void**)ptr));
|
||||
return;
|
||||
} else if ((type->attr & ZEND_FFI_ATTR_CONST) && ZEND_FFI_TYPE(type->pointer.type)->kind == ZEND_FFI_TYPE_CHAR) {
|
||||
ZVAL_STRING(rv, *(char**)ptr);
|
||||
return;
|
||||
@@ -590,7 +582,6 @@ static uint64_t zend_ffi_bit_field_read(void *ptr, zend_ffi_field *field) /* {{{
|
||||
|
||||
return val;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void zend_ffi_bit_field_to_zval(void *ptr, zend_ffi_field *field, zval *rv) /* {{{ */
|
||||
{
|
||||
@@ -867,7 +858,7 @@ static void zend_ffi_callback_trampoline(ffi_cif* cif, void* ret, void** args, v
|
||||
|
||||
ZEND_HASH_FOREACH_PTR(callback_data->type->func.args, arg_type) {
|
||||
arg_type = ZEND_FFI_TYPE(arg_type);
|
||||
zend_ffi_cdata_to_zval(NULL, args[n], arg_type, BP_VAR_R, &fci.params[n], (zend_ffi_flags)(arg_type->attr & ZEND_FFI_ATTR_CONST), 0, 0);
|
||||
zend_ffi_cdata_to_zval(NULL, args[n], arg_type, BP_VAR_R, &fci.params[n], (zend_ffi_flags)(arg_type->attr & ZEND_FFI_ATTR_CONST), 0);
|
||||
n++;
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
}
|
||||
@@ -1002,7 +993,7 @@ static zval *zend_ffi_cdata_get(zval *object, zval *member, int read_type, void
|
||||
return &EG(uninitialized_zval);;
|
||||
}
|
||||
|
||||
zend_ffi_cdata_to_zval(cdata, cdata->ptr, type, BP_VAR_R, rv, 0, 0, 0);
|
||||
zend_ffi_cdata_to_zval(cdata, cdata->ptr, type, BP_VAR_R, rv, 0, 0);
|
||||
return rv;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1174,7 +1165,7 @@ static zval *zend_ffi_cdata_read_field(zval *object, zval *member, int read_type
|
||||
}
|
||||
}
|
||||
ptr = (void*)(((char*)ptr) + field->offset);
|
||||
zend_ffi_cdata_to_zval(NULL, ptr, field_type, read_type, rv, (cdata->flags & ZEND_FFI_FLAG_CONST) | (zend_ffi_flags)field->is_const, 0, 0);
|
||||
zend_ffi_cdata_to_zval(NULL, ptr, field_type, read_type, rv, (cdata->flags & ZEND_FFI_FLAG_CONST) | (zend_ffi_flags)field->is_const, 0);
|
||||
} else {
|
||||
zend_ffi_bit_field_to_zval(ptr, field, rv);
|
||||
}
|
||||
@@ -1315,7 +1306,7 @@ static zval *zend_ffi_cdata_read_dim(zval *object, zval *offset, int read_type,
|
||||
return &EG(uninitialized_zval);
|
||||
}
|
||||
|
||||
zend_ffi_cdata_to_zval(NULL, ptr, dim_type, read_type, rv, is_const, 0, 0);
|
||||
zend_ffi_cdata_to_zval(NULL, ptr, dim_type, read_type, rv, is_const, 0);
|
||||
return rv;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1866,7 +1857,7 @@ static zval *zend_ffi_cdata_it_get_current_data(zend_object_iterator *it) /* {{{
|
||||
ptr = (void*)((char*)cdata->ptr + dim_type->size * iter->it.index);
|
||||
|
||||
zval_ptr_dtor(&iter->value);
|
||||
zend_ffi_cdata_to_zval(NULL, ptr, dim_type, iter->by_ref ? BP_VAR_RW : BP_VAR_R, &iter->value, (cdata->flags & ZEND_FFI_FLAG_CONST) | (zend_ffi_flags)(type->attr & ZEND_FFI_ATTR_CONST), 0, 0);
|
||||
zend_ffi_cdata_to_zval(NULL, ptr, dim_type, iter->by_ref ? BP_VAR_RW : BP_VAR_R, &iter->value, (cdata->flags & ZEND_FFI_FLAG_CONST) | (zend_ffi_flags)(type->attr & ZEND_FFI_ATTR_CONST), 0);
|
||||
return &iter->value;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1961,7 +1952,7 @@ static HashTable *zend_ffi_cdata_get_debug_info(zval *object, int *is_temp) /* {
|
||||
case ZEND_FFI_TYPE_SINT32:
|
||||
case ZEND_FFI_TYPE_UINT64:
|
||||
case ZEND_FFI_TYPE_SINT64:
|
||||
zend_ffi_cdata_to_zval(cdata, ptr, type, BP_VAR_R, &tmp, ZEND_FFI_FLAG_CONST, 0, 0);
|
||||
zend_ffi_cdata_to_zval(cdata, ptr, type, BP_VAR_R, &tmp, ZEND_FFI_FLAG_CONST, 0);
|
||||
ht = zend_new_array(1);
|
||||
zend_hash_str_add(ht, "cdata", sizeof("cdata")-1, &tmp);
|
||||
*is_temp = 1;
|
||||
@@ -1981,7 +1972,7 @@ static HashTable *zend_ffi_cdata_get_debug_info(zval *object, int *is_temp) /* {
|
||||
*is_temp = 1;
|
||||
return ht;
|
||||
} else {
|
||||
zend_ffi_cdata_to_zval(NULL, *(void**)ptr, ZEND_FFI_TYPE(type->pointer.type), BP_VAR_R, &tmp, ZEND_FFI_FLAG_CONST, 0, 0);
|
||||
zend_ffi_cdata_to_zval(NULL, *(void**)ptr, ZEND_FFI_TYPE(type->pointer.type), BP_VAR_R, &tmp, ZEND_FFI_FLAG_CONST, 0);
|
||||
ht = zend_new_array(1);
|
||||
zend_hash_index_add_new(ht, 0, &tmp);
|
||||
*is_temp = 1;
|
||||
@@ -1994,7 +1985,7 @@ static HashTable *zend_ffi_cdata_get_debug_info(zval *object, int *is_temp) /* {
|
||||
if (key) {
|
||||
if (!f->bits) {
|
||||
void *f_ptr = (void*)(((char*)ptr) + f->offset);
|
||||
zend_ffi_cdata_to_zval(NULL, f_ptr, ZEND_FFI_TYPE(f->type), BP_VAR_R, &tmp, ZEND_FFI_FLAG_CONST, 0, type->attr & ZEND_FFI_ATTR_UNION);
|
||||
zend_ffi_cdata_to_zval(NULL, f_ptr, ZEND_FFI_TYPE(f->type), BP_VAR_R, &tmp, ZEND_FFI_FLAG_CONST, 0);
|
||||
zend_hash_add(ht, key, &tmp);
|
||||
} else {
|
||||
zend_ffi_bit_field_to_zval(ptr, f, &tmp);
|
||||
@@ -2007,7 +1998,7 @@ static HashTable *zend_ffi_cdata_get_debug_info(zval *object, int *is_temp) /* {
|
||||
case ZEND_FFI_TYPE_ARRAY:
|
||||
ht = zend_new_array(type->array.length);
|
||||
for (n = 0; n < type->array.length; n++) {
|
||||
zend_ffi_cdata_to_zval(NULL, ptr, ZEND_FFI_TYPE(type->array.type), BP_VAR_R, &tmp, ZEND_FFI_FLAG_CONST, 0, 0);
|
||||
zend_ffi_cdata_to_zval(NULL, ptr, ZEND_FFI_TYPE(type->array.type), BP_VAR_R, &tmp, ZEND_FFI_FLAG_CONST, 0);
|
||||
zend_hash_index_add(ht, n, &tmp);
|
||||
ptr = (void*)(((char*)ptr) + ZEND_FFI_TYPE(type->array.type)->size);
|
||||
}
|
||||
@@ -2363,7 +2354,7 @@ static zval *zend_ffi_read_var(zval *object, zval *member, int read_type, void *
|
||||
|
||||
if (ffi->symbols) {
|
||||
sym = zend_hash_find_ptr(ffi->symbols, var_name);
|
||||
if (sym && sym->kind != ZEND_FFI_SYM_VAR && sym->kind != ZEND_FFI_SYM_CONST && sym->kind != ZEND_FFI_SYM_FUNC) {
|
||||
if (sym && sym->kind != ZEND_FFI_SYM_VAR && sym->kind != ZEND_FFI_SYM_CONST) {
|
||||
sym = NULL;
|
||||
}
|
||||
}
|
||||
@@ -2376,25 +2367,7 @@ static zval *zend_ffi_read_var(zval *object, zval *member, int read_type, void *
|
||||
zend_tmp_string_release(tmp_var_name);
|
||||
|
||||
if (sym->kind == ZEND_FFI_SYM_VAR) {
|
||||
zend_ffi_cdata_to_zval(NULL, sym->addr, ZEND_FFI_TYPE(sym->type), read_type, rv, (zend_ffi_flags)sym->is_const, 0, 0);
|
||||
} else if (sym->kind == ZEND_FFI_SYM_FUNC) {
|
||||
zend_ffi_cdata *cdata;
|
||||
zend_ffi_type *new_type = emalloc(sizeof(zend_ffi_type));
|
||||
|
||||
new_type->kind = ZEND_FFI_TYPE_POINTER;
|
||||
new_type->attr = 0;
|
||||
new_type->size = sizeof(void*);
|
||||
new_type->align = _Alignof(void*);
|
||||
new_type->pointer.type = ZEND_FFI_TYPE(sym->type);
|
||||
|
||||
cdata = emalloc(sizeof(zend_ffi_cdata));
|
||||
zend_ffi_object_init(&cdata->std, zend_ffi_cdata_ce);
|
||||
cdata->std.handlers = &zend_ffi_cdata_handlers;
|
||||
cdata->type = ZEND_FFI_TYPE_MAKE_OWNED(new_type);
|
||||
cdata->flags = ZEND_FFI_FLAG_CONST;
|
||||
cdata->ptr_holder = sym->addr;
|
||||
cdata->ptr = &cdata->ptr_holder;
|
||||
ZVAL_OBJ(rv, &cdata->std);
|
||||
zend_ffi_cdata_to_zval(NULL, sym->addr, ZEND_FFI_TYPE(sym->type), read_type, rv, (zend_ffi_flags)sym->is_const, 0);
|
||||
} else {
|
||||
ZVAL_LONG(rv, sym->value);
|
||||
}
|
||||
@@ -2749,7 +2722,7 @@ static ZEND_FUNCTION(ffi_trampoline) /* {{{ */
|
||||
free_alloca(arg_values, arg_values_use_heap);
|
||||
}
|
||||
|
||||
zend_ffi_cdata_to_zval(NULL, ret, ZEND_FFI_TYPE(type->func.ret_type), BP_VAR_R, return_value, 0, 1, 0);
|
||||
zend_ffi_cdata_to_zval(NULL, ret, ZEND_FFI_TYPE(type->func.ret_type), BP_VAR_R, return_value, 0, 1);
|
||||
free_alloca(ret, ret_use_heap);
|
||||
|
||||
exit:
|
||||
@@ -5043,8 +5016,6 @@ ZEND_MINIT_FUNCTION(ffi)
|
||||
zend_ffi_handlers.get_properties = zend_fake_get_properties;
|
||||
zend_ffi_handlers.get_gc = zend_fake_get_gc;
|
||||
|
||||
zend_declare_class_constant_long(zend_ffi_ce, "__BIGGEST_ALIGNMENT__", sizeof("__BIGGEST_ALIGNMENT__")-1, __BIGGEST_ALIGNMENT__);
|
||||
|
||||
INIT_NS_CLASS_ENTRY(ce, "FFI", "CData", NULL);
|
||||
zend_ffi_cdata_ce = zend_register_internal_class(&ce);
|
||||
zend_ffi_cdata_ce->ce_flags |= ZEND_ACC_FINAL;
|
||||
@@ -6376,6 +6347,11 @@ void zend_ffi_set_abi(zend_ffi_dcl *dcl, uint16_t abi) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#ifndef __BIGGEST_ALIGNMENT__
|
||||
/* XXX need something better, perhaps with regard to SIMD, etc. */
|
||||
# define __BIGGEST_ALIGNMENT__ sizeof(size_t)
|
||||
#endif
|
||||
|
||||
#define SIMPLE_ATTRIBUTES(_) \
|
||||
_(cdecl) \
|
||||
_(fastcall) \
|
||||
|
||||
+1
-1
@@ -200,7 +200,7 @@ typedef struct _zend_ffi_val {
|
||||
uint64_t u64;
|
||||
int64_t i64;
|
||||
zend_ffi_double d;
|
||||
signed char ch;
|
||||
char ch;
|
||||
struct {
|
||||
const char *str;
|
||||
size_t len;
|
||||
|
||||
Loaded 100 of 621 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user