Skip to content

Commit dcd59e4

Browse files
committed
Merge remote-tracking branch 'origin/master' into asan_zend_alloc
2 parents e88ec6d + f129586 commit dcd59e4

File tree

12 files changed

+106
-68
lines changed

12 files changed

+106
-68
lines changed

Zend/tests/gh18833.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Bug #18833 (Use after free with weakmaps dependent on destruction order)
2+
GH-18833 (Use after free with weakmaps dependent on destruction order)
33
--FILE--
44
<?php
55

Zend/zend_objects_API.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_free_object_storage(zend_objects_
101101
if (!(OBJ_FLAGS(obj) & IS_OBJ_FREE_CALLED)) {
102102
GC_ADD_FLAGS(obj, IS_OBJ_FREE_CALLED);
103103
if (obj->handlers->free_obj != zend_object_std_dtor
104-
|| (OBJ_FLAGS(obj) & IS_OBJ_WEAKLY_REFERENCED)
104+
|| (OBJ_FLAGS(obj) & IS_OBJ_WEAKLY_REFERENCED)
105105
) {
106106
GC_ADDREF(obj);
107107
obj->handlers->free_obj(obj);

ext/iconv/tests/translit-failure.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Translit failure
44
iconv
55
--SKIPIF--
66
<?php
7-
( ICONV_IMPL != "libiconv" ) and die("skip ICONV_IMPL != \"libiconv\"");
7+
( ICONV_IMPL != "libiconv" && ICONV_IMPL != "\"libiconv\"" ) and die("skip ICONV_IMPL != \"libiconv\"");
88
?>
99
--INI--
1010
error_reporting=2039

ext/iconv/tests/translit-utf8.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Translit UTF-8 quotes
44
iconv
55
--SKIPIF--
66
<?php
7-
( ICONV_IMPL != "libiconv" ) and die("skip ICONV_IMPL != \"libiconv\"");
7+
( ICONV_IMPL != "libiconv" && ICONV_IMPL != "\"libiconv\"" ) and die("skip ICONV_IMPL != \"libiconv\"");
88
?>
99
--INI--
1010
error_reporting=2047

ext/intl/listformatter/listformatter.stub.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@
88
*/
99
final class IntlListFormatter {
1010

11+
#if U_ICU_VERSION_MAJOR_NUM >= 67
1112
/** @cvalue ULISTFMT_TYPE_AND */
1213
public const int TYPE_AND = UNKNOWN;
14+
#else
15+
/** @cvalue INTL_LISTFORMATTER_FALLBACK_TYPE_AND */
16+
public const int TYPE_AND = UNKNOWN;
17+
#endif
1318

1419
#if U_ICU_VERSION_MAJOR_NUM >= 67
1520
/** @cvalue ULISTFMT_TYPE_OR */
@@ -19,8 +24,13 @@ final class IntlListFormatter {
1924
public const int TYPE_UNITS = UNKNOWN;
2025
#endif
2126

27+
#if U_ICU_VERSION_MAJOR_NUM >= 67
2228
/** @cvalue ULISTFMT_WIDTH_WIDE */
2329
public const int WIDTH_WIDE = UNKNOWN;
30+
#else
31+
/** @cvalue INTL_LISTFORMATTER_FALLBACK_WIDTH_WIDE */
32+
public const int WIDTH_WIDE = UNKNOWN;
33+
#endif
2434

2535
#if U_ICU_VERSION_MAJOR_NUM >= 67
2636
/** @cvalue ULISTFMT_WIDTH_SHORT */

ext/intl/listformatter/listformatter_arginfo.h

Lines changed: 21 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/intl/listformatter/listformatter_class.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#include "php.h"
1616
#include "php_intl.h"
1717
#include <unicode/ulistformatter.h>
18-
#include "listformatter_arginfo.h"
1918
#include "listformatter_class.h"
19+
#include "listformatter_arginfo.h"
2020
#include "intl_convert.h"
2121

2222
static zend_object_handlers listformatter_handlers;
@@ -53,8 +53,13 @@ PHP_METHOD(IntlListFormatter, __construct)
5353
ListFormatter_object *obj = Z_INTL_LISTFORMATTER_P(ZEND_THIS);
5454
char* locale;
5555
size_t locale_len = 0;
56-
zend_long type = ULISTFMT_TYPE_AND;
57-
zend_long width = ULISTFMT_WIDTH_WIDE;
56+
#if U_ICU_VERSION_MAJOR_NUM >= 67
57+
zend_long type = ULISTFMT_TYPE_AND;
58+
zend_long width = ULISTFMT_WIDTH_WIDE;
59+
#else
60+
zend_long type = INTL_LISTFORMATTER_FALLBACK_TYPE_AND;
61+
zend_long width = INTL_LISTFORMATTER_FALLBACK_WIDTH_WIDE;
62+
#endif
5863
ZEND_PARSE_PARAMETERS_START(1, 3)
5964
Z_PARAM_STRING(locale, locale_len)
6065
Z_PARAM_OPTIONAL
@@ -90,12 +95,12 @@ PHP_METHOD(IntlListFormatter, __construct)
9095

9196
LISTFORMATTER_OBJECT(obj) = ulistfmt_openForType(locale, type, width, &status);
9297
#else
93-
if (type != ULISTFMT_TYPE_AND) {
98+
if (type != INTL_LISTFORMATTER_FALLBACK_TYPE_AND) {
9499
zend_argument_value_error(2, "contains an unsupported type. ICU 66 and below only support IntlListFormatter::TYPE_AND");
95100
RETURN_THROWS();
96101
}
97102

98-
if (width != ULISTFMT_WIDTH_WIDE) {
103+
if (width != INTL_LISTFORMATTER_FALLBACK_WIDTH_WIDE) {
99104
zend_argument_value_error(3, "contains an unsupported width. ICU 66 and below only support IntlListFormatter::WIDTH_WIDE");
100105
RETURN_THROWS();
101106
}

ext/intl/listformatter/listformatter_class.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,7 @@ static inline ListFormatter_object *php_intl_listformatter_fetch_object(zend_obj
4949
void listformatter_register_class( void );
5050
extern zend_class_entry *ListFormatter_ce_ptr;
5151

52+
#define INTL_LISTFORMATTER_FALLBACK_TYPE_AND 0
53+
#define INTL_LISTFORMATTER_FALLBACK_WIDTH_WIDE 0
54+
5255
#endif // LISTFORMATTER_CLASS_H

ext/pdo_sqlite/pdo_sqlite.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Sqlite extends \PDO
3939
/** @cvalue PDO_SQLITE_ATTR_EXPLAIN_STATEMENT */
4040
public const int ATTR_EXPLAIN_STATEMENT = UNKNOWN;
4141

42-
#if SQLITE_VERSION_NUMBER >= 3041000
42+
#if SQLITE_VERSION_NUMBER >= 3043000
4343
public const int EXPLAIN_MODE_PREPARED = 0;
4444
public const int EXPLAIN_MODE_EXPLAIN = 1;
4545
public const int EXPLAIN_MODE_EXPLAIN_QUERY_PLAN = 2;

ext/pdo_sqlite/pdo_sqlite_arginfo.h

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)