Compare commits

..
11 Commits
Author SHA1 Message Date
Remi Collet 260468acea Update versions for PHP 7.2.16 2019-03-05 10:49:17 +00:00
Remi Collet 4b605ea89f Update NEWS for PHP 7.2.16 2019-03-05 10:49:16 +00:00
Remi Collet fec3564025 add NEWS entry 2019-03-05 07:34:56 +01:00
Stanislav Malyshev c3c5cc8536 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77630 - safer rename() procedure
2019-03-05 07:34:13 +01:00
Anatol Belski feebf5a2cf Fix test portability 2019-03-05 07:33:54 +01:00
Remi Collet 5829fd84b4 add NEWS entries 2019-03-04 11:13:37 +01:00
Stanislav Malyshev 5f5e9cd610 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77586 - phar_tar_writeheaders_int() buffer overflow
2019-03-04 11:10:59 +01:00
Stanislav Malyshev b4cece7b60 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fix test error message
  Fix bug #77563 - Uninitialized read in exif_process_IFD_in_MAKERNOTE
  Fix bug #77540 - Invalid Read on exif_process_SOFn
  Fix integer overflows on 32-bits
  Fix #77431 SplFileInfo::__construct() accepts NUL bytes
  Fix bug #77396 - Null Pointer Dereference in phar_create_or_parse_filename
2019-03-04 11:10:33 +01:00
Remi Collet 39b75e42db Update NEWS for 7.2.16 2019-02-19 10:14:34 +00:00
Remi Collet 2e3d77718d Update CREDITS for PHP 7.2.16RC1 2019-02-19 09:57:31 +00:00
Remi Collet 7261099812 Update NEWS for PHP 7.2.16RC1 2019-02-19 09:57:31 +00:00
72 changed files with 238 additions and 1009 deletions

No files matched your search

