diff --git a/.gitignore b/.gitignore index 77189e32ca8..13d0a26b704 100644 --- a/.gitignore +++ b/.gitignore @@ -229,3 +229,8 @@ win32/wsyslog.h **/tests/**/*.db **/tests/**/*.txt **/tests/**/*.tmp + +# special cases to invert previous ignore rules +!ext/fileinfo/libmagic.patch +!ext/mbstring/oniguruma.patch + diff --git a/NEWS b/NEWS index ea7e10bbb9a..598edb21f66 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ PHP NEWS php_parse_date()). (Derick) . Fixed bug #49649 (unserialize() doesn't handle changes in property visibility). (pmmaga) + . Fixed #74866 (extension_dir = "./ext" now use current directory for base). + (Francois Laupretre) - Date: . Fixed bug #74852 (property_exists returns true on unknown DateInterval diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 17c524f3314..adfb539b372 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -1552,7 +1552,7 @@ char * exif_dump_data(int *dump_free, int format, int components, int length, in return value_ptr ? value_ptr : ""; } if (format == TAG_FMT_UNDEFINED) { - return "\n"; + return ""; } if (format == TAG_FMT_IFD) { return ""; @@ -3723,7 +3723,7 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo) unsigned int ll, lh; uchar *Data; size_t fpos, size, got, itemlen; - jpeg_sof_info sof_info; + jpeg_sof_info sof_info; for(section=0;;section++) { #ifdef EXIF_DEBUG @@ -4305,9 +4305,9 @@ static int exif_discard_imageinfo(image_info_type *ImageInfo) } /* }}} */ -/* {{{ exif_read_from_stream +/* {{{ exif_read_from_impl */ -static int exif_read_from_stream(image_info_type *ImageInfo, php_stream *stream, int read_thumbnail, int read_all) +static int exif_read_from_impl(image_info_type *ImageInfo, php_stream *stream, int read_thumbnail, int read_all) { int ret; zend_stat_t st; @@ -4368,6 +4368,27 @@ static int exif_read_from_stream(image_info_type *ImageInfo, php_stream *stream, } /* }}} */ +/* {{{ exif_read_from_stream + */ +static int exif_read_from_stream(image_info_type *ImageInfo, php_stream *stream, int read_thumbnail, int read_all) +{ + int ret; + off_t old_pos = php_stream_tell(stream); + + if (old_pos) { + php_stream_seek(stream, 0, SEEK_SET); + } + + ret = exif_read_from_impl(ImageInfo, stream, read_thumbnail, read_all); + + if (old_pos) { + php_stream_seek(stream, old_pos, SEEK_SET); + } + + return ret; +} +/* }}} */ + /* {{{ exif_read_from_file */ static int exif_read_from_file(image_info_type *ImageInfo, char *FileName, int read_thumbnail, int read_all) @@ -4590,7 +4611,7 @@ PHP_FUNCTION(exif_read_data) exif_discard_imageinfo(&ImageInfo); #ifdef EXIF_DEBUG - php_error_docref1(NULL, p_name, E_NOTICE, "done"); + php_error_docref1(NULL, (Z_TYPE_P(stream) == IS_RESOURCE ? "" : Z_STRVAL_P(stream)), E_NOTICE, "Done"); #endif } /* }}} */ @@ -4672,7 +4693,7 @@ PHP_FUNCTION(exif_thumbnail) exif_discard_imageinfo(&ImageInfo); #ifdef EXIF_DEBUG - php_error_docref1(NULL, p_name, E_NOTICE, "Done"); + php_error_docref1(NULL, (Z_TYPE_P(stream) == IS_RESOURCE ? "" : Z_STRVAL_P(stream)), E_NOTICE, "Done"); #endif } /* }}} */ diff --git a/ext/exif/tests/exif_read_data_streams_seek.phpt b/ext/exif/tests/exif_read_data_streams_seek.phpt new file mode 100644 index 00000000000..a9476b43533 --- /dev/null +++ b/ext/exif/tests/exif_read_data_streams_seek.phpt @@ -0,0 +1,21 @@ +--TEST-- +exif_read_data() with streams seeking test +--SKIPIF-- + +--INI-- +output_handler= +zlib.output_compression=0 +--FILE-- + +--EXPECT-- +bool(true) diff --git a/ext/mbstring/oniguruma.patch b/ext/mbstring/oniguruma.patch new file mode 100644 index 00000000000..7c21f622fbf --- /dev/null +++ b/ext/mbstring/oniguruma.patch @@ -0,0 +1,61 @@ +diff -wur oniguruma.orig/src/config.h.win32 oniguruma/src/config.h.win32 +--- oniguruma.orig/src/config.h.win32 2017-07-13 17:12:45.228068900 +0200 ++++ oniguruma/src/config.h.win32 2017-07-13 16:11:19.955226200 +0200 +@@ -15,6 +15,7 @@ + #define SIZEOF_VOIDP 4 + #define SIZEOF_FLOAT 4 + #define SIZEOF_DOUBLE 8 ++#define SIZEOF_SIZE_T 4 + #define HAVE_PROTOTYPES 1 + #define TOKEN_PASTE(x,y) x##y + #define HAVE_STDARG_PROTOTYPES 1 +diff -wur oniguruma.orig/src/config.h.win64 oniguruma/src/config.h.win64 +--- oniguruma.orig/src/config.h.win64 2017-07-13 17:12:45.273605000 +0200 ++++ oniguruma/src/config.h.win64 2017-07-13 16:11:19.957231300 +0200 +@@ -15,6 +15,7 @@ + #define SIZEOF_VOIDP 8 + #define SIZEOF_FLOAT 4 + #define SIZEOF_DOUBLE 8 ++#define SIZEOF_SIZE_T 8 + #define HAVE_PROTOTYPES 1 + #define TOKEN_PASTE(x,y) x##y + #define HAVE_STDARG_PROTOTYPES 1 +diff -wur oniguruma.orig/src/regint.h oniguruma/src/regint.h +--- oniguruma.orig/src/regint.h 2017-07-13 17:12:48.686073300 +0200 ++++ oniguruma/src/regint.h 2017-07-13 17:13:28.032286100 +0200 +@@ -201,17 +201,21 @@ + } while(0) + + /* sizeof(OnigCodePoint) */ ++#ifdef SIZEOF_SIZE_T ++# define WORD_ALIGNMENT_SIZE SIZEOF_SIZE_T ++#else + #define WORD_ALIGNMENT_SIZE SIZEOF_LONG ++#endif + + #define GET_ALIGNMENT_PAD_SIZE(addr,pad_size) do {\ + (pad_size) = WORD_ALIGNMENT_SIZE \ +- - ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\ ++ - ((size_t)(addr) % WORD_ALIGNMENT_SIZE);\ + if ((pad_size) == WORD_ALIGNMENT_SIZE) (pad_size) = 0;\ + } while (0) + + #define ALIGNMENT_RIGHT(addr) do {\ + (addr) += (WORD_ALIGNMENT_SIZE - 1);\ +- (addr) -= ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\ ++ (addr) -= ((size_t)(addr) % WORD_ALIGNMENT_SIZE);\ + } while (0) + + #endif /* PLATFORM_UNALIGNED_WORD_ACCESS */ +@@ -662,7 +666,11 @@ + BBuf* mbuf; /* multi-byte info or NULL */ + } CClassNode; + ++#ifdef _WIN64 ++typedef __int64 OnigStackIndex; ++#else + typedef long OnigStackIndex; ++#endif + + typedef struct _OnigStackType { + unsigned int type; diff --git a/ext/mbstring/oniguruma/src/regint.h b/ext/mbstring/oniguruma/src/regint.h index c33bc4e261d..4c9853b39dc 100644 --- a/ext/mbstring/oniguruma/src/regint.h +++ b/ext/mbstring/oniguruma/src/regint.h @@ -201,7 +201,11 @@ } while(0) /* sizeof(OnigCodePoint) */ -#define WORD_ALIGNMENT_SIZE SIZEOF_SIZE_T +#ifdef SIZEOF_SIZE_T +# define WORD_ALIGNMENT_SIZE SIZEOF_SIZE_T +#else +# define WORD_ALIGNMENT_SIZE SIZEOF_LONG +#endif #define GET_ALIGNMENT_PAD_SIZE(addr,pad_size) do {\ (pad_size) = WORD_ALIGNMENT_SIZE \ diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml index 15109c2bf38..450777bcf74 100644 --- a/ext/oci8/package.xml +++ b/ext/oci8/package.xml @@ -50,8 +50,8 @@ Interoperability Support" (ID 207303.1) for details. - 2.1.5 - 2.1.5 + 2.1.6 + 2.1.6 stable @@ -60,7 +60,6 @@ Interoperability Support" (ID 207303.1) for details. PHP This version is for PHP 7 only. -Added TAF callback support (PR #2459, KoenigsKind) Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). (Ingmar Runge) @@ -471,6 +470,22 @@ Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). (Ingmar Runge) + + + 2.1.5 + 2.1.5 + + + stable + stable + + PHP + +This version is for PHP 7 only. +Added TAF callback support (PR #2459, KoenigsKind) + + + 2.1.4 diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h index a036a024cbd..e5acd58787a 100644 --- a/ext/oci8/php_oci8.h +++ b/ext/oci8/php_oci8.h @@ -43,7 +43,7 @@ */ #undef PHP_OCI8_VERSION #endif -#define PHP_OCI8_VERSION "2.1.5" +#define PHP_OCI8_VERSION "2.1.6" extern zend_module_entry oci8_module_entry; #define phpext_oci8_ptr &oci8_module_entry diff --git a/ext/oci8/tests/driver_name.phpt b/ext/oci8/tests/driver_name.phpt index a707e88de8d..49616a00ad6 100644 --- a/ext/oci8/tests/driver_name.phpt +++ b/ext/oci8/tests/driver_name.phpt @@ -57,11 +57,11 @@ function get_attr($conn) ?> --EXPECT-- **Test 1.1 - Default values for the attribute ************** -The value of DRIVER_NAME is PHP OCI8 : 2.1.5 +The value of DRIVER_NAME is PHP OCI8 : 2.1.6 ***Test 1.2 - Get the values from different connections ************** Testing with oci_pconnect() -The value of DRIVER_NAME is PHP OCI8 : 2.1.5 +The value of DRIVER_NAME is PHP OCI8 : 2.1.6 Testing with oci_new_connect() -The value of DRIVER_NAME is PHP OCI8 : 2.1.5 +The value of DRIVER_NAME is PHP OCI8 : 2.1.6 Done diff --git a/ext/pcre/config0.m4 b/ext/pcre/config0.m4 index 6d5b2577911..cc9f1b262ae 100644 --- a/ext/pcre/config0.m4 +++ b/ext/pcre/config0.m4 @@ -78,12 +78,20 @@ PHP_ARG_WITH(pcre-jit,,[ --with-pcre-jit Enable PCRE JIT functionality] fi fi -PHP_ARG_WITH(pcre-valgrind,,[ --with-pcre-valgrind=DIR - Enable PCRE valgrind support. Developers only!], no, no) + if test "$PHP_DEBUG" != "no" && test "$PHP_DEBUG" != "0"; then + PHP_ARG_WITH(pcre-valgrind,,[ --with-pcre-valgrind=DIR + Enable PCRE valgrind support. Developers only!], yes, no) + else + PHP_ARG_WITH(pcre-valgrind,,[ --with-pcre-valgrind=DIR + Enable PCRE valgrind support. Developers only!], no, no) + fi + if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then AC_MSG_WARN([PHP is going to be linked with an external PCRE, --with-pcre-valgrind has no effect]) else - if test "$PHP_PCRE_VALGRIND" != "no"; then + if test "$PHP_PCRE_VALGRIND" = "no" && test "$PHP_DEBUG" != "0"; then + AC_MSG_NOTICE([PCRE Valgrind support is disabled for debug build]) + elif test "$PHP_PCRE_VALGRIND" != "no" || test "$PHP_DEBUG" != "0"; then PHP_PCRE_VALGRIND_INCDIR= AC_MSG_CHECKING([for Valgrind headers location]) for i in $PHP_PCRE_VALGRIND $PHP_PCRE_VALGRIND/include $PHP_PCRE_VALGRIND/local/include /usr/include /usr/local/include; do diff --git a/travis/compile.sh b/travis/compile.sh index ddf80f994d6..b2d29b99df6 100755 --- a/travis/compile.sh +++ b/travis/compile.sh @@ -5,7 +5,7 @@ else TS=""; fi if [[ "$ENABLE_DEBUG" == 1 ]]; then - DEBUG="--enable-debug"; + DEBUG="--enable-debug --without-pcre-valgrind"; else DEBUG=""; fi