+5 -17
View File
@@ -1,19 +1,17 @@
# https://editorconfig.org/
# http://editorconfig.org/
root = true
[*]
tab_width = 4
[*.{c,h,y,awk,w32,bat,mk,frag,cpp}]
[*.{c,h,awk,w32,bat,mk,frag}]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = tab
tab_width = 4
trim_trailing_whitespace = true
insert_final_newline = true
[*.{php,phpt,inc}]
[*.{php,phpt}]
charset = utf-8
end_of_line = lf
indent_size = 4
@@ -33,15 +31,5 @@ insert_final_newline = true
charset = utf-8
end_of_line = lf
indent_style = space
trim_trailing_whitespace = true
trim_trailing_whitespace = false
insert_final_newline = true
max_line_length = 80
[COMMIT_EDITMSG]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 80
-64
View File
@@ -1,69 +1,5 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
04 Apr 2019, PHP 7.2.17
- Core:
. Fixed bug #77738 (Nullptr deref in zend_compile_expr). (Laruence)
. Fixed bug #77660 (Segmentation fault on break 2147483648). (Laruence)
. Fixed bug #77652 (Anonymous classes can lose their interface information).
(Nikita)
. Fixed bug #77676 (Unable to run tests when building shared extension on
AIX). (Kevin Adler)
- Bcmath:
. Fixed bug #77742 (bcpow() implementation related to gcc compiler
optimization). (Nikita)
- COM:
. Fixed bug #77578 (Crash when php unload). (cmb)
- Date:
. Fixed bug #50020 (DateInterval:createDateFromString() silently fails).
(Derick)
. Fixed bug #75113 (Added DatePeriod::getRecurrences() method). (Ignace
Nyamagana Butera)
- EXIF:
. Fixed bug #77753 (Heap-buffer-overflow in php_ifd_get32s). (Stas)
. Fixed bug #77831 (Heap-buffer-overflow in exif_iif_add_value). (Stas)
- FPM:
. Fixed bug #77677 (FPM fails to build on AIX due to missing WCOREDUMP).
(Kevin Adler)
- GD:
. Fixed bug #77700 (Writing truecolor images as GIF ignores interlace flag).
(cmb)
- MySQLi:
. Fixed bug #77597 (mysqli_fetch_field hangs scripts). (Nikita)
- Opcache:
. Fixed bug #77691 (Opcache passes wrong value for inline array push
assignments). (Nikita)
. Fixed bug #77743 (Incorrect pi node insertion for jmpznz with identical
successors). (Nikita)
- phpdbg:
. Fixed bug #77767 (phpdbg break cmd aliases listed in help do not match
actual aliases). (Miriam Lauter)
- sodium:
. Fixed bug #77646 (sign_detached() strings not terminated). (Frank)
- SQLite3:
. Added sqlite3.defensive INI directive. (BohwaZ)
- Standard:
. Fixed bug #77664 (Segmentation fault when using undefined constant in
custom wrapper). (Laruence)
. Fixed bug #77669 (Crash in extract() when overwriting extracted array).
(Nikita)
. Fixed bug #76717 (var_export() does not create a parsable value for
PHP_INT_MIN). (Nikita)
. Fixed bug #77765 (FTP stream wrapper should set the directory as
executable). (Vlad Temian)
07 Mar 2019, PHP 7.2.16
- Core:
-6
View File
@@ -1,6 +0,0 @@
<?php
return [
'I' => function() {
return new class implements I {};
},
];
-16
View File
@@ -1,16 +0,0 @@
--TEST--
Bug #77652: Anonymous classes can lose their interface information
--FILE--
<?php
interface I {}
require __DIR__ . '/bug77652.inc';
$data = require __DIR__ . '/bug77652.inc';
print_r(class_implements($data['I']()));
?>
--EXPECT--
Array
(
[I] => I
)
-10
View File
@@ -1,10 +0,0 @@
--TEST--
Bug #77660 (Segmentation fault on break 2147483648)
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--FILE--
<?php
for(;;) break 2147483648;
?>
--EXPECTF--
Fatal error: Cannot 'break' 2147483648 levels in %sbug77660.php on line %d
-8
View File
@@ -1,8 +0,0 @@
--TEST--
Bug #77738 (Nullptr deref in zend_compile_expr)
--FILE--
<?php
__COMPILER_HALT_OFFSET__;
; // <- important
--EXPECTF--
Warning: Use of undefined constant __COMPILER_HALT_OFFSET__ - assumed '__COMPILER_HALT_OFFSET__' %sbug77738.php on line %d
@@ -1,30 +0,0 @@
--TEST--
Calling exception getters when properties hold references
--FILE--
<?php
class MyException extends Exception {
public function __construct(&$refMsg, &$refCode, &$refFile, &$refLine) {
$this->message =& $refMsg;
$this->code =& $refCode;
$this->file =& $refFile;
$this->line =& $refLine;
}
}
$refMsg = "foo";
$refCode = 0;
$refFile = "foobar";
$refLine = 42;
$ex = new MyException($refMsg, $refCode, $refFile, $refLine);
var_dump($ex->getMessage());
var_dump($ex->getCode());
var_dump($ex->getFile());
var_dump($ex->getLine());
?>
--EXPECT--
string(3) "foo"
int(0)
string(6) "foobar"
int(42)
-14
View File
@@ -1,14 +0,0 @@
--TEST--
Bug object gc not working in shutdown
--FILE--
<?php
ini_set('memory_limit', '2M');
register_shutdown_function(function () {
for ($n = 1000 * 1000; $n--;) {
new stdClass;
}
echo "OK\n";
});
?>
--EXPECT--
OK
+5 -27
View File
@@ -4508,7 +4508,7 @@ void zend_compile_break_continue(zend_ast *ast) /* {{{ */
zend_ast *depth_ast = ast->child[0];
zend_op *opline;
zend_long depth;
int depth;
ZEND_ASSERT(ast->kind == ZEND_AST_BREAK || ast->kind == ZEND_AST_CONTINUE);
@@ -4535,7 +4535,7 @@ void zend_compile_break_continue(zend_ast *ast) /* {{{ */
ast->kind == ZEND_AST_BREAK ? "break" : "continue");
} else {
if (!zend_handle_loops_and_finally_ex(depth, NULL)) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot '%s' " ZEND_LONG_FMT " level%s",
zend_error_noreturn(E_COMPILE_ERROR, "Cannot '%s' %d level%s",
ast->kind == ZEND_AST_BREAK ? "break" : "continue",
depth, depth == 1 ? "" : "s");
}
@@ -6365,32 +6365,10 @@ void zend_compile_class_decl(zend_ast *ast) /* {{{ */
if (!zend_hash_exists(CG(class_table), lcname)) {
zend_hash_add_ptr(CG(class_table), lcname, ce);
} else {
/* This anonymous class has been included, reuse the existing definition.
* NB: This behavior is buggy, and this should always result in a separate
* class declaration. However, until the problem of RTD key collisions is
* solved, this gives a behavior close to what is expected. */
/* this anonymous class has been included */
zval zv;
ZVAL_PTR(&zv, ce);
destroy_zend_class(&zv);
ce = zend_hash_find_ptr(CG(class_table), lcname);
/* Manually replicate emission of necessary inheritance opcodes here. We cannot
* reuse the general code, as we only want to emit the opcodes, without modifying
* the reused class definition. */
if (ce->ce_flags & ZEND_ACC_IMPLEMENT_TRAITS) {
zend_emit_op(NULL, ZEND_BIND_TRAITS, &declare_node, NULL);
}
if (implements_ast) {
zend_ast_list *iface_list = zend_ast_get_list(implements_ast);
uint32_t i;
for (i = 0; i < iface_list->children; i++) {
opline = zend_emit_op(NULL, ZEND_ADD_INTERFACE, &declare_node, NULL);
opline->op2_type = IS_CONST;
opline->op2.constant = zend_add_class_name_literal(CG(active_op_array),
zend_resolve_class_name_ast(iface_list->child[i]));
}
zend_emit_op(NULL, ZEND_VERIFY_ABSTRACT_CLASS, &declare_node, NULL);
}
return;
}
} else {
@@ -7673,11 +7651,11 @@ void zend_compile_const(znode *result, zend_ast *ast) /* {{{ */
if (zend_string_equals_literal(resolved_name, "__COMPILER_HALT_OFFSET__") || (name_ast->attr != ZEND_NAME_RELATIVE && zend_string_equals_literal(orig_name, "__COMPILER_HALT_OFFSET__"))) {
zend_ast *last = CG(ast);
while (last && last->kind == ZEND_AST_STMT_LIST) {
while (last->kind == ZEND_AST_STMT_LIST) {
zend_ast_list *list = zend_ast_get_list(last);
last = list->child[list->children-1];
}
if (last && last->kind == ZEND_AST_HALT_COMPILER) {
if (last->kind == ZEND_AST_HALT_COMPILER) {
result->op_type = IS_CONST;
ZVAL_LONG(&result->u.constant, Z_LVAL_P(zend_ast_get_zval(last->child[0])));
zend_string_release(resolved_name);
+12 -24
View File
@@ -401,13 +401,11 @@ ZEND_METHOD(error_exception, __construct)
Get the file in which the exception occurred */
ZEND_METHOD(exception, getFile)
{
zval *prop, rv;
zval rv;
DEFAULT_0_PARAMS;
prop = GET_PROPERTY(getThis(), ZEND_STR_FILE);
ZVAL_DEREF(prop);
ZVAL_COPY(return_value, prop);
ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_FILE));
}
/* }}} */
@@ -415,13 +413,11 @@ ZEND_METHOD(exception, getFile)
Get the line in which the exception occurred */
ZEND_METHOD(exception, getLine)
{
zval *prop, rv;
zval rv;
DEFAULT_0_PARAMS;
prop = GET_PROPERTY(getThis(), ZEND_STR_LINE);
ZVAL_DEREF(prop);
ZVAL_COPY(return_value, prop);
ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_LINE));
}
/* }}} */
@@ -429,13 +425,11 @@ ZEND_METHOD(exception, getLine)
Get the exception message */
ZEND_METHOD(exception, getMessage)
{
zval *prop, rv;
zval rv;
DEFAULT_0_PARAMS;
prop = GET_PROPERTY(getThis(), ZEND_STR_MESSAGE);
ZVAL_DEREF(prop);
ZVAL_COPY(return_value, prop);
ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_MESSAGE));
}
/* }}} */
@@ -443,13 +437,11 @@ ZEND_METHOD(exception, getMessage)
Get the exception code */
ZEND_METHOD(exception, getCode)
{
zval *prop, rv;
zval rv;
DEFAULT_0_PARAMS;
prop = GET_PROPERTY(getThis(), ZEND_STR_CODE);
ZVAL_DEREF(prop);
ZVAL_COPY(return_value, prop);
ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_CODE));
}
/* }}} */
@@ -457,13 +449,11 @@ ZEND_METHOD(exception, getCode)
Get the stack trace for the location in which the exception occurred */
ZEND_METHOD(exception, getTrace)
{
zval *prop, rv;
zval rv;
DEFAULT_0_PARAMS;
prop = GET_PROPERTY(getThis(), ZEND_STR_TRACE);
ZVAL_DEREF(prop);
ZVAL_COPY(return_value, prop);
ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_TRACE));
}
/* }}} */
@@ -471,13 +461,11 @@ ZEND_METHOD(exception, getTrace)
Get the exception severity */
ZEND_METHOD(error_exception, getSeverity)
{
zval *prop, rv;
zval rv;
DEFAULT_0_PARAMS;
prop = GET_PROPERTY(getThis(), ZEND_STR_SEVERITY);
ZVAL_DEREF(prop);
ZVAL_COPY(return_value, prop);
ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_SEVERITY));
}
/* }}} */
+2 -3
View File
@@ -230,9 +230,8 @@ struct _zend_executor_globals {
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
};
#define EG_FLAGS_INITIAL (0)
#define EG_FLAGS_IN_SHUTDOWN (1<<0)
#define EG_FLAGS_OBJECT_STORE_NO_REUSE (1<<1)
#define EG_FLAGS_INITIAL 0x00
#define EG_FLAGS_IN_SHUTDOWN 0x01
struct _zend_ini_scanner_globals {
zend_file_handle *yy_in;
+2 -3
View File
@@ -43,7 +43,6 @@ ZEND_API void zend_objects_store_destroy(zend_objects_store *objects)
ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects)
{
EG(flags) |= EG_FLAGS_OBJECT_STORE_NO_REUSE;
if (objects->top > 1) {
uint32_t i;
for (i = 1; i < objects->top; i++) {
@@ -134,10 +133,10 @@ ZEND_API void zend_objects_store_put(zend_object *object)
{
int handle;
/* When in shutdown sequence - do not reuse previously freed handles, to make sure
/* When in shutdown sequesnce - do not reuse previously freed handles, to make sure
* the dtors for newly created objects are called in zend_objects_store_call_destructors() loop
*/
if (EG(objects_store).free_list_head != -1 && EXPECTED(!(EG(flags) & EG_FLAGS_OBJECT_STORE_NO_REUSE))) {
if (!(EG(flags) & EG_FLAGS_IN_SHUTDOWN) && EG(objects_store).free_list_head != -1) {
handle = EG(objects_store).free_list_head;
EG(objects_store).free_list_head = GET_OBJ_BUCKET_NUMBER(EG(objects_store).object_buckets[handle]);
} else {
+7 -3
View File
@@ -836,11 +836,15 @@ dnl from object_var in build-dir.
dnl
AC_DEFUN([PHP_SHARED_MODULE],[
install_modules="install-modules"
suffix=la
case $host_alias in
*aix*[)]
additional_flags="-Wl,-G"
suffix=so
link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$3'/$1.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) && mv -f '$3'/.libs/$1.so '$3'/$1.so'
;;
*[)]
suffix=la
link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)'
;;
esac
@@ -855,7 +859,7 @@ AC_DEFUN([PHP_SHARED_MODULE],[
\$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir)
$3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
\$(LIBTOOL) --mode=link ifelse($4,,[\$(CC)],[\$(CXX)]) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) $additional_flags -o [\$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)
$link_cmd
EOF
])
+2 -2
View File
@@ -107,8 +107,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=7
PHP_MINOR_VERSION=2
PHP_RELEASE_VERSION=17
PHP_EXTRA_VERSION="-dev"
PHP_RELEASE_VERSION=16
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
+5 -12
View File
@@ -54,19 +54,12 @@ bc_num2long (num)
/* Extract the int value, ignore the fraction. */
val = 0;
nptr = num->n_value;
for (index = num->n_len; index > 0; index--) {
char n = *nptr++;
for (index=num->n_len; (index>0) && (val<=(LONG_MAX/BASE)); index--)
val = val*BASE + *nptr++;
if (val > LONG_MAX/BASE) {
return 0;
}
val *= BASE;
if (val > LONG_MAX - n) {
return 0;
}
val += n;
}
/* Check for overflow. If overflow, return zero. */
if (index>0) val = 0;
if (val < 0) val = 0;
/* Return the value. */
if (num->n_sign == PLUS)
+2 -2
View File
@@ -225,8 +225,8 @@ PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode, int codepa
/* Type-library stuff */
void php_com_typelibrary_dtor(zval *pDest)
{
ITypeLib *Lib = (ITypeLib*)Z_PTR_P(pDest);
ITypeLib_Release(Lib);
ITypeLib **Lib = (ITypeLib**)Z_PTR_P(pDest);
ITypeLib_Release(*Lib);
}
PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib_via_cache(char *search_string,
-23
View File
@@ -1,23 +0,0 @@
--TEST--
Bug #77578 (Crash when php unload)
--SKIPIF--
<?php
if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available');
?>
--FILE--
<?php
// To actually be able to verify the crash during shutdown on Windows, we have
// to execute a PHP subprocess, and check its exit status.
$php = PHP_BINARY;
$ini = php_ini_loaded_file();
$iniopt = $ini ? "-c $ini" : '';
$command = "$php $iniopt -d com.autoregister_typelib=1 -r \"new COM('WbemScripting.SWbemLocator');\"";
exec($command, $output, $status);
var_dump($output, $status);
?>
===DONE===
--EXPECT--
array(0) {
}
int(0)
===DONE===
+2 -6
View File
@@ -3310,12 +3310,8 @@ PHP_FUNCTION(curl_error)
RETURN_FALSE;
}
if (ch->err.no) {
ch->err.str[CURL_ERROR_SIZE] = 0;
RETURN_STRING(ch->err.str);
} else {
RETURN_EMPTY_STRING();
}
ch->err.str[CURL_ERROR_SIZE] = 0;
RETURN_STRING(ch->err.str);
}
/* }}} */
+5 -1
View File
@@ -425,7 +425,6 @@ void _php_curl_multi_close(zend_resource *rsrc) /* {{{ */
curl_multi_cleanup(mh->multi);
zend_llist_clean(&mh->easyh);
if (mh->handlers->server_push) {
zval_ptr_dtor(&mh->handlers->server_push->func_name);
efree(mh->handlers->server_push);
}
if (mh->handlers) {
@@ -588,6 +587,11 @@ static int _php_curl_multi_setopt(php_curlm *mh, zend_long option, zval *zvalue,
ZVAL_COPY(&mh->handlers->server_push->func_name, zvalue);
mh->handlers->server_push->method = PHP_CURL_USER;
if (!Z_ISUNDEF(mh->handlers->server_push->func_name)) {
zval_ptr_dtor(&mh->handlers->server_push->func_name);
mh->handlers->server_push->fci_cache = empty_fcall_info_cache;
}
error = curl_multi_setopt(mh->multi, option, _php_server_push_callback);
if (error != CURLM_OK) {
return 0;
-77
View File
@@ -1,77 +0,0 @@
--TEST--
Bug #77535 (Invalid callback, h2 server push)
--SKIPIF--
<?php
include 'skipif.inc';
if (getenv("SKIP_ONLINE_TESTS")) {
die("skip online test");
}
$curl_version = curl_version();
if ($curl_version['version_number'] < 0x073d00) {
exit("skip: test may crash with curl < 7.61.0");
}
?>
--FILE--
<?php
class MyHttpClient
{
private $mh;
private $curl;
public function sendRequest()
{
if (false === $this->mh = curl_multi_init()) {
throw new \RuntimeException('Unable to create a new cURL multi handle');
}
$this->addServerPushCallback();
$this->curl = curl_init();
curl_setopt($this->curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
curl_setopt($this->curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
curl_setopt($this->curl, CURLOPT_HEADER, false);
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, false);
curl_setopt($this->curl, CURLOPT_FAILONERROR, false);
curl_setopt($this->curl, CURLOPT_URL, 'https://http2.golang.org/serverpush');
curl_setopt($this->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
curl_setopt($this->curl, CURLOPT_HEADERFUNCTION, function ($ch, $data) {
return \strlen($data);
});
curl_setopt($this->curl, CURLOPT_WRITEFUNCTION, function ($ch, $data) {
return \strlen($data);
});
curl_multi_add_handle($this->mh, $this->curl);
$stillRunning = null;
while (true) {
do {
$mrc = curl_multi_exec($this->mh, $stillRunning);
} while (CURLM_CALL_MULTI_PERFORM === $mrc);
$info = curl_multi_info_read($this->mh);
while (false !== $info && $info['msg'] == CURLMSG_DONE) {
if (CURLMSG_DONE !== $info['msg']) {
continue;
}
die("Start handle request.");
}
}
}
private function addServerPushCallback(): void
{
$callback = static function () {
return CURL_PUSH_OK;
};
curl_multi_setopt($this->mh, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
curl_multi_setopt($this->mh, CURLMOPT_PUSHFUNCTION, $callback);
}
}
$buzz = new MyHttpClient();
$buzz->sendRequest();
--EXPECT--
Start handle request.
+2 -33
View File
@@ -543,7 +543,6 @@ const zend_function_entry date_funcs_period[] = {
PHP_ME(DatePeriod, getStartDate, NULL, ZEND_ACC_PUBLIC)
PHP_ME(DatePeriod, getEndDate, NULL, ZEND_ACC_PUBLIC)
PHP_ME(DatePeriod, getDateInterval, NULL, ZEND_ACC_PUBLIC)
PHP_ME(DatePeriod, getRecurrences, NULL, ZEND_ACC_PUBLIC)
PHP_FE_END
};
@@ -4436,21 +4435,12 @@ PHP_FUNCTION(date_interval_create_from_date_string)
Z_PARAM_STR(time_str)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
time = timelib_strtotime(ZSTR_VAL(time_str), ZSTR_LEN(time_str), &err, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper);
if (err->error_count > 0) {
php_error_docref(NULL, E_WARNING, "Unknown or bad format (%s) at position %d (%c): %s", ZSTR_VAL(time_str),
err->error_messages[0].position, err->error_messages[0].character ? err->error_messages[0].character : ' ', err->error_messages[0].message);
RETVAL_FALSE;
goto cleanup;
}
php_date_instantiate(date_ce_interval, return_value);
time = timelib_strtotime(ZSTR_VAL(time_str), ZSTR_LEN(time_str), &err, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper);
diobj = Z_PHPINTERVAL_P(return_value);
diobj->diff = timelib_rel_time_clone(&time->relative);
diobj->initialized = 1;
cleanup:
timelib_time_dtor(time);
timelib_error_container_dtor(err);
}
@@ -4737,27 +4727,6 @@ PHP_METHOD(DatePeriod, getDateInterval)
}
/* }}} */
/* {{{ proto int DatePeriod::getRecurrences()
Get recurrences.
*/
PHP_METHOD(DatePeriod, getRecurrences)
{
php_period_obj *dpobj;
if (zend_parse_parameters_none() == FAILURE) {
return;
}
dpobj = Z_PHPPERIOD_P(getThis());
if (0 == dpobj->recurrences - dpobj->include_start_date) {
return;
}
RETURN_LONG(dpobj->recurrences - dpobj->include_start_date);
}
/* }}} */
static int check_id_allowed(char *id, zend_long what) /* {{{ */
{
if (what & PHP_DATE_TIMEZONE_GROUP_AFRICA && strncasecmp(id, "Africa/", 7) == 0) return 1;
-1
View File
@@ -112,7 +112,6 @@ PHP_METHOD(DatePeriod, __set_state);
PHP_METHOD(DatePeriod, getStartDate);
PHP_METHOD(DatePeriod, getEndDate);
PHP_METHOD(DatePeriod, getDateInterval);
PHP_METHOD(DatePeriod, getRecurrences);
/* Options and Configuration */
PHP_FUNCTION(date_default_timezone_set);
-16
View File
@@ -8,7 +8,6 @@ $start = new DateTime('2000-01-01 00:00:00', new DateTimeZone('Europe/Berlin'));
$end = new DateTime('2000-01-31 00:00:00', new DateTimeZone('UTC'));
$interval = new DateInterval('P1D');
$period = new DatePeriod($start, $interval, $end);
$recurrences = 4;
var_dump($period->getStartDate()->format('Y-m-d H:i:s'));
var_dump($period->getStartDate()->getTimeZone()->getName());
@@ -17,17 +16,6 @@ var_dump($period->getEndDate()->format('Y-m-d H:i:s'));
var_dump($period->getEndDate()->getTimeZone()->getName());
var_dump($period->getDateInterval()->format('%R%y-%m-%d-%h-%i-%s'));
var_dump($period->getRecurrences());
$periodWithRecurrences = new DatePeriod($start, $interval, $recurrences);
var_dump($periodWithRecurrences->getRecurrences());
var_dump($periodWithRecurrences->getEndDate());
$periodWithRecurrencesWithoutStart = new DatePeriod($start, $interval, $recurrences, DatePeriod::EXCLUDE_START_DATE);
var_dump($periodWithRecurrences->getRecurrences());
?>
--EXPECTF--
string(19) "2000-01-01 00:00:00"
@@ -35,7 +23,3 @@ string(13) "Europe/Berlin"
string(19) "2000-01-31 00:00:00"
string(3) "UTC"
string(12) "+0-0-1-0-0-0"
NULL
int(4)
NULL
int(4)
@@ -1,10 +0,0 @@
--TEST--
Test date_interval_create_from_date_string() function : nonsense data
--FILE--
<?php
$i = date_interval_create_from_date_string("foobar");
var_dump($i);
?>
--EXPECTF--
Warning: date_interval_create_from_date_string(): Unknown or bad format (foobar) at position 0 (f): The timezone could not be found in the database in %sdate_interval_create_from_date_string_broken.php on line 2
bool(false)
@@ -4,9 +4,41 @@ Test date_interval_create_from_date_string() function : null parameter
Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
--FILE--
<?php
$i = date_interval_create_from_date_string(null);
$i = date_interval_create_from_date_string(null); //returns a empty object
var_dump($i);
?>
--EXPECTF--
Warning: date_interval_create_from_date_string(): Unknown or bad format () at position 0 ( ): Empty string in %sdate_interval_create_from_date_string_nullparam.php on line 2
bool(false)
object(DateInterval)#%d (16) {
["y"]=>
int(0)
["m"]=>
int(0)
["d"]=>
int(0)
["h"]=>
int(0)
["i"]=>
int(0)
["s"]=>
int(0)
["f"]=>
float(0)
["weekday"]=>
int(0)
["weekday_behavior"]=>
int(0)
["first_last_day_of"]=>
int(0)
["invert"]=>
int(0)
["days"]=>
int(0)
["special_type"]=>
int(0)
["special_amount"]=>
int(0)
["have_weekday_relative"]=>
int(0)
["have_special_relative"]=>
int(0)
}
+15 -32
View File
@@ -2062,10 +2062,10 @@ static int exif_file_sections_free(image_info_type *ImageInfo)
/* {{{ exif_iif_add_value
Add a value to image_info
*/
static void exif_iif_add_value(image_info_type *image_info, int section_index, char *name, int tag, int format, int length, void* value, size_t value_len, int motorola_intel)
static void exif_iif_add_value(image_info_type *image_info, int section_index, char *name, int tag, int format, int length, void* value, int motorola_intel)
{
size_t idex;
void *vptr, *vptr_end;
void *vptr;
image_info_value *info_value;
image_info_data *info_data;
image_info_data *list;
@@ -2087,12 +2087,8 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
switch (format) {
case TAG_FMT_STRING:
if (length > value_len) {
exif_error_docref("exif_iif_add_value" EXIFERR_CC, image_info, E_WARNING, "length > value_len: %d > %zu", length, value_len);
value = NULL;
}
if (value) {
length = (int)php_strnlen(value, length);
length = php_strnlen(value, length);
info_value->s = estrndup(value, length);
info_data->length = length;
} else {
@@ -2114,10 +2110,6 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
if (!length)
break;
case TAG_FMT_UNDEFINED:
if (length > value_len) {
exif_error_docref("exif_iif_add_value" EXIFERR_CC, image_info, E_WARNING, "length > value_len: %d > %zu", length, value_len);
value = NULL;
}
if (value) {
if (tag == TAG_MAKER_NOTE) {
length = (int) php_strnlen(value, length);
@@ -2148,12 +2140,7 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
} else {
info_value = &info_data->value;
}
vptr_end = (char *) value + value_len;
for (idex=0,vptr=value; idex<(size_t)length; idex++,vptr=(char *) vptr + php_tiff_bytes_per_format[format]) {
if ((char *) vptr_end - (char *) vptr < php_tiff_bytes_per_format[format]) {
exif_error_docref("exif_iif_add_value" EXIFERR_CC, image_info, E_WARNING, "Value too short");
break;
}
if (length>1) {
info_value = &info_data->value.list[idex];
}
@@ -2189,7 +2176,7 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
php_error_docref(NULL, E_WARNING, "Found value of type single");
#endif
info_value->f = *(float *)value;
break;
case TAG_FMT_DOUBLE:
#ifdef EXIF_DEBUG
php_error_docref(NULL, E_WARNING, "Found value of type double");
@@ -2207,9 +2194,9 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
/* {{{ exif_iif_add_tag
Add a tag from IFD to image_info
*/
static void exif_iif_add_tag(image_info_type *image_info, int section_index, char *name, int tag, int format, size_t length, void* value, size_t value_len)
static void exif_iif_add_tag(image_info_type *image_info, int section_index, char *name, int tag, int format, size_t length, void* value)
{
exif_iif_add_value(image_info, section_index, name, tag, format, (int)length, value, value_len, image_info->motorola_intel);
exif_iif_add_value(image_info, section_index, name, tag, format, (int)length, value, image_info->motorola_intel);
}
/* }}} */
@@ -2630,7 +2617,7 @@ static void add_assoc_image_info(zval *value, int sub_array, image_info_type *im
*/
static void exif_process_COM (image_info_type *image_info, char *value, size_t length)
{
exif_iif_add_tag(image_info, SECTION_COMMENT, "Comment", TAG_COMPUTED_VALUE, TAG_FMT_STRING, length-2, value+2, length-2);
exif_iif_add_tag(image_info, SECTION_COMMENT, "Comment", TAG_COMPUTED_VALUE, TAG_FMT_STRING, length-2, value+2);
}
/* }}} */
@@ -2645,17 +2632,17 @@ static void exif_process_CME (image_info_type *image_info, char *value, size_t l
if (length>3) {
switch(value[2]) {
case 0:
exif_iif_add_tag(image_info, SECTION_COMMENT, "Comment", TAG_COMPUTED_VALUE, TAG_FMT_UNDEFINED, length, value, length);
exif_iif_add_tag(image_info, SECTION_COMMENT, "Comment", TAG_COMPUTED_VALUE, TAG_FMT_UNDEFINED, length, value);
break;
case 1:
exif_iif_add_tag(image_info, SECTION_COMMENT, "Comment", TAG_COMPUTED_VALUE, TAG_FMT_STRING, length, value, length);
exif_iif_add_tag(image_info, SECTION_COMMENT, "Comment", TAG_COMPUTED_VALUE, TAG_FMT_STRING, length, value);
break;
default:
php_error_docref(NULL, E_NOTICE, "Undefined JPEG2000 comment encoding");
break;
}
} else {
exif_iif_add_tag(image_info, SECTION_COMMENT, "Comment", TAG_COMPUTED_VALUE, TAG_FMT_UNDEFINED, 0, NULL, 0);
exif_iif_add_tag(image_info, SECTION_COMMENT, "Comment", TAG_COMPUTED_VALUE, TAG_FMT_UNDEFINED, 0, NULL);
php_error_docref(NULL, E_NOTICE, "JPEG2000 comment section too small");
}
}
@@ -3228,10 +3215,6 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
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++) {
if (!exif_process_IFD_TAG(ImageInfo, dir_start + 2 + 12 * de,
@@ -3253,7 +3236,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, char *offset_base, size_t IFDlength, size_t displacement, int section_index, int ReadNextIFD, tag_table_type tag_table)
{
size_t length;
unsigned int tag, format, components;
int tag, format, components;
char *value_ptr, tagname[64], cbuf[32], *outside=NULL;
size_t byte_count, offset_val, fpos, fgot;
int64_t byte_count_signed;
@@ -3568,7 +3551,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
}
}
}
exif_iif_add_tag(ImageInfo, section_index, exif_get_tagname(tag, tagname, sizeof(tagname), tag_table), tag, format, components, value_ptr, byte_count);
exif_iif_add_tag(ImageInfo, section_index, exif_get_tagname(tag, tagname, sizeof(tagname), tag_table), tag, format, components, value_ptr);
EFREE_IF(outside);
return TRUE;
}
@@ -3730,10 +3713,10 @@ static void exif_process_APP12(image_info_type *ImageInfo, char *buffer, size_t
size_t l1, l2=0;
if ((l1 = php_strnlen(buffer+2, length-2)) > 0) {
exif_iif_add_tag(ImageInfo, SECTION_APP12, "Company", TAG_NONE, TAG_FMT_STRING, l1, buffer+2, l1);
exif_iif_add_tag(ImageInfo, SECTION_APP12, "Company", TAG_NONE, TAG_FMT_STRING, l1, buffer+2);
if (length > 2+l1+1) {
l2 = php_strnlen(buffer+2+l1+1, length-2-l1-1);
exif_iif_add_tag(ImageInfo, SECTION_APP12, "Info", TAG_NONE, TAG_FMT_STRING, l2, buffer+2+l1+1, l2);
exif_iif_add_tag(ImageInfo, SECTION_APP12, "Info", TAG_NONE, TAG_FMT_STRING, l2, buffer+2+l1+1);
}
}
#ifdef EXIF_DEBUG
@@ -4601,7 +4584,7 @@ PHP_FUNCTION(exif_read_data)
if (ImageInfo.Thumbnail.size) {
if (read_thumbnail) {
/* not exif_iif_add_str : this is a buffer */
exif_iif_add_tag(&ImageInfo, SECTION_THUMBNAIL, "THUMBNAIL", TAG_NONE, TAG_FMT_UNDEFINED, ImageInfo.Thumbnail.size, ImageInfo.Thumbnail.data, ImageInfo.Thumbnail.size);
exif_iif_add_tag(&ImageInfo, SECTION_THUMBNAIL, "THUMBNAIL", TAG_NONE, TAG_FMT_UNDEFINED, ImageInfo.Thumbnail.size, ImageInfo.Thumbnail.data);
}
if (!ImageInfo.Thumbnail.width || !ImageInfo.Thumbnail.height) {
/* try to evaluate if thumbnail data is present */
-16
View File
@@ -1,16 +0,0 @@
--TEST--
Bug #77753 (Heap-buffer-overflow in php_ifd_get32s)
--SKIPIF--
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
--FILE--
<?php
var_dump(exif_read_data(__DIR__."/bug77753.tiff"));
?>
DONE
--EXPECTF--
%A
Warning: exif_read_data(bug77753.tiff): Illegal IFD size: 0x006A > 0x0065 in %sbug77753.php on line %d
Warning: exif_read_data(bug77753.tiff): Invalid TIFF file in %sbug77753.php on line %d
bool(false)
DONE
Binary file not shown.
-13
View File
@@ -1,13 +0,0 @@
--TEST--
Bug #77831 (Heap-buffer-overflow in exif_iif_add_value in EXIF)
--SKIPIF--
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
--FILE--
<?php
var_dump(exif_read_data(__DIR__."/bug77831.tiff"));
?>
DONE
--EXPECTF--
%A
bool(false)
DONE
Binary file not shown.
+1 -1
View File
@@ -132,7 +132,7 @@ void gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out)
BitsPerPixel = colorstobpp(tim->colorsTotal);
/* All set, let's do it. */
GIFEncode(
out, tim->sx, tim->sy, interlace, 0, tim->transparent, BitsPerPixel,
out, tim->sx, tim->sy, tim->interlace, 0, tim->transparent, BitsPerPixel,
tim->red, tim->green, tim->blue, tim);
if (pim) {
/* Destroy palette based temporary image. */
-24
View File
@@ -1,24 +0,0 @@
--TEST--
Bug #77700 (Writing truecolor images as GIF ignores interlace flag)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
$im = imagecreatetruecolor(10, 10);
imagefilledrectangle($im, 0, 0, 9, 9, imagecolorallocate($im, 255, 255, 255));
imageinterlace($im, 1);
imagegif($im, __DIR__ . 'bug77700.gif');
$im = imagecreatefromgif(__DIR__ . 'bug77700.gif');
var_dump(imageinterlace($im));
?>
===DONE===
--EXPECT--
int(1)
===DONE===
--CLEAN--
<?php
unlink(__DIR__ . 'bug77700.gif');
?>
@@ -169,7 +169,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
goto cleanup;
}
cal = obj_cal->clone();
} else if (instanceof_function(instance_ce, php_date_get_interface_ce())) {
} else if (instanceof_function(instance_ce, php_date_get_date_ce())) {
if (intl_datetime_decompose(object, &date, &timeZone, NULL,
"datefmt_format_object") == FAILURE) {
RETURN_FALSE;
-12
View File
@@ -1,12 +0,0 @@
--TEST--
Bug #65683: Intl does not support DateTimeImmutable (using datefmt_format_object)
--FILE--
<?php
$date = date_create('1970-01-01');
$date_imm = date_create_immutable('1970-01-01');
var_dump(datefmt_format_object($date, null, 'fr_FR'));
var_dump(datefmt_format_object($date_imm, null, 'fr_FR'));
?>
--EXPECTF--
string(%d) "%s"
string(%d) "%s"
-27
View File
@@ -1,27 +0,0 @@
--TEST--
Bug #77597: mysqli_fetch_field hangs scripts
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
require_once("connect.inc");
$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
$mysqli->query('DROP TABLE IF EXISTS a');
$mysqli->query('CREATE TABLE a (b int)');
$mysqli->query('INSERT INTO a VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9)');
$mysqli->real_query("SELECT * FROM a");
$result = $mysqli->store_result(MYSQLI_STORE_RESULT_COPY_DATA);
$field = $result->fetch_field();
var_dump($field->name);
?>
--EXPECT--
string(1) "b"
+11 -11
View File
@@ -91,7 +91,7 @@ MYSQLND_METHOD(mysqlnd_result_buffered_c, initialize_result_set_rest)(MYSQLND_RE
MYSQLND_STATS * stats,
zend_bool int_and_float_native)
{
unsigned int row, field;
unsigned int i;
enum_func_status ret = PASS;
const unsigned int field_count = meta->field_count;
const uint64_t row_count = result->row_count;
@@ -106,33 +106,33 @@ MYSQLND_METHOD(mysqlnd_result_buffered_c, initialize_result_set_rest)(MYSQLND_RE
DBG_RETURN(FAIL);
}
for (row = 0; row < result->row_count; row++) {
for (i = 0; i < result->row_count; i++) {
/* (i / 8) & the_bit_for_i*/
if (initialized[row >> 3] & (1 << (row & 7))) {
if (initialized[i >> 3] & (1 << (i & 7))) {
continue;
}
rc = result->m.row_decoder(result->row_buffers[row], current_row, field_count, meta->fields, int_and_float_native, stats);
rc = result->m.row_decoder(result->row_buffers[i], current_row, field_count, meta->fields, int_and_float_native, stats);
if (rc != PASS) {
ret = FAIL;
break;
}
result->initialized_rows++;
initialized[row >> 3] |= (1 << (row & 7));
for (field = 0; field < field_count; field++) {
initialized[i >> 3] |= (1 << (i & 7));
for (i = 0; i < field_count; i++) {
/*
NULL fields are 0 length, 0 is not more than 0
String of zero size, definitely can't be the next max_length.
Thus for NULL and zero-length we are quite efficient.
*/
if (Z_TYPE(current_row[field]) == IS_STRING) {
const size_t len = Z_STRLEN(current_row[field]);
if (meta->fields[field].max_length < len) {
meta->fields[field].max_length = len;
if (Z_TYPE(current_row[i]) == IS_STRING) {
const size_t len = Z_STRLEN(current_row[i]);
if (meta->fields[i].max_length < len) {
meta->fields[i].max_length = len;
}
}
zval_ptr_dtor_nogc(&current_row[field]);
zval_ptr_dtor_nogc(&current_row[i]);
}
}
mnd_efree(current_row);
-1
View File
@@ -3,7 +3,6 @@ oci_password_change()
--SKIPIF--
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on thes
require(dirname(__FILE__).'/skipif.inc');
require(dirname(__FILE__).'/connect.inc');
if (empty($dbase)) die ("skip requires database connection string be set");
if ($test_drcp) die("skip password change not supported in DRCP Mode");
-1
View File
@@ -3,7 +3,6 @@ ocipasswordchange()
--SKIPIF--
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on thes
require(dirname(__FILE__).'/skipif.inc');
require(dirname(__FILE__).'/connect.inc');
if (empty($dbase)) die ("skip requires database connection string be set");
if ($test_drcp) die("skip password change not supported in DRCP Mode");
+5 -6
View File
@@ -1581,10 +1581,7 @@ static int replace_constant_operands(sccp_ctx *ctx) {
zend_ssa_remove_instr(ssa, opline, ssa_op);
removed_ops++;
}
} else if (ssa_op->op1_def == i &&
(ssa_op->result_def < 0 ||
(ssa->vars[ssa_op->result_def].use_chain < 0 &&
ssa->vars[ssa_op->result_def].phi_use_chain == NULL))) {
} else if (ssa_op->op1_def == i) {
/* Compound assign or incdec -> convert to direct ASSIGN */
/* Destroy previous op2 */
@@ -1598,8 +1595,10 @@ static int replace_constant_operands(sccp_ctx *ctx) {
ssa_op->op2_use_chain = -1;
}
/* We checked that result has no uses, mark unused */
if (ssa_op->result_def >= 0) {
/* Mark result unused, if possible */
if (ssa_op->result_def >= 0
&& ssa->vars[ssa_op->result_def].use_chain < 0
&& ssa->vars[ssa_op->result_def].phi_use_chain == NULL) {
if (opline->result_type & (IS_TMP_VAR|IS_VAR)) {
zend_optimizer_remove_live_range_ex(op_array, opline->result.var, var->definition);
}
+1 -5
View File
@@ -2093,6 +2093,7 @@ static uint32_t assign_dim_result_type(
tmp |= MAY_BE_RC1 | MAY_BE_RCN;
}
if (tmp & MAY_BE_ARRAY) {
tmp |= (value_type & MAY_BE_ANY) << MAY_BE_ARRAY_SHIFT;
if (value_type & MAY_BE_UNDEF) {
tmp |= MAY_BE_ARRAY_OF_NULL;
}
@@ -2113,11 +2114,6 @@ static uint32_t assign_dim_result_type(
tmp |= MAY_BE_ARRAY_KEY_STRING;
}
}
/* Only add value type if we have a key type. It might be that the key type is illegal
* for arrays. */
if (tmp & MAY_BE_ARRAY_KEY_ANY) {
tmp |= (value_type & MAY_BE_ANY) << MAY_BE_ARRAY_SHIFT;
}
}
return tmp;
}
+2 -8
View File
@@ -54,14 +54,6 @@ static zend_bool needs_pi(const zend_op_array *op_array, zend_dfg *dfg, zend_ssa
return 0;
}
/* Make sure that both sucessors of the from block aren't the same. Pi nodes are associated
* with predecessor blocks, so we can't distinguish which edge the pi belongs to. */
from_block = &ssa->cfg.blocks[from];
ZEND_ASSERT(from_block->successors_count == 2);
if (from_block->successors[0] == from_block->successors[1]) {
return 0;
}
to_block = &ssa->cfg.blocks[to];
if (to_block->predecessors_count == 1) {
/* Always place pi if one predecessor (an if branch) */
@@ -70,6 +62,8 @@ static zend_bool needs_pi(const zend_op_array *op_array, zend_dfg *dfg, zend_ssa
/* Check that the other successor of the from block does not dominate all other predecessors.
* If it does, we'd probably end up annihilating a positive+negative pi assertion. */
from_block = &ssa->cfg.blocks[from];
ZEND_ASSERT(from_block->successors_count == 2);
other_successor = from_block->successors[0] == to
? from_block->successors[1] : from_block->successors[0];
return !dominates_other_predecessors(&ssa->cfg, to_block, other_successor, from);
-26
View File
@@ -1,26 +0,0 @@
--TEST--
Bug #77691: Opcache passes wrong value for inline array push assignments
--FILE--
<?php
if (true) {
function dump($str) {
var_dump($str);
}
}
function test() {
$array = [];
dump($array[] = 'test');
dump($array);
}
test();
?>
--EXPECT--
string(4) "test"
array(1) {
[0]=>
string(4) "test"
}
-17
View File
@@ -1,17 +0,0 @@
--TEST--
Bug #77743: Incorrect pi node insertion for jmpznz with identical successors
--FILE--
<?php
function buggy($a) {
$id_country = $a;
if ($id_country === false) {
if (true) {
}
}
var_dump($id_country);
}
buggy(42);
--EXPECT--
int(42)
@@ -1,18 +0,0 @@
--TEST--
Don't add array value type is key type is illegal
--FILE--
<?php
function test(\SplObjectStorage $definitions = null) {
$argument = new stdClass;
$definitions[$argument] = 1;
$definitions[$argument] += 1;
$argument = [];
$definitions[$argument] = 1;
$definitions[$argument] += 1;
}
?>
===DONE===
--EXPECT--
===DONE===
+1 -1
View File
@@ -6494,7 +6494,7 @@ static int php_openssl_cipher_update(const EVP_CIPHER *cipher_type,
{
int i = 0;
if (mode->is_single_run_aead && !EVP_CipherUpdate(cipher_ctx, NULL, &i, NULL, (int)data_len)) {
if (mode->is_single_run_aead && !EVP_EncryptUpdate(cipher_ctx, NULL, &i, NULL, (int)data_len)) {
php_openssl_store_errors();
php_error_docref(NULL, E_WARNING, "Setting of data length failed");
return FAILURE;
+4 -31
View File
@@ -9,21 +9,9 @@ function phpt_notify($worker = WORKER_DEFAULT_NAME)
ServerClientTestCase::getInstance()->notify($worker);
}
function phpt_wait($worker = WORKER_DEFAULT_NAME, $timeout = null)
function phpt_wait($worker = WORKER_DEFAULT_NAME)
{
ServerClientTestCase::getInstance()->wait($worker, $timeout);
}
function phpt_has_sslv3() {
static $result = null;
if (!is_null($result)) {
return $result;
}
$server = @stream_socket_server('sslv3://127.0.0.1:10013');
if ($result = !!$server) {
fclose($server);
}
return $result;
ServerClientTestCase::getInstance()->wait($worker);
}
/**
@@ -133,24 +121,9 @@ class ServerClientTestCase
}
}
public function wait($worker, $timeout = null)
public function wait($worker)
{
$handle = $this->isWorker ? STDIN : $this->workerStdOut[$worker];
if ($timeout === null) {
fgets($handle);
return true;
}
stream_set_blocking($handle, false);
$read = [$handle];
$result = stream_select($read, $write, $except, $timeout);
if (!$result) {
return false;
}
fgets($handle);
stream_set_blocking($handle, true);
return true;
fgets($this->isWorker ? STDIN : $this->workerStdOut[$worker]);
}
public function notify($worker)
+73 -84
View File
@@ -12,101 +12,90 @@ $cacertFile = __DIR__ . DIRECTORY_SEPARATOR . 'bug77390-ca.pem.tmp';
$peerName = 'bug77390';
$clientCode = <<<'CODE'
$context = stream_context_create(['ssl' => ['verify_peer' => false, 'peer_name' => '%s']]);
$context = stream_context_create(['ssl' => ['verify_peer' => false, 'peer_name' => '%s']]);
phpt_wait('server');
phpt_notify('proxy');
phpt_wait('server');
phpt_notify('proxy');
phpt_wait('proxy');
$fp = stream_socket_client("ssl://127.0.0.1:10012", $errornum, $errorstr, 3000, STREAM_CLIENT_CONNECT, $context);
stream_set_blocking($fp, false);
phpt_wait('proxy');
$fp = stream_socket_client("ssl://127.0.0.1:10012", $errornum, $errorstr, 3000, STREAM_CLIENT_CONNECT, $context);
stream_set_blocking($fp, false);
$read = [$fp];
$buf = '';
$emptyChunkPrinted = false;
$warmedUp = false;
while (stream_select($read, $write, $except, 1000)) {
$chunk = stream_get_contents($fp, 4096);
$buf .= $chunk;
phpt_notify('proxy');
if (!$warmedUp) {
if ($buf !== 'warmup') {
continue;
}
$warmedUp = true;
$buf = '';
phpt_notify('server');
continue;
}
if ($chunk !== '' || !$emptyChunkPrinted) {
$emptyChunkPrinted = true;
var_dump($chunk);
}
if ($buf === 'hello, world') {
break;
}
}
phpt_notify('server');
phpt_notify('proxy');
$read = [$fp];
$buf = '';
$printed = false;
while (stream_select($read, $write, $except, 1000)) {
$chunk = stream_get_contents($fp, 4096);
if ($chunk !== "") {
var_dump($chunk);
$buf .= $chunk;
} elseif (!$printed) {
$printed = true;
var_dump($chunk);
}
if ($buf === 'hello, world') {
break;
}
}
phpt_notify('server');
phpt_notify('proxy');
CODE;
$clientCode = sprintf($clientCode, $peerName);
$serverCode = <<<'CODE'
$context = stream_context_create(['ssl' => ['local_cert' => '%s']]);
$context = stream_context_create(['ssl' => ['local_cert' => '%s']]);
$flags = STREAM_SERVER_BIND|STREAM_SERVER_LISTEN;
$fp = stream_socket_server("ssl://127.0.0.1:10011", $errornum, $errorstr, $flags, $context);
phpt_notify();
$conn = stream_socket_accept($fp);
fwrite($conn, 'warmup');
phpt_wait();
fwrite($conn, 'hello, world');
phpt_wait();
fclose($conn);
$flags = STREAM_SERVER_BIND|STREAM_SERVER_LISTEN;
$fp = stream_socket_server("ssl://127.0.0.1:10011", $errornum, $errorstr, $flags, $context);
phpt_notify();
$conn = stream_socket_accept($fp);
fwrite($conn, 'hello, world');
phpt_wait();
fclose($conn);
CODE;
$serverCode = sprintf($serverCode, $certFile);
$proxyCode = <<<'CODE'
phpt_wait();
phpt_wait();
$upstream = stream_socket_client("tcp://127.0.0.1:10011", $errornum, $errorstr, 3000, STREAM_CLIENT_CONNECT);
stream_set_blocking($upstream, false);
$upstream = stream_socket_client("tcp://127.0.0.1:10011", $errornum, $errorstr, 3000, STREAM_CLIENT_CONNECT);
stream_set_blocking($upstream, false);
$flags = STREAM_SERVER_BIND|STREAM_SERVER_LISTEN;
$server = stream_socket_server("tcp://127.0.0.1:10012", $errornum, $errorstr, $flags);
phpt_notify();
$conn = stream_socket_accept($server);
stream_set_blocking($conn, false);
$read = [$upstream, $conn];
while (stream_select($read, $write, $except, 1)) {
foreach ($read as $fp) {
$data = stream_get_contents($fp);
if ($fp === $conn) {
fwrite($upstream, $data);
} else {
if ($data !== '' && $data[0] === chr(23)) {
$parts = str_split($data, (int) ceil(strlen($data) / 3));
foreach ($parts as $part) {
fwrite($conn, $part);
phpt_wait(null, 1);
}
} else {
fwrite($conn, $data);
}
}
}
if (feof($upstream)) {
break;
}
$read = [$upstream, $conn];
}
phpt_wait();
$flags = STREAM_SERVER_BIND|STREAM_SERVER_LISTEN;
$server = stream_socket_server("tcp://127.0.0.1:10012", $errornum, $errorstr, $flags);
phpt_notify();
$conn = stream_socket_accept($server);
stream_set_blocking($conn, false);
$read = [$upstream, $conn];
while (stream_select($read, $write, $except, 1)) {
foreach ($read as $fp) {
$data = stream_get_contents($fp);
if ($fp === $conn) {
fwrite($upstream, $data);
} else {
if ($data !== '' && $data[0] === chr(23)) {
$parts = str_split($data, (int) ceil(strlen($data) / 3));
foreach ($parts as $part) {
fwrite($conn, $part);
usleep(1000);
}
} else {
fwrite($conn, $data);
}
}
}
if (feof($upstream)) {
break;
}
$read = [$upstream, $conn];
}
phpt_wait();
CODE;
include 'CertificateGenerator.inc';
@@ -116,8 +105,8 @@ $certificateGenerator->saveNewCertAsFileWithKey($peerName, $certFile);
include 'ServerClientTestCase.inc';
ServerClientTestCase::getInstance()->run($clientCode, [
'server' => $serverCode,
'proxy' => $proxyCode,
'server' => $serverCode,
'proxy' => $proxyCode,
]);
?>
--CLEAN--
+1 -1
View File
@@ -16,7 +16,7 @@ $serverCode = <<<'CODE'
$server = stream_socket_server('tls://127.0.0.1:64321', $errno, $errstr, $flags, $ctx);
phpt_notify();
for ($i = 0; $i < (phpt_has_sslv3() ? 6 : 5); $i++) {
for ($i=0; $i < 6; $i++) {
@stream_socket_accept($server, 3);
}
CODE;
+1 -1
View File
@@ -16,7 +16,7 @@ $serverCode = <<<'CODE'
$server = stream_socket_server('tlsv1.0://127.0.0.1:64321', $errno, $errstr, $flags, $ctx);
phpt_notify();
for ($i = 0; $i < (phpt_has_sslv3() ? 3 : 2); $i++) {
for ($i=0; $i < 3; $i++) {
@stream_socket_accept($server, 3);
}
CODE;
+1 -1
View File
@@ -16,7 +16,7 @@ $serverCode = <<<'CODE'
$server = stream_socket_server('tlsv1.1://127.0.0.1:64321', $errno, $errstr, $flags, $ctx);
phpt_notify();
for ($i = 0; $i < (phpt_has_sslv3() ? 3 : 2); $i++) {
for ($i=0; $i < 3; $i++) {
@stream_socket_accept($server, 3);
}
CODE;
+1 -1
View File
@@ -16,7 +16,7 @@ $serverCode = <<<'CODE'
$server = stream_socket_server('tlsv1.2://127.0.0.1:64321', $errno, $errstr, $flags, $ctx);
phpt_notify();
for ($i = 0; $i < (phpt_has_sslv3() ? 3 : 2); $i++) {
for ($i=0; $i < 3; $i++) {
@stream_socket_accept($server, 3);
}
CODE;
+1 -2
View File
@@ -1678,8 +1678,7 @@ PHP_FUNCTION(sodium_crypto_sign_detached)
zend_throw_exception(sodium_exception_ce, "signature has a bogus size", 0);
return;
}
PHP_SODIUM_ZSTR_TRUNCATE(signature, (size_t) signature_real_len);
ZSTR_VAL(signature)[signature_real_len] = 0;
ZEND_ASSERT(ZSTR_VAL(signature)[signature_real_len] == 0);
RETURN_STR(signature);
}
+7 -6
View File
@@ -97,7 +97,6 @@ static void spl_filesystem_object_destroy_object(zend_object *object) /* {{{ */
} else {
php_stream_pclose(intern->u.file.stream);
}
intern->u.file.stream = NULL;
}
break;
}
@@ -128,11 +127,13 @@ static void spl_filesystem_object_free_storage(zend_object *object) /* {{{ */
}
break;
case SPL_FS_FILE:
if (intern->u.file.open_mode) {
efree(intern->u.file.open_mode);
}
if (intern->orig_path) {
efree(intern->orig_path);
if (intern->u.file.stream) {
if (intern->u.file.open_mode) {
efree(intern->u.file.open_mode);
}
if (intern->orig_path) {
efree(intern->orig_path);
}
}
spl_filesystem_file_free_line(intern);
break;
-18
View File
@@ -1,18 +0,0 @@
--TEST--
Bug #77751: Writing to SplFileObject in ob_start gives segfault
--FILE--
<?php
echo "No crash.\n";
$logfile = new SplTempFileObject();
ob_start(function ($buffer) use ($logfile) {
$logfile->fwrite($buffer);
$logfile->fflush();
return "";
});
echo "hmm\n";
?>
--EXPECT--
No crash.
-1
View File
@@ -28,7 +28,6 @@ extern zend_module_entry sqlite3_module_entry;
ZEND_BEGIN_MODULE_GLOBALS(sqlite3)
char *extension_dir;
int dbconfig_defensive;
ZEND_END_MODULE_GLOBALS(sqlite3)
#ifdef ZTS
-9
View File
@@ -81,9 +81,6 @@ static void php_sqlite3_error(php_sqlite3_db_object *db_obj, char *format, ...)
*/
PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("sqlite3.extension_dir", NULL, PHP_INI_SYSTEM, OnUpdateString, extension_dir, zend_sqlite3_globals, sqlite3_globals)
#if SQLITE_VERSION_NUMBER >= 3026000
STD_PHP_INI_ENTRY("sqlite3.defensive", "1", PHP_INI_SYSTEM, OnUpdateBool, dbconfig_defensive, zend_sqlite3_globals, sqlite3_globals)
#endif
PHP_INI_END()
/* }}} */
@@ -169,12 +166,6 @@ PHP_METHOD(sqlite3, open)
sqlite3_set_authorizer(db_obj->db, php_sqlite3_authorizer, NULL);
}
#if SQLITE_VERSION_NUMBER >= 3026000
if (SQLITE3G(dbconfig_defensive)) {
sqlite3_db_config(db_obj->db, SQLITE_DBCONFIG_DEFENSIVE, 1, NULL);
}
#endif
if (fullpath != filename) {
efree(fullpath);
}
-40
View File
@@ -1,40 +0,0 @@
--TEST--
SQLite3 defensive mode ini setting
--SKIPIF--
<?php require_once(__DIR__ . '/skipif.inc');
if (SQLite3::version()['versionNumber'] < 3026000) {
die("skip: sqlite3 library version < 3.26: no support for defensive mode");
}
?>
--INI--
sqlite3.defensive=On
--FILE--
<?php
$db = new SQLite3(':memory:');
var_dump($db->exec('CREATE TABLE test (a, b);'));
// This does not generate an error!
var_dump($db->exec('PRAGMA writable_schema = ON;'));
var_dump($db->querySingle('PRAGMA writable_schema;'));
// Should be 1
var_dump($db->querySingle('SELECT COUNT(*) FROM sqlite_master;'));
// Should generate an error!
var_dump($db->querySingle('DELETE FROM sqlite_master;'));
// Should still be 1
var_dump($db->querySingle('SELECT COUNT(*) FROM sqlite_master;'));
?>
--EXPECTF--
bool(true)
bool(true)
int(1)
int(1)
Warning: SQLite3::querySingle(): Unable to prepare statement: 1, table sqlite_master may not be modified in %s on line %d
bool(false)
int(1)
+13 -11
View File
@@ -2528,33 +2528,35 @@ PHP_FUNCTION(extract)
break;
}
} else {
/* The array might be stored in a local variable that will be overwritten */
zval array_copy;
ZVAL_COPY(&array_copy, var_array_param);
switch (extract_type) {
case EXTR_IF_EXISTS:
count = php_extract_if_exists(Z_ARRVAL(array_copy), symbol_table);
count = php_extract_if_exists(Z_ARRVAL_P(var_array_param), symbol_table);
break;
case EXTR_OVERWRITE:
count = php_extract_overwrite(Z_ARRVAL(array_copy), symbol_table);
{
zval zv;
/* The array might be stored in a local variable that will be overwritten */
ZVAL_COPY(&zv, var_array_param);
count = php_extract_overwrite(Z_ARRVAL(zv), symbol_table);
zval_ptr_dtor(&zv);
}
break;
case EXTR_PREFIX_IF_EXISTS:
count = php_extract_prefix_if_exists(Z_ARRVAL(array_copy), symbol_table, prefix);
count = php_extract_prefix_if_exists(Z_ARRVAL_P(var_array_param), symbol_table, prefix);
break;
case EXTR_PREFIX_SAME:
count = php_extract_prefix_same(Z_ARRVAL(array_copy), symbol_table, prefix);
count = php_extract_prefix_same(Z_ARRVAL_P(var_array_param), symbol_table, prefix);
break;
case EXTR_PREFIX_ALL:
count = php_extract_prefix_all(Z_ARRVAL(array_copy), symbol_table, prefix);
count = php_extract_prefix_all(Z_ARRVAL_P(var_array_param), symbol_table, prefix);
break;
case EXTR_PREFIX_INVALID:
count = php_extract_prefix_invalid(Z_ARRVAL(array_copy), symbol_table, prefix);
count = php_extract_prefix_invalid(Z_ARRVAL_P(var_array_param), symbol_table, prefix);
break;
default:
count = php_extract_skip(Z_ARRVAL(array_copy), symbol_table);
count = php_extract_skip(Z_ARRVAL_P(var_array_param), symbol_table);
break;
}
zval_ptr_dtor(&array_copy);
}
RETURN_LONG(count);
+1 -1
View File
@@ -805,7 +805,7 @@ static int php_stream_ftp_url_stat(php_stream_wrapper *wrapper, const char *url,
if (result < 200 || result > 299) {
ssb->sb.st_mode |= S_IFREG;
} else {
ssb->sb.st_mode |= S_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH;
ssb->sb.st_mode |= S_IFDIR;
}
php_stream_write_string(stream, "TYPE I\r\n"); /* we need this since some servers refuse to accept SIZE command in ASCII mode */
-35
View File
@@ -1,35 +0,0 @@
--TEST--
Bug #77669: Crash in extract() when overwriting extracted array
--FILE--
<?php
function test($mode) {
$foo = [];
$foo["foo"] = 42;
$foo["bar"] = 24;
extract($foo, $mode, "");
$prefix_foo = [];
$prefix_foo["foo"] = 42;
$prefix_foo["bar"] = 24;
extract($prefix_foo, $mode, "prefix");
}
test(EXTR_OVERWRITE);
test(EXTR_SKIP);
test(EXTR_IF_EXISTS);
test(EXTR_PREFIX_SAME);
test(EXTR_PREFIX_ALL);
test(EXTR_PREFIX_INVALID);
test(EXTR_PREFIX_IF_EXISTS);
test(EXTR_REFS | EXTR_OVERWRITE);
test(EXTR_REFS | EXTR_SKIP);
test(EXTR_REFS | EXTR_IF_EXISTS);
test(EXTR_REFS | EXTR_PREFIX_SAME);
test(EXTR_REFS | EXTR_PREFIX_ALL);
test(EXTR_REFS | EXTR_PREFIX_INVALID);
test(EXTR_REFS | EXTR_PREFIX_IF_EXISTS);
?>
===DONE===
--EXPECT--
===DONE===
@@ -1,14 +0,0 @@
--TEST--
Bug #76717: var_export() does not create a parsable value for PHP_INT_MIN
--FILE--
<?php
$min = eval('return '.var_export(PHP_INT_MIN, true).';');
$max = eval('return '.var_export(PHP_INT_MAX, true).';');
var_dump($min === PHP_INT_MIN);
var_dump($max === PHP_INT_MAX);
?>
--EXPECT--
bool(true)
bool(true)
-19
View File
@@ -1,19 +0,0 @@
--TEST--
BUG #77664 (Segmentation fault when using undefined constant in custom wrapper)
--FILE--
<?php
class ErrorWrapper {
public $context;
public $var = self::INVALID;
}
stream_wrapper_register('error',ErrorWrapper::class);
file_get_contents('error://test');
?>
--EXPECTF--
Warning: file_get_contents(error://test): failed to open stream: operation failed in %sbug77664.php on line %d
Fatal error: Uncaught Error: Undefined class constant 'self::INVALID' in %sbug77664.php:%d
Stack trace:
#0 %sbug77664.php(%d): file_get_contents('error://test')
#1 {main}
thrown in %sbug77664.php on line %d
-22
View File
@@ -1,22 +0,0 @@
--TEST--
stat() on directory should return 40755 for ftp://
--SKIPIF--
<?php
if (array_search('ftp',stream_get_wrappers()) === FALSE) die("skip ftp wrapper not available.");
if (!function_exists('pcntl_fork')) die("skip pcntl_fork() not available.");
?>
--FILE--
<?php
require __DIR__ . "/../../../ftp/tests/server.inc";
$path = "ftp://localhost:" . $port."/www";
var_dump(stat($path)['mode']);
?>
==DONE==
--EXPECTF--
string(11) "SIZE /www
"
int(16877)
==DONE==
-7
View File
@@ -459,13 +459,6 @@ again:
smart_str_appendl(buf, "NULL", 4);
break;
case IS_LONG:
/* INT_MIN as a literal will be parsed as a float. Emit something like
* -9223372036854775807-1 to avoid this. */
if (Z_LVAL_P(struc) == ZEND_LONG_MIN) {
smart_str_append_long(buf, ZEND_LONG_MIN+1);
smart_str_appends(buf, "-1");
break;
}
smart_str_append_long(buf, Z_LVAL_P(struc));
break;
case IS_DOUBLE:
+4 -4
View File
@@ -2,7 +2,7 @@
/* edit configure.ac to change version number */
#define PHP_MAJOR_VERSION 7
#define PHP_MINOR_VERSION 2
#define PHP_RELEASE_VERSION 17
#define PHP_EXTRA_VERSION "-dev"
#define PHP_VERSION "7.2.17-dev"
#define PHP_VERSION_ID 70217
#define PHP_RELEASE_VERSION 16
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "7.2.16"
#define PHP_VERSION_ID 70216
+1 -4
View File
@@ -289,10 +289,7 @@ static void user_stream_create_object(struct php_user_stream_wrapper *uwrap, php
}
/* create an instance of our class */
if (object_init_ex(object, uwrap->ce) == FAILURE) {
ZVAL_UNDEF(object);
return;
}
object_init_ex(object, uwrap->ce);
if (context) {
add_property_resource(object, "context", context->res);
-11
View File
@@ -986,19 +986,8 @@ cli_server.color = On
;intl.use_exceptions = 0
[sqlite3]
; Directory pointing to SQLite3 extensions
; http://php.net/sqlite3.extension-dir
;sqlite3.extension_dir =
; SQLite defensive mode flag (only available from SQLite 3.26+)
; When the defensive flag is enabled, language features that allow ordinary
; SQL to deliberately corrupt the database file are disabled. This forbids
; writing directly to the schema, shadow tables (eg. FTS data tables), or
; the sqlite_dbpage virtual table.
; https://www.sqlite.org/c3ref/c_dbconfig_defensive.html
; (for older SQLite versions, this flag has no use)
sqlite3.defensive = 1
[Pcre]
;PCRE library backtracking limit.
; http://php.net/pcre.backtrack-limit
-11
View File
@@ -993,19 +993,8 @@ cli_server.color = On
;intl.use_exceptions = 0
[sqlite3]
; Directory pointing to SQLite3 extensions
; http://php.net/sqlite3.extension-dir
;sqlite3.extension_dir =
; SQLite defensive mode flag (only available from SQLite 3.26+)
; When the defensive flag is enabled, language features that allow ordinary
; SQL to deliberately corrupt the database file are disabled. This forbids
; writing directly to the schema, shadow tables (eg. FTS data tables), or
; the sqlite_dbpage virtual table.
; https://www.sqlite.org/c3ref/c_dbconfig_defensive.html
; (for older SQLite versions, this flag has no use)
sqlite3.defensive = 1
[Pcre]
;PCRE library backtracking limit.
; http://php.net/pcre.backtrack-limit
-4
View File
@@ -204,11 +204,7 @@ void fpm_children_bury() /* {{{ */
} else if (WIFSIGNALED(status)) {
const char *signame = fpm_signal_names[WTERMSIG(status)];
#ifdef WCOREDUMP
const char *have_core = WCOREDUMP(status) ? " - core dumped" : "";
#else
const char* have_core = "";
#endif
if (signame == NULL) {
signame = "";
+2 -7
View File
@@ -2819,14 +2819,9 @@ static void lsapi_sigchild( int signal )
if ( WIFSIGNALED( status ))
{
int sig_num = WTERMSIG( status );
#ifdef WCOREDUMP
const char * dump = WCOREDUMP( status ) ? "yes" : "no";
#else
const char * dump = "unknown";
#endif
int dump = WCOREDUMP( status );
lsapi_log("Child process with pid: %d was killed by signal: "
"%d, core dumped: %s\n", pid, sig_num, dump );
"%d, core dump: %d\n", pid, sig_num, dump );
}
if ( pid == s_pid_dump_debug_info )
{
+2 -2
View File
@@ -544,8 +544,8 @@ phpdbg_help_text_t phpdbg_help_text[] = {
"types:" CR CR
" **Target** **Alias** **Purpose**" CR
" **at** **@** specify breakpoint by location and condition" CR
" **del** **~** delete breakpoint by breakpoint identifier number" CR CR
" **at** **A** specify breakpoint by location and condition" CR
" **del** **d** delete breakpoint by breakpoint identifier number" CR CR
"**Break at** takes two arguments. The first is any valid target. The second "
"is a valid PHP expression which will trigger the break in "
+3 -31
View File
@@ -52,9 +52,6 @@ var PHP_MAKEFILE_FRAGMENTS = PHP_SRC_DIR + "\\Makefile.fragments.w32";
and manifest. */
var WINVER = "0x0601"; /* 7/2008r2 */
// There's a minimum requirement for bison.
var MINBISON = "3.0.0";
// There's a minimum requirement for re2c..
var MINRE2C = "0.13.4";
@@ -179,8 +176,6 @@ function probe_binary(EXE, what)
var command = 'cmd /c ""' + EXE;
if (what == "version") {
command = command + '" -v"';
} else if (what == "longversion") {
command = command + '" --version"';
}
var version = execute(command + '" 2>&1"');
@@ -2908,26 +2903,7 @@ function toolset_setup_project_tools()
// we don't want to define LIB, as that will override the default library path
// that is set in that env var
PATH_PROG('lib', null, 'MAKE_LIB');
var BISON = PATH_PROG('bison');
if (BISON) {
var BISONVERS = probe_binary(BISON, "longversion");
STDOUT.WriteLine(' Detected bison version ' + BISONVERS);
if (BISONVERS.match(/^\d+.\d+$/)) {
BISONVERS += ".0";
}
var hm = BISONVERS.match(/(\d+)\.(\d+)\.(\d+)/);
var nm = MINBISON.match(/(\d+)\.(\d+)\.(\d+)/);
var intvers = (hm[1]-0)*10000 + (hm[2]-0)*100 + (hm[3]-0);
var intmin = (nm[1]-0)*10000 + (nm[2]-0)*100 + (nm[3]-0);
if (intvers < intmin) {
ERROR('The minimum bison version requirement is ' + MINBISON);
}
} else {
if (!PATH_PROG('bison')) {
ERROR('bison is required')
}
@@ -2960,15 +2936,11 @@ function toolset_setup_project_tools()
PATH_PROG('lemon');
// avoid picking up midnight commander from cygwin
if (!PATH_PROG('mc', WshShell.Environment("Process").Item("PATH"))) {
ERROR('mc is required')
}
PATH_PROG('mc', WshShell.Environment("Process").Item("PATH"));
// Try locating the manifest tool
if (VS_TOOLSET) {
if (!PATH_PROG('mt', WshShell.Environment("Process").Item("PATH"))) {
ERROR('mt is required')
}
PATH_PROG('mt', WshShell.Environment("Process").Item("PATH"));
}
}
/* Get compiler if the toolset is supported */