Compare commits

...
102 Commits
Author SHA1 Message Date
Joe Watkins d8cd47aa83 set versions 2018-03-14 05:56:27 +01:00
Christoph M. Becker 25f324fad7 Fix #74139: mail.add_x_header default inconsistent with docs [ci skip]
mail.add_x_header actually defaults to `Off`, so we should use this
default in the provided `php.ini`s.
2018-03-13 23:54:42 +01:00
Christoph M. Becker cab354debd Fix #76088: ODBC functions are not available by default on Windows 2018-03-13 14:30:43 +01:00
Dmitry Stogov 0643c7ab4d Revert "More accurate symbolic constraints oferflow/unserflow handling (better fix for bug #76074)."
This reverts commit 44ba557de5.
2018-03-13 11:03:45 +03:00
Dmitry Stogov 44ba557de5 More accurate symbolic constraints oferflow/unserflow handling (better fix for bug #76074). 2018-03-13 10:44:53 +03:00
Xinchen Hui 998a2ddc37 Forgot NEWS 2018-03-13 13:00:47 +08:00
Xinchen Hui 4ee9098514 Fixed bug #76085 (Segmentation fault in buildFromIterator when directory name contains a \n) 2018-03-13 12:51:26 +08:00
Anatol Belski 4cd64aad8a Fix heap use after free
The value may only be used until PGresult was destroyed, thus it needs
to be copied.
2018-03-12 20:57:21 +01:00
Anatol Belski eaa5b1f911 Use string literal as format 2018-03-12 15:17:08 +01:00
Anatol Belski 4dd1be2079 Provide core includes for the resource compiler by default 2018-03-12 14:14:34 +01:00
Dmitry Stogov f31c4d5398 Replaced usafe reference from SHM to process memory with SHM to SHM reference 2018-03-12 11:18:12 +03:00
Christoph M. Becker 01ea314e8c Fix #62545: wrong unicode mapping in some charsets
Undefined characters are best mapped to Unicode REPLACEMENT characters.
2018-03-11 17:38:28 +01:00
Anatol Belski 76fc73cbfc [ci skip] Update NEWS 2018-03-10 20:07:23 +01:00
Bob Weinand 9c6df8a238 Fix bug #76074 (opcache corrupts variable in for-loop) 2018-03-10 15:20:45 +01:00
Anatol Belski 8417a23973 Fixed bug #76068 parse_ini_string fails to parse "[foo]\nbar=1|>baz" with segfault 2018-03-10 11:18:21 +01:00
Christoph M. Becker f1b358c9a9 Fix #73957: signed integer conversion in imagescale()
We must not pass values to `gdImageScale()` which cannot be represented
by an `unsigned int`.  Instead we return FALSE, according to what we
already did for negative integers.
2018-03-10 00:17:09 +01:00
Anatol Belski 34b9f9dedf Disable PGO for phpdbg
For executable files, the linker seems to have issues dealing with the
empty profiling database. As PGO is unlikely to bring any benefit in
this case, the easiest is to disable it.
2018-03-08 11:48:37 +01:00
Anatol Belski 00bfc6eb49 Exclude /Qspectre for clang analyzer 2018-03-07 12:34:16 +01:00
Anatol Belski 281e2f8207 Guard platform dependent code 2018-03-07 12:28:29 +01:00
Anatol Belski 8a57fcdfbd [ci skip] Update NEWS 2018-03-06 22:06:52 +01:00
Dmitry Stogov 50949c9332 Replaced usafe reference from SHM to process memory with SHM to SHM reference. 2018-03-06 02:43:26 +03:00
Dmitry Stogov b711a96acb Don't keep HashTable.pDestructor in SHM and always set it into ZVAL_PTR_DTOR in zval_array_dup().
Keeping pointer to a function in SHM is not safe because of ASLR.
2018-03-06 00:56:16 +03:00
Dmitry Stogov 033ce8f28c Merge branch 'PHP-7.1' of git.php.net:php-src into PHP-7.1
* 'PHP-7.1' of git.php.net:php-src:
  Fixed bug #76044 'date: illegal option -- -' in ./configure on FreeBSD
2018-03-06 00:47:40 +03:00
Dmitry Stogov a83581e223 Fixed invalid destructor 2018-03-06 00:46:19 +03:00
Anatol Belski 60ac255897 Fixed bug #76044 'date: illegal option -- -' in ./configure on FreeBSD 2018-03-05 22:35:58 +01:00
Dmitry Stogov 87553b0730 Fixed invalid destructor 2018-03-05 23:33:08 +03:00
Nikita Popov fd5bd37ab1 Revert "Fixed bug #75961 (Strange references behavior)"
This reverts commit 94e9d0a2ae.

This code needs to be mindful about modifications to the array
happening during callback execution. It was written in a way that
only accessed the reference, which is guaranteed not to move. The
changed implementation instead accesses the array slot, leading to
use-after-free.

Run ext/standard/tests/array/bug61967.phpt under valgrind to see
the issue.
2018-03-05 15:32:21 +01:00
Anatol Belski 27a603e811 Include username into the file cache path 2018-03-05 15:16:55 +01:00
Dmitry Stogov 350082ed71 Fixed "opcache.file_cache_fallback" mode.
It's not safe to change value of ZCG(accel_directives).file_cache_only, becuse it might be altered by INI subsystem.
Use global variable instead.
2018-03-05 16:01:43 +03:00
Joe Watkins a827aefe47 fix news date 2018-02-28 12:10:58 +01:00
Xinchen Hui d5c171311d Fixed bug #76025 (Segfault while throwing exception in error_handler). 2018-02-28 18:06:37 +08:00
George Wang d4387fca0a revert last change, for PHP7 no need to do strlen() + 1 for hash look up. 2018-02-27 23:31:43 -05:00
George Wang 2b033607f3 [BUGFIX] calling php_ini_activate_per_host_config() with correct name length. 2018-02-27 23:18:51 -05:00
Bob Weinand 3f32bd9f43 Fix pcntl build on mac
Apparently on mac WIF*(x) macros resolve to (*(int*)&x) (_W_INT macro in sys/wait.h), forcing the value to be a lvalue
2018-02-28 02:13:28 +01:00
Ferenc Kovacs b53e547d85 Merge branch 'PHP-7.0' into PHP-7.1 2018-02-28 00:02:48 +01:00
Ferenc Kovacs c28a6253e5 Merge branch 'PHP-5.6' into PHP-7.0 2018-02-28 00:00:12 +01:00
Ferenc Kovacs 3db7427b71 5.6.35 is next 2018-02-27 23:57:06 +01:00
George Wang 97ff815cbb release LiteSpeed SAPI 7.0.
add CRIU support.
add support for [PATH=] and [HOST=] sections in php.ini
2018-02-27 13:54:28 -05:00
Anatol Belski ea4ba9d008 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  7.0.29 next
2018-02-27 11:50:22 +01:00
Anatol Belski c61b56ed00 7.0.29 next 2018-02-27 11:48:49 +01:00
Anatol Belski f6356b435a [ci skip] Update NEWS 2018-02-27 11:37:24 +01:00
Anatol Belski 9e1113dee1 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] Update NEWS
  [ci skip] Update NEWS
2018-02-27 11:34:13 +01:00
Anatol Belski fed294d2a8 [ci skip] Update NEWS 2018-02-27 11:33:40 +01:00
Anatol Belski 1e0499b095 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  [ci skip] Update NEWS
2018-02-27 11:32:26 +01:00
Anatol Belski 4698a412bf [ci skip] Update NEWS 2018-02-27 11:31:37 +01:00
Stanislav Malyshev a6f7760d57 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #75981: prevent reading beyond buffer start
2018-02-26 22:26:50 -08:00
Stanislav Malyshev dde7a05978 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #75981: prevent reading beyond buffer start
2018-02-26 22:26:26 -08:00
Stanislav Malyshev 523f230c83 Fix bug #75981: prevent reading beyond buffer start 2018-02-26 22:25:51 -08:00
Christoph M. Becker 6e300bdeae [ci skip] Update NEWS 2018-02-24 23:37:43 +01:00
Gabriel Caruso a358211a75 Fix imagesetinterpolation arginfo
imagesetinterpolation only requires one parameter.
2018-02-24 11:30:24 +01:00
Stanislav Malyshev ae1f18b69c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] Set FPM maintainership
2018-02-23 17:57:50 -08:00
Stanislav Malyshev 09a19e778b Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  [ci skip] Set FPM maintainership
2018-02-23 17:57:26 -08:00
Stanislav Malyshev 1f4b057b63 [ci skip] Set FPM maintainership
As per http://news.php.net/php.internals/101897, Jakub is officially
annointed as new FPM maintainer.
2018-02-23 16:43:10 -08:00
Sam Ding 78c1ef2adb Fix #75873: pcntl_wexitstatus returns incorrect on Big_Endian platform (s390x)
Cf. https://github.com/php/php-src/pull/3141.
2018-02-23 23:50:36 +01:00
Gabriel Caruso 0b8cfa6c78 Fix some arginfos
* all arguments for ftp_pasv are required
* $varname for getenv function isn't required anymore
* fsockopen and pfsockopen only require $hostname
* strtok can work with only one parameter
* strpbrk needs two parameters to work
* required parameters and add some parameters in openssl_* functions
2018-02-23 11:27:14 +01:00
Johannes Schlüter 42952a756e Merge branch 'PHP-7.0' into PHP-7.1 2018-02-20 23:32:05 +01:00
Johannes Schlüter 73cd5fca2c Fix NEWS 2018-02-20 23:31:30 +01:00
Johannes Schlüter 74ed42c169 Fix a memleak with mysqlnd and SSL 2018-02-20 23:28:23 +01:00
Johannes Schlüter e3cf72b829 Merge branch 'PHP-7.0' into PHP-7.1 2018-02-20 23:20:02 +01:00
Johannes Schlüter 8f3c29aee1 Fix negotiaton of MySQL auth plugin 2018-02-20 23:13:03 +01:00
Christoph M. Becker 656381745a [ci skip] Sort recent NEWS entries alphabetically 2018-02-20 16:31:56 +01:00
Gabriel Caruso 276b57316c Fix openssl_* arginfos
openssl_pkcs12_export and openssl_x509_parse had wrong arginfos
2018-02-20 16:23:42 +01:00
Anatol Belski c28b03a8e7 Update binary tools SDK branch for AppVeyor 2018-02-20 15:40:10 +01:00
Anatol Belski ef04bc4a51 dos2unix 2018-02-20 07:59:34 +01:00
Nikita Popov 7b3a2d16aa Fix incorrect printf modifiers 2018-02-19 21:44:36 +01:00
Anatol Belski 08b4f3c745 Use more jobs with cppcheck 2018-02-19 11:27:03 +01:00
Anatol Belski a468752e53 Remove duplicated assignment 2018-02-17 13:10:59 +01:00
Xinchen Hui 94e9d0a2ae Fixed bug #75961 (Strange references behavior) 2018-02-17 16:33:15 +08:00
Nikita Popov 372bf8a923 Fixed bug #75969
Move NOP stripping out of zend_optimize_block: NOP stripping may
move instructions, which may invalidate a Tsource shared across
an extended basic block.
2018-02-16 20:30:03 +01:00
Anatol Belski da0ed5cdb1 Wrap var depending on conditional compilation 2018-02-16 13:40:44 +01:00
Mitch Hagstrand da5db1c9b2 Fixed print_const_table function and zval types in ____printzv_contents
1. Fixed print_const_table to work in ZE3
2. Removed ____print_const_table to use more generic ____print_ht
3. Fixed up zval types in ____printzv_contents
2018-02-15 08:57:32 +01:00
Joe 1f0ea7fa4d bump versions 2018-02-13 20:24:34 +01:00
jhdxr 070211b3e3 Fixed bug #68406 calling var_dump on a DateTimeZone object modifies it 2018-02-12 09:17:21 +01:00
Gabriel Caruso f706937120 Fix #75857: Timezone gets truncated when formatted
Use sizeof buffer instead of hard-coded lenghts
2018-02-11 03:14:41 +01:00
Pedro Lacerda fddd7e38bd Fixed bug #75928 2018-02-10 19:29:47 +01:00
Mitch Hagstrand 01f7998db0 Enhancements and fixes for print_pi in gdbinit
1) Outputs the default value and the offset of a property
2) Fixed output of property flags
2018-02-10 19:18:39 +01:00
Pedro Magalhães 5673c641dc Fixes bug #75871 Use pkg-config for libxml2 if available 2018-02-08 10:50:22 +01:00
David Zuelke 8000334538 Fixed bug #49876 lib path on 64bit distros 2018-02-08 10:41:46 +01:00
Bishop Bettini d806d0315f Fixed bug #65414 2018-02-08 10:32:08 +01:00
CHU Zhaowei 01eafceea1 Fixed bug #74519 strange behavior of AppendIterator 2018-02-08 10:16:24 +01:00
CHU Zhaowei 495508eceb fix #74519 strange behavior of AppendIterator 2018-02-08 10:15:09 +01:00
Anatol Belski 1368aea352 Finer conditions, so /Qspectre is already usable with latest vc15 2018-02-05 10:38:06 +01:00
Michael Wallner 42f2ae0572 fix bug #75916 DNS_CAA record results contain garbage
It is assumed that DNS_CAA record values are zero terminated,
while its length is defined as (RDATA_LENGTH - tag_length - 2).
2018-02-05 09:04:07 +01:00
Chris Lamb a694433bff Fix SOURCE_DATE_EPOCH to not vary on timezones 2018-02-02 22:31:17 +01:00
Anatol Belski b1ee215c69 Switch to the new PHP SDK version on AppVeyor 2018-02-02 14:06:53 +01:00
Anatol Belski 2ae46f8eb6 [ci skip] Update NEWS 2018-02-01 15:25:15 +01:00
Anatol Belski bced074124 Fix race conditions with Apache vhost vs. per dir config
If the same php_value/php_flag is present in httpd.conf and .htaccess,
the key is potentially shared between threads. Unfortunately we can't
intern these keys using the current mechanism, because the MPM is setup
before the SAPI module setup is even started. A more elegant way were
to implement a kind of string pool for the thread safe Apache SAPI
config directives with the mechanism similar to what is done for the
SAPI setup now, but doing a separate management.

(cherry picked from commit 73eb5a78b9)
2018-02-01 15:24:31 +01:00
Jakub Zelenka fe2ac52d50 Use correct certs for SNI server tests 2018-01-30 19:58:40 +00:00
Thomas Punt fb128f6512 Use the correct freeing function 2018-01-29 11:13:10 +00:00
Christoph M. Becker a882f95e39 Revert "Fix #75878: RecursiveTreeIterator::setPostfix has wrong signature"
This reverts commit 4bd7658e1b.

To avoid the BC break we apply the fix to master only.
2018-01-27 13:11:30 +01:00
Christoph M. Becker 4bd7658e1b Fix #75878: RecursiveTreeIterator::setPostfix has wrong signature 2018-01-27 12:33:36 +01:00
Philip Prindeville aad76a9b79 Be consistent in clearing out in php_iconv_string() 2018-01-26 22:28:27 +01:00
Derick Rethans f80e59a566 Updated to version 2018.3 (2018c) 2018-01-24 13:57:06 +00:00
Sara Golemon 3ffdf6c088 Fix alignment of PG struct cause by ignore_user_abort big endian fix 2018-01-23 11:06:34 -05:00
Sara Golemon e954bafc28 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Use Z_EXPECTED_LONG to initialize FAST_ZPP parsing loop
2018-01-23 09:24:40 -05:00
Sara Golemon e88e83d3e5 Use Z_EXPECTED_LONG to initialize FAST_ZPP parsing loop 2018-01-23 09:24:10 -05:00
Sara Golemon d46d53a7bc BigEndian fix for ignore_user_abort. Use zend_bool to match OnUpdateBool 2018-01-23 08:58:19 -05:00
Anatol Belski 594a4da3e5 [ci skip] Update NEWS 2018-01-22 19:14:24 +01:00
Anatol Belski 2384ade53c Fixed bug #73725 Unable to retrieve value of varchar(max) type 2018-01-22 17:02:54 +01:00
Xinchen Hui fb205020ce Fixed #75838 (Memory leak in pg_escape_bytea()) 2018-01-18 10:53:23 +08:00
Anatol Belski 043d53c789 Add switches for Spectre variant 1 mitigation 2018-01-17 14:33:08 +01:00
Anatol Belski ea56fc840e 7.0.15 next 2018-01-16 19:47:35 +01:00
94 changed files with 4601 additions and 2181 deletions

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ environment:
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
PHP_BUILD_OBJ_DIR: c:\obj
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.13
PHP_BUILD_SDK_BRANCH: php-sdk-2.1.1
# ext and env setup for tests
#MYSQL_TEST_PASSWD: Password12!
#MYSQL_TEST_USER: root
+43 -44
View File
@@ -171,7 +171,7 @@ define ____printzv_contents
printf "UNDEF"
end
if $type == 1
printf "NULL"
printf "NULL"
end
if $type == 2
printf "bool: false"
@@ -179,15 +179,15 @@ define ____printzv_contents
if $type == 3
printf "bool: true"
end
if $type == 4
if $type == 4
printf "long: %ld", $zvalue->value.lval
end
if $type == 5
printf "double: %f", $zvalue->value.dval
end
if $type == 6
printf "string: %s", $zvalue->value.str->val
end
end
if $type == 5
printf "double: %f", $zvalue->value.dval
end
if $type == 6
printf "string: %s", $zvalue->value.str->val
end
if $type == 7
printf "array: "
if ! $arg1
@@ -245,25 +245,31 @@ define ____printzv_contents
printf "const: %s", $zvalue->value.str->val
end
if $type == 12
printf "const_ast"
printf "CONSTANT_AST"
end
if $type == 13
printf "_IS_BOOL"
printf "_BOOL"
end
if $type == 14
printf "IS_CALLABLE"
printf "CALLABLE"
end
if $type == 15
printf "indirect: "
____printzv $zvalue->value.zv $arg1
end
if $type == 16
printf "string_offset"
end
if $type == 17
printf "pointer: %p", $zvalue->value.ptr
end
if $type > 17
if $type == 18
printf "ITERABLE"
end
if $type == 19
printf "VOID"
end
if $type == 20
printf "_ERROR"
end
if $type == 16 || $type > 20
printf "unknown type %d", $type
end
printf "\n"
@@ -283,38 +289,18 @@ define ____printzv
end
end
define ____print_const_table
set $ht = $arg0
set $p = $ht->pListHead
while $p != 0
set $const = (zend_constant *) $p->pData
set $i = $ind
while $i > 0
printf " "
set $i = $i - 1
end
if $p->nKeyLength > 0
____print_str $p->arKey $p->nKeyLength
printf " => "
else
printf "%d => ", $p->h
end
____printzv_contents &$const->value 0
set $p = $p->pListNext
end
end
define print_const_table
set $ind = 1
printf "[%p] {\n", $arg0
____print_const_table $arg0
____print_ht $arg0 4
printf "}\n"
end
document print_const_table
Dumps elements of Constants HashTable
Example: print_const_table executor_globals.zend_constants
end
define ____print_ht
set $ht = (HashTable*)$arg0
set $n = $ind
@@ -361,6 +347,10 @@ define ____print_ht
set $func = (zend_function*)$p->val.value.ptr
printf "\"%s\"\n", $func->common.function_name->val
end
if $arg1 == 4
set $const = (zend_constant *)$p->val.value.ptr
____printzv $const 1
end
end
set $i = $i + 1
end
@@ -472,9 +462,12 @@ end
define print_pi
set $pi = (zend_property_info *)$arg0
set $initial_offset = ((uint32_t)(zend_uintptr_t)(&((zend_object*)0)->properties_table[(0)]))
set $ptr_to_val = (zval*)((char*)$pi->ce->default_properties_table + $pi->offset - $initial_offset)
printf "[%p] {\n", $pi
printf " offset = %p\n", $pi->offset
printf " ce = [%p] %s\n", $pi->ce, $pi->ce->name->val
printf " flags = %d (", $pi->flags
printf " flags = 0x%x (", $pi->flags
if $pi->flags & 0x100
printf "ZEND_ACC_PUBLIC"
else
@@ -485,7 +478,11 @@ define print_pi
printf "ZEND_ACC_PRIVATE"
else
if $pi->flags & 0x800
printf "ZEND_ACC_CHANGED"
printf "ZEND_ACC_EARLY_BINDING"
else
if $pi->flags & 0x20000
printf "ZEND_ACC_SHADOW"
end
end
end
end
@@ -493,6 +490,8 @@ define print_pi
printf ")\n"
printf " name = "
print_zstr $pi->name
printf " default value: "
printzv $ptr_to_val
printf "}\n"
end
+1 -1
View File
@@ -47,7 +47,7 @@ MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: fpm
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>, Jerome Loyet <fat@php.net>
PRIMARY MAINTAINER: Jakub Zelenka <bukka@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 5.3.3
+94 -1
View File
@@ -1,6 +1,96 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2018, PHP 7.1.14
29 Mar 2018, PHP 7.1.16
- Core:
. Fixed bug #76025 (Segfault while throwing exception in error_handler).
(Dmitry, Laruence)
. Fixed bug #76044 ('date: illegal option -- -' in ./configure on FreeBSD).
(Anatol)
- GD:
. Fixed bug #73957 (signed integer conversion in imagescale()). (cmb)
- ODBC:
. Fixed bug #76088 (ODBC functions are not available by default on Windows).
(cmb)
- Opcache:
. Fixed bug #76074 (opcache corrupts variable in for-loop). (Bob)
- Phar:
. Fixed bug #76085 (Segmentation fault in buildFromIterator when directory
name contains a \n). (Laruence)
- Standard:
. Fixed bug #74139 (mail.add_x_header default inconsistent with docs). (cmb)
. Fixed bug #76068 (parse_ini_string fails to parse "[foo]\nbar=1|>baz" with
segfault). (Anatol)
01 Mar 2018, PHP 7.1.15
- Apache2Handler:
. Fixed bug #75882 (a simple way for segfaults in threadsafe php just with
configuration). (Anatol)
- Date:
. Fixed bug #75857 (Timezone gets truncated when formatted). (carusogabriel)
. Fixed bug #75928 (Argument 2 for `DateTimeZone::listIdentifiers()` should
accept `null`). (Pedro Lacerda)
. Fixed bug #68406 (calling var_dump on a DateTimeZone object modifies it).
(jhdxr)
- FTP:
. Fixed ftp_pasv arginfo. (carusogabriel)
-GD:
. Fixed imagesetinterpolation arginfo. (Gabriel Caruso)
- iconv:
. Fixed bug #75867 (Freeing uninitialized pointer). (Philip Prindeville)
- LDAP:
. Fixed bug #49876 (Fix LDAP path lookup on 64-bit distros). (dzuelke)
- libxml2:
. Fixed bug #75871 (use pkg-config where available). (pmmaga)
- mysqlnd
. Fixed negotiation of MySQL authenticaton plugin. (Johannes)
. Fixed a memleak with SSL connections. (Johannes)
- ODBC:
. Fixed bug #73725 (Unable to retrieve value of varchar(max) type). (Anatol)
- Opcache:
. Fixed bug #75969 (Assertion failure in live range DCE due to block pass
misoptimization). (Nikita)
- OpenSSL:
. Fixed openssl_* arginfos. (carusogabriel)
- PCNTL:
. Fixed bug #75873 (pcntl_wexitstatus returns incorrect on Big_Endian platform
(s390x)). (Sam Ding)
- PGSQL:
. Fixed #75838 (Memory leak in pg_escape_bytea()). (ard_1 at mail dot ru)
- Phar:
. Fixed bug #65414 (deal with leading slash when adding files correctly).
(bishopb)
- SPL:
. Fixed bug #74519 (strange behavior of AppendIterator). (jhdxr)
- Standard:
. Fixed bug #75961 (Strange references behavior). (Laruence)
. Fixed bug #75916 (DNS_CAA record results contain garbage). (Mike,
Philip Sharp)
. Fixed some arginfos. (carusogabriel)
. Fixed bug #75981 (stack-buffer-overflow while parsing HTTP response). (Stas)
01 Feb 2018, PHP 7.1.14
- Core:
. Fixed bug #75679 (Path 260 character problem). (Anatol)
@@ -19,6 +109,9 @@ PHP NEWS
- IMAP:
. Fixed bug #75774 (imap_append HeapCorruction). (Anatol)
- Mbstring:
. Fixed bug #62545 (wrong unicode mapping in some charsets). (cmb)
- Opcache:
. Fixed bug #75720 (File cache not populated after SHM runs full). (Dmitry)
. Fixed bug #75579 (Interned strings buffer overflow may cause crash).
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug #76025 (Segfault while throwing exception in error_handler)
--FILE--
<?php
function handleError($errno, $errstr, $errfile, $errline) {
$exception = new exception("blah");
throw $exception;
}
set_error_handler('handleError', E_ALL);
$c = $b[$a];
?>
--EXPECTF--
Fatal error: Uncaught Exception: blah in %sbug76025.php:%d
Stack trace:
#0 %sbug76025.php(%d): handleError(8, 'Undefined varia...', '%s', %d, Array)
#1 {main}
thrown in %sbug76025.php on line %d
+1 -1
View File
@@ -720,7 +720,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(int severity, in
int _num_args = EX_NUM_ARGS(); \
int _i; \
zval *_real_arg, *_arg = NULL; \
zend_expected_type _expected_type = IS_UNDEF; \
zend_expected_type _expected_type = Z_EXPECTED_LONG; \
char *_error = NULL; \
zend_bool _dummy; \
zend_bool _optional = 0; \
+4 -3
View File
@@ -213,9 +213,10 @@ static zend_always_inline zval *_get_zval_ptr_var_deref(uint32_t var, const zend
static zend_never_inline ZEND_COLD void zval_undefined_cv(uint32_t var, const zend_execute_data *execute_data)
{
zend_string *cv = CV_DEF_OF(EX_VAR_TO_NUM(var));
zend_error(E_NOTICE, "Undefined variable: %s", ZSTR_VAL(cv));
if (EXPECTED(EG(exception) == NULL)) {
zend_string *cv = CV_DEF_OF(EX_VAR_TO_NUM(var));
zend_error(E_NOTICE, "Undefined variable: %s", ZSTR_VAL(cv));
}
}
static zend_never_inline zval *_get_zval_cv_lookup(zval *ptr, uint32_t var, int type, const zend_execute_data *execute_data)
+1 -1
View File
@@ -1765,7 +1765,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
GC_TYPE_INFO(target) = IS_ARRAY;
target->nTableSize = source->nTableSize;
target->pDestructor = source->pDestructor;
target->pDestructor = ZVAL_PTR_DTOR;
if (source->nNumUsed == 0) {
target->u.flags = (source->u.flags & ~(HASH_FLAG_INITIALIZED|HASH_FLAG_PACKED|HASH_FLAG_PERSISTENT|ZEND_HASH_APPLY_COUNT_MASK)) | HASH_FLAG_APPLY_PROTECTION | HASH_FLAG_STATIC_KEYS;
+12 -4
View File
@@ -57,11 +57,19 @@ static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
int str_len;
char str_result[MAX_LENGTH_OF_LONG+1];
i_op1 = atoi(Z_STRVAL_P(op1));
zend_string_free(Z_STR_P(op1));
if (IS_LONG == Z_TYPE_P(op1)) {
i_op1 = Z_LVAL_P(op1);
} else {
i_op1 = atoi(Z_STRVAL_P(op1));
zend_string_free(Z_STR_P(op1));
}
if (op2) {
i_op2 = atoi(Z_STRVAL_P(op2));
zend_string_free(Z_STR_P(op2));
if (IS_LONG == Z_TYPE_P(op2)) {
i_op2 = Z_LVAL_P(op2);
} else {
i_op2 = atoi(Z_STRVAL_P(op2));
zend_string_free(Z_STR_P(op2));
}
} else {
i_op2 = 0;
}
+53 -28
View File
@@ -2534,15 +2534,18 @@ dnl
dnl Common setup macro for libxml
dnl
AC_DEFUN([PHP_SETUP_LIBXML], [
AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
[
for i in $PHP_LIBXML_DIR /usr/local /usr; do
if test -x "$i/bin/xml2-config"; then
ac_cv_php_xml2_config_path="$i/bin/xml2-config"
break
fi
done
])
found_libxml=no
dnl First try to find xml2-config
AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
[
for i in $PHP_LIBXML_DIR /usr/local /usr; do
if test -x "$i/bin/xml2-config"; then
ac_cv_php_xml2_config_path="$i/bin/xml2-config"
break
fi
done
])
if test -x "$ac_cv_php_xml2_config_path"; then
XML2_CONFIG="$ac_cv_php_xml2_config_path"
@@ -2553,30 +2556,52 @@ AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
IFS=$ac_IFS
LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
if test "$LIBXML_VERSION" -ge "2006011"; then
found_libxml=yes
LIBXML_LIBS=`$XML2_CONFIG --libs`
LIBXML_INCS=`$XML2_CONFIG --cflags`
PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
PHP_EVAL_INCLINE($LIBXML_INCS)
dnl Check that build works with given libs
AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
PHP_TEST_BUILD(xmlInitParser,
[
php_cv_libxml_build_works=yes
], [
AC_MSG_RESULT(no)
AC_MSG_ERROR([build test failed. Please check the config.log for details.])
], [
[$]$1
])
])
if test "$php_cv_libxml_build_works" = "yes"; then
AC_DEFINE(HAVE_LIBXML, 1, [ ])
fi
$2
else
AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
fi
fi
dnl If xml2-config fails, try pkg-config
if test "$found_libxml" = "no"; then
if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
dnl If pkg-config is found try using it
if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libxml-2.0; then
if $PKG_CONFIG --atleast-version=2.6.11 libxml-2.0; then
found_libxml=yes
LIBXML_LIBS=`$PKG_CONFIG --libs libxml-2.0`
LIBXML_INCS=`$PKG_CONFIG --cflags-only-I libxml-2.0`
else
AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
fi
fi
fi
if test "$found_libxml" = "yes"; then
PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
PHP_EVAL_INCLINE($LIBXML_INCS)
dnl Check that build works with given libs
AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
PHP_TEST_BUILD(xmlInitParser,
[
php_cv_libxml_build_works=yes
], [
AC_MSG_RESULT(no)
AC_MSG_ERROR([build test failed. Please check the config.log for details.])
], [
[$]$1
])
])
if test "$php_cv_libxml_build_works" = "yes"; then
AC_DEFINE(HAVE_LIBXML, 1, [ ])
fi
$2
ifelse([$3],[],,[else $3])
fi
])
+6 -3
View File
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=7
PHP_MINOR_VERSION=1
PHP_RELEASE_VERSION=14
PHP_EXTRA_VERSION="-dev"
PHP_RELEASE_VERSION=16
PHP_EXTRA_VERSION="RC1"
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`
@@ -1286,7 +1286,10 @@ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
# SOURCE_DATE_EPOCH for reproducible builds https://reproducible-builds.org/specs/source-date-epoch/
PHP_BUILD_DATE=`date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d`
PHP_BUILD_DATE=`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d 2>/dev/null`
if test $? -ne 0 ; then
PHP_BUILD_DATE=`date -u +%Y-%m-%d`
fi
AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
case $host_alias in
+709 -705
View File
File diff suppressed because it is too large. Load diff
+103 -62
View File
@@ -655,6 +655,7 @@ static HashTable *date_object_get_gc_period(zval *object, zval **table, int *n);
static HashTable *date_object_get_properties_period(zval *object);
static HashTable *date_object_get_properties_timezone(zval *object);
static HashTable *date_object_get_gc_timezone(zval *object, zval **table, int *n);
static HashTable *date_object_get_debug_info_timezone(zval *object, int *is_temp);
zval *date_interval_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv);
void date_interval_write_property(zval *object, zval *member, zval *value, void **cache_slot);
@@ -1128,38 +1129,38 @@ static zend_string *date_format(char *format, size_t format_len, timelib_time *t
rfc_colon = 0;
switch (format[i]) {
/* day */
case 'd': length = slprintf(buffer, 32, "%02d", (int) t->d); break;
case 'D': length = slprintf(buffer, 32, "%s", php_date_short_day_name(t->y, t->m, t->d)); break;
case 'j': length = slprintf(buffer, 32, "%d", (int) t->d); break;
case 'l': length = slprintf(buffer, 32, "%s", php_date_full_day_name(t->y, t->m, t->d)); break;
case 'S': length = slprintf(buffer, 32, "%s", english_suffix(t->d)); break;
case 'w': length = slprintf(buffer, 32, "%d", (int) timelib_day_of_week(t->y, t->m, t->d)); break;
case 'N': length = slprintf(buffer, 32, "%d", (int) timelib_iso_day_of_week(t->y, t->m, t->d)); break;
case 'z': length = slprintf(buffer, 32, "%d", (int) timelib_day_of_year(t->y, t->m, t->d)); break;
case 'd': length = slprintf(buffer, sizeof(buffer), "%02d", (int) t->d); break;
case 'D': length = slprintf(buffer, sizeof(buffer), "%s", php_date_short_day_name(t->y, t->m, t->d)); break;
case 'j': length = slprintf(buffer, sizeof(buffer), "%d", (int) t->d); break;
case 'l': length = slprintf(buffer, sizeof(buffer), "%s", php_date_full_day_name(t->y, t->m, t->d)); break;
case 'S': length = slprintf(buffer, sizeof(buffer), "%s", english_suffix(t->d)); break;
case 'w': length = slprintf(buffer, sizeof(buffer), "%d", (int) timelib_day_of_week(t->y, t->m, t->d)); break;
case 'N': length = slprintf(buffer, sizeof(buffer), "%d", (int) timelib_iso_day_of_week(t->y, t->m, t->d)); break;
case 'z': length = slprintf(buffer, sizeof(buffer), "%d", (int) timelib_day_of_year(t->y, t->m, t->d)); break;
/* week */
case 'W':
if(!weekYearSet) { timelib_isoweek_from_date(t->y, t->m, t->d, &isoweek, &isoyear); weekYearSet = 1; }
length = slprintf(buffer, 32, "%02d", (int) isoweek); break; /* iso weeknr */
length = slprintf(buffer, sizeof(buffer), "%02d", (int) isoweek); break; /* iso weeknr */
case 'o':
if(!weekYearSet) { timelib_isoweek_from_date(t->y, t->m, t->d, &isoweek, &isoyear); weekYearSet = 1; }
length = slprintf(buffer, 32, "%d", (int) isoyear); break; /* iso year */
length = slprintf(buffer, sizeof(buffer), "%d", (int) isoyear); break; /* iso year */
/* month */
case 'F': length = slprintf(buffer, 32, "%s", mon_full_names[t->m - 1]); break;
case 'm': length = slprintf(buffer, 32, "%02d", (int) t->m); break;
case 'M': length = slprintf(buffer, 32, "%s", mon_short_names[t->m - 1]); break;
case 'n': length = slprintf(buffer, 32, "%d", (int) t->m); break;
case 't': length = slprintf(buffer, 32, "%d", (int) timelib_days_in_month(t->y, t->m)); break;
case 'F': length = slprintf(buffer, sizeof(buffer), "%s", mon_full_names[t->m - 1]); break;
case 'm': length = slprintf(buffer, sizeof(buffer), "%02d", (int) t->m); break;
case 'M': length = slprintf(buffer, sizeof(buffer), "%s", mon_short_names[t->m - 1]); break;
case 'n': length = slprintf(buffer, sizeof(buffer), "%d", (int) t->m); break;
case 't': length = slprintf(buffer, sizeof(buffer), "%d", (int) timelib_days_in_month(t->y, t->m)); break;
/* year */
case 'L': length = slprintf(buffer, 32, "%d", timelib_is_leap((int) t->y)); break;
case 'y': length = slprintf(buffer, 32, "%02d", (int) t->y % 100); break;
case 'Y': length = slprintf(buffer, 32, "%s%04lld", t->y < 0 ? "-" : "", php_date_llabs((timelib_sll) t->y)); break;
case 'L': length = slprintf(buffer, sizeof(buffer), "%d", timelib_is_leap((int) t->y)); break;
case 'y': length = slprintf(buffer, sizeof(buffer), "%02d", (int) t->y % 100); break;
case 'Y': length = slprintf(buffer, sizeof(buffer), "%s%04lld", t->y < 0 ? "-" : "", php_date_llabs((timelib_sll) t->y)); break;
/* time */
case 'a': length = slprintf(buffer, 32, "%s", t->h >= 12 ? "pm" : "am"); break;
case 'A': length = slprintf(buffer, 32, "%s", t->h >= 12 ? "PM" : "AM"); break;
case 'a': length = slprintf(buffer, sizeof(buffer), "%s", t->h >= 12 ? "pm" : "am"); break;
case 'A': length = slprintf(buffer, sizeof(buffer), "%s", t->h >= 12 ? "PM" : "AM"); break;
case 'B': {
int retval = ((((long)t->sse)-(((long)t->sse) - ((((long)t->sse) % 86400) + 3600))) * 10);
if (retval < 0) {
@@ -1167,41 +1168,41 @@ static zend_string *date_format(char *format, size_t format_len, timelib_time *t
}
/* Make sure to do this on a positive int to avoid rounding errors */
retval = (retval / 864) % 1000;
length = slprintf(buffer, 32, "%03d", retval);
length = slprintf(buffer, sizeof(buffer), "%03d", retval);
break;
}
case 'g': length = slprintf(buffer, 32, "%d", (t->h % 12) ? (int) t->h % 12 : 12); break;
case 'G': length = slprintf(buffer, 32, "%d", (int) t->h); break;
case 'h': length = slprintf(buffer, 32, "%02d", (t->h % 12) ? (int) t->h % 12 : 12); break;
case 'H': length = slprintf(buffer, 32, "%02d", (int) t->h); break;
case 'i': length = slprintf(buffer, 32, "%02d", (int) t->i); break;
case 's': length = slprintf(buffer, 32, "%02d", (int) t->s); break;
case 'u': length = slprintf(buffer, 32, "%06d", (int) floor(t->f * 1000000 + 0.5)); break;
case 'v': length = slprintf(buffer, 32, "%03d", (int) floor(t->f * 1000 + 0.5)); break;
case 'g': length = slprintf(buffer, sizeof(buffer), "%d", (t->h % 12) ? (int) t->h % 12 : 12); break;
case 'G': length = slprintf(buffer, sizeof(buffer), "%d", (int) t->h); break;
case 'h': length = slprintf(buffer, sizeof(buffer), "%02d", (t->h % 12) ? (int) t->h % 12 : 12); break;
case 'H': length = slprintf(buffer, sizeof(buffer), "%02d", (int) t->h); break;
case 'i': length = slprintf(buffer, sizeof(buffer), "%02d", (int) t->i); break;
case 's': length = slprintf(buffer, sizeof(buffer), "%02d", (int) t->s); break;
case 'u': length = slprintf(buffer, sizeof(buffer), "%06d", (int) floor(t->f * 1000000 + 0.5)); break;
case 'v': length = slprintf(buffer, sizeof(buffer), "%03d", (int) floor(t->f * 1000 + 0.5)); break;
/* timezone */
case 'I': length = slprintf(buffer, 32, "%d", localtime ? offset->is_dst : 0); break;
case 'I': length = slprintf(buffer, sizeof(buffer), "%d", localtime ? offset->is_dst : 0); break;
case 'P': rfc_colon = 1; /* break intentionally missing */
case 'O': length = slprintf(buffer, 32, "%c%02d%s%02d",
case 'O': length = slprintf(buffer, sizeof(buffer), "%c%02d%s%02d",
localtime ? ((offset->offset < 0) ? '-' : '+') : '+',
localtime ? abs(offset->offset / 3600) : 0,
rfc_colon ? ":" : "",
localtime ? abs((offset->offset % 3600) / 60) : 0
);
break;
case 'T': length = slprintf(buffer, 32, "%s", localtime ? offset->abbr : "GMT"); break;
case 'T': length = slprintf(buffer, sizeof(buffer), "%s", localtime ? offset->abbr : "GMT"); break;
case 'e': if (!localtime) {
length = slprintf(buffer, 32, "%s", "UTC");
length = slprintf(buffer, sizeof(buffer), "%s", "UTC");
} else {
switch (t->zone_type) {
case TIMELIB_ZONETYPE_ID:
length = slprintf(buffer, 32, "%s", t->tz_info->name);
length = slprintf(buffer, sizeof(buffer), "%s", t->tz_info->name);
break;
case TIMELIB_ZONETYPE_ABBR:
length = slprintf(buffer, 32, "%s", offset->abbr);
length = slprintf(buffer, sizeof(buffer), "%s", offset->abbr);
break;
case TIMELIB_ZONETYPE_OFFSET:
length = slprintf(buffer, 32, "%c%02d:%02d",
length = slprintf(buffer, sizeof(buffer), "%c%02d:%02d",
((offset->offset < 0) ? '-' : '+'),
abs(offset->offset / 3600),
abs((offset->offset % 3600) / 60)
@@ -1210,10 +1211,10 @@ static zend_string *date_format(char *format, size_t format_len, timelib_time *t
}
}
break;
case 'Z': length = slprintf(buffer, 32, "%d", localtime ? offset->offset : 0); break;
case 'Z': length = slprintf(buffer, sizeof(buffer), "%d", localtime ? offset->offset : 0); break;
/* full date/time */
case 'c': length = slprintf(buffer, 96, "%04d-%02d-%02dT%02d:%02d:%02d%c%02d:%02d",
case 'c': length = slprintf(buffer, sizeof(buffer), "%04d-%02d-%02dT%02d:%02d:%02d%c%02d:%02d",
(int) t->y, (int) t->m, (int) t->d,
(int) t->h, (int) t->i, (int) t->s,
localtime ? ((offset->offset < 0) ? '-' : '+') : '+',
@@ -1221,7 +1222,7 @@ static zend_string *date_format(char *format, size_t format_len, timelib_time *t
localtime ? abs((offset->offset % 3600) / 60) : 0
);
break;
case 'r': length = slprintf(buffer, 96, "%3s, %02d %3s %04d %02d:%02d:%02d %c%02d%02d",
case 'r': length = slprintf(buffer, sizeof(buffer), "%3s, %02d %3s %04d %02d:%02d:%02d %c%02d%02d",
php_date_short_day_name(t->y, t->m, t->d),
(int) t->d, mon_short_names[t->m - 1],
(int) t->y, (int) t->h, (int) t->i, (int) t->s,
@@ -1230,7 +1231,7 @@ static zend_string *date_format(char *format, size_t format_len, timelib_time *t
localtime ? abs((offset->offset % 3600) / 60) : 0
);
break;
case 'U': length = slprintf(buffer, 32, "%lld", (timelib_sll) t->sse); break;
case 'U': length = slprintf(buffer, sizeof(buffer), "%lld", (timelib_sll) t->sse); break;
case '\\': if (i < format_len) i++; /* break intentionally missing */
@@ -2100,6 +2101,7 @@ static void date_register_classes(void) /* {{{ */
date_object_handlers_timezone.clone_obj = date_object_clone_timezone;
date_object_handlers_timezone.get_properties = date_object_get_properties_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;
#define REGISTER_TIMEZONE_CLASS_CONST_STRING(const_name, value) \
zend_declare_class_constant_long(date_ce_timezone, const_name, sizeof(const_name)-1, value);
@@ -2377,6 +2379,45 @@ static HashTable *date_object_get_properties_timezone(zval *object) /* {{{ */
return props;
} /* }}} */
static HashTable *date_object_get_debug_info_timezone(zval *object, int *is_temp) /* {{{ */
{
HashTable *ht, *props;
zval zv;
php_timezone_obj *tzobj;
tzobj = Z_PHPTIMEZONE_P(object);
props = zend_std_get_properties(object);
*is_temp = 1;
ht = zend_array_dup(props);
ZVAL_LONG(&zv, tzobj->type);
zend_hash_str_update(ht, "timezone_type", sizeof("timezone_type")-1, &zv);
switch (tzobj->type) {
case TIMELIB_ZONETYPE_ID:
ZVAL_STRING(&zv, tzobj->tzi.tz->name);
break;
case TIMELIB_ZONETYPE_OFFSET: {
zend_string *tmpstr = zend_string_alloc(sizeof("UTC+05:00")-1, 0);
ZSTR_LEN(tmpstr) = snprintf(ZSTR_VAL(tmpstr), sizeof("+05:00"), "%c%02d:%02d",
tzobj->tzi.utc_offset > 0 ? '-' : '+',
abs(tzobj->tzi.utc_offset / 60),
abs((tzobj->tzi.utc_offset % 60)));
ZVAL_NEW_STR(&zv, tmpstr);
}
break;
case TIMELIB_ZONETYPE_ABBR:
ZVAL_STRING(&zv, tzobj->tzi.z.abbr);
break;
}
zend_hash_str_update(ht, "timezone", sizeof("timezone")-1, &zv);
return ht;
} /* }}} */
static inline zend_object *date_object_new_interval_ex(zend_class_entry *class_type, int init_props) /* {{{ */
{
php_interval_obj *intern;
@@ -4411,38 +4452,38 @@ static zend_string *date_interval_format(char *format, size_t format_len, timeli
for (i = 0; i < format_len; i++) {
if (have_format_spec) {
switch (format[i]) {
case 'Y': length = slprintf(buffer, 32, "%02d", (int) t->y); break;
case 'y': length = slprintf(buffer, 32, "%d", (int) t->y); break;
case 'Y': length = slprintf(buffer, sizeof(buffer), "%02d", (int) t->y); break;
case 'y': length = slprintf(buffer, sizeof(buffer), "%d", (int) t->y); break;
case 'M': length = slprintf(buffer, 32, "%02d", (int) t->m); break;
case 'm': length = slprintf(buffer, 32, "%d", (int) t->m); break;
case 'M': length = slprintf(buffer, sizeof(buffer), "%02d", (int) t->m); break;
case 'm': length = slprintf(buffer, sizeof(buffer), "%d", (int) t->m); break;
case 'D': length = slprintf(buffer, 32, "%02d", (int) t->d); break;
case 'd': length = slprintf(buffer, 32, "%d", (int) t->d); break;
case 'D': length = slprintf(buffer, sizeof(buffer), "%02d", (int) t->d); break;
case 'd': length = slprintf(buffer, sizeof(buffer), "%d", (int) t->d); break;
case 'H': length = slprintf(buffer, 32, "%02d", (int) t->h); break;
case 'h': length = slprintf(buffer, 32, "%d", (int) t->h); break;
case 'H': length = slprintf(buffer, sizeof(buffer), "%02d", (int) t->h); break;
case 'h': length = slprintf(buffer, sizeof(buffer), "%d", (int) t->h); break;
case 'I': length = slprintf(buffer, 32, "%02d", (int) t->i); break;
case 'i': length = slprintf(buffer, 32, "%d", (int) t->i); break;
case 'I': length = slprintf(buffer, sizeof(buffer), "%02d", (int) t->i); break;
case 'i': length = slprintf(buffer, sizeof(buffer), "%d", (int) t->i); break;
case 'S': length = slprintf(buffer, 32, "%02" ZEND_LONG_FMT_SPEC, (zend_long) t->s); break;
case 's': length = slprintf(buffer, 32, ZEND_LONG_FMT, (zend_long) t->s); break;
case 'S': length = slprintf(buffer, sizeof(buffer), "%02" ZEND_LONG_FMT_SPEC, (zend_long) t->s); break;
case 's': length = slprintf(buffer, sizeof(buffer), ZEND_LONG_FMT, (zend_long) t->s); break;
case 'F': length = slprintf(buffer, 32, "%06" ZEND_LONG_FMT_SPEC, (zend_long) (t->f * 1000000)); break;
case 'f': length = slprintf(buffer, 32, ZEND_LONG_FMT, (zend_long) (t->f * 1000000)); break;
case 'F': length = slprintf(buffer, sizeof(buffer), "%06" ZEND_LONG_FMT_SPEC, (zend_long) (t->f * 1000000)); break;
case 'f': length = slprintf(buffer, sizeof(buffer), ZEND_LONG_FMT, (zend_long) (t->f * 1000000)); break;
case 'a': {
if ((int) t->days != -99999) {
length = slprintf(buffer, 32, "%d", (int) t->days);
length = slprintf(buffer, sizeof(buffer), "%d", (int) t->days);
} else {
length = slprintf(buffer, 32, "(unknown)");
length = slprintf(buffer, sizeof(buffer), "(unknown)");
}
} break;
case 'r': length = slprintf(buffer, 32, "%s", t->invert ? "-" : ""); break;
case 'R': length = slprintf(buffer, 32, "%c", t->invert ? '-' : '+'); break;
case 'r': length = slprintf(buffer, sizeof(buffer), "%s", t->invert ? "-" : ""); break;
case 'R': length = slprintf(buffer, sizeof(buffer), "%c", t->invert ? '-' : '+'); break;
case '%': length = slprintf(buffer, 32, "%%"); break;
case '%': length = slprintf(buffer, sizeof(buffer), "%%"); break;
default: buffer[0] = '%'; buffer[1] = format[i]; buffer[2] = '\0'; length = 2; break;
}
smart_str_appendl(&string, buffer, length);
@@ -4701,11 +4742,11 @@ PHP_FUNCTION(timezone_identifiers_list)
const timelib_tzdb *tzdb;
const timelib_tzdb_index_entry *table;
int i, item_count;
zend_long what = PHP_DATE_TIMEZONE_GROUP_ALL;
zend_long what = PHP_DATE_TIMEZONE_GROUP_ALL;
char *option = NULL;
size_t option_len = 0;
size_t option_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|ls", &what, &option, &option_len) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|ls!", &what, &option, &option_len) == FAILURE) {
RETURN_FALSE;
}
+16 -16
View File
@@ -39,34 +39,30 @@ object(DateTimeZone)#%d (2) {
-- Add some properties --
object(DateTimeZone)#%d (4) {
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
["property1"]=>
int(99)
["property2"]=>
string(5) "Hello"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
-- clone it --
object(DateTimeZone)#%d (4) {
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
["property1"]=>
int(99)
["property2"]=>
string(5) "Hello"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
-- Add some more properties --
object(DateTimeZone)#%d (6) {
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
["property1"]=>
int(99)
["property2"]=>
@@ -75,14 +71,14 @@ object(DateTimeZone)#%d (6) {
bool(true)
["property4"]=>
float(10.5)
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
-- clone it --
object(DateTimeZone)#%d (6) {
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
["property1"]=>
int(99)
["property2"]=>
@@ -91,5 +87,9 @@ object(DateTimeZone)#%d (6) {
bool(true)
["property4"]=>
float(10.5)
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
===DONE===
+34
View File
@@ -0,0 +1,34 @@
--TEST--
Bug #68406 calling var_dump on a DateTimeZone object modifies it
--INI--
date.timezone=UTC
--FILE--
<?php
$tz1 = new DateTimeZone('Europe/Berlin');
$tz2 = new DateTimeZone('Europe/Berlin');
$d = new DateTime('2014-12-24 13:00:00', $tz1);
var_dump($d->getTimezone(), $tz2);
if($tz2 == $d->getTimezone()) {
echo "yes";
}
else {
echo "no";
}
--EXPECT--
object(DateTimeZone)#4 (2) {
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/Berlin"
}
object(DateTimeZone)#2 (2) {
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/Berlin"
}
yes
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Failing test case for #75857: Long timezones truncation
--CREDITS--
Gabriel Caruso (carusogabriel34@gmail.com)
--FILE--
<?php
$longDate = new DateTime('now', new DateTimeZone('America/Argentina/ComodRivadavia'));
$mediumDate = new DateTime('now', new DateTimeZone('America/Indiana/Indianapolis'));
$smallDate = new DateTime('now', new DateTimeZone('America/Sao_Paulo'));
var_dump($longDate->format('e'));
var_dump($mediumDate->format('e'));
var_dump($smallDate->format('e'));
?>
--EXPECT--
string(32) "America/Argentina/ComodRivadavia"
string(28) "America/Indiana/Indianapolis"
string(17) "America/Sao_Paulo"
+9
View File
@@ -0,0 +1,9 @@
--TEST--
Bug #75928: Argument 2 for `DateTimeZone::listIdentifiers()` should accept `null`
--FILE--
<?php
declare(strict_types=1);
var_dump(is_array(DateTimeZone::listIdentifiers(\DateTimeZone::ALL, null)));
?>
--EXPECT--
bool(true)
+1 -1
View File
@@ -33,6 +33,6 @@ if test "$PHP_DOM" != "no"; then
PHP_INSTALL_HEADERS([ext/dom/xml_common.h])
PHP_ADD_EXTENSION_DEP(dom, libxml)
], [
AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.])
AC_MSG_ERROR([libxml2 not found. Please check your libxml2 installation.])
])
fi
-1
View File
@@ -598,7 +598,6 @@ PHP_MINIT_FUNCTION(dom)
memcpy(&dom_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
dom_object_handlers.offset = XtOffsetOf(dom_object, std);
dom_object_handlers.free_obj = dom_objects_free_storage;
dom_object_handlers.clone_obj = dom_objects_store_clone_obj;
dom_object_handlers.read_property = dom_read_property;
dom_object_handlers.write_property = dom_write_property;
dom_object_handlers.get_property_ptr_ptr = dom_get_property_ptr_ptr;
+1 -1
View File
@@ -141,7 +141,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_nb_fget, 0, 0, 4)
ZEND_ARG_INFO(0, resumepos)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_ftp_pasv, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_pasv, 0, 0, 2)
ZEND_ARG_INFO(0, ftp)
ZEND_ARG_INFO(0, pasv)
ZEND_END_ARG_INFO()
+2 -2
View File
@@ -819,7 +819,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_imageaffinematrixconcat, 0)
ZEND_ARG_INFO(0, m2)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_imagesetinterpolation, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_imagesetinterpolation, 0, 0, 1)
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, method)
ZEND_END_ARG_INFO()
@@ -4720,7 +4720,7 @@ PHP_FUNCTION(imagescale)
}
}
if (tmp_h <= 0 || tmp_w <= 0) {
if (tmp_h <= 0 || tmp_h > INT_MAX || tmp_w <= 0 || tmp_w > INT_MAX) {
RETURN_FALSE;
}
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #73957 (signed integer conversion in imagescale())
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
if (PHP_INT_SIZE != 8) die('skip this test is for 64bit platforms only');
?>
--FILE--
<?php
$im = imagecreate(8, 8);
$im = imagescale($im, 0x100000001, 1);
var_dump($im);
if ($im) { // which is not supposed to happen
var_dump(imagesx($im));
}
?>
===DONE===
--EXPECT--
bool(false)
===DONE===
+2 -2
View File
@@ -1956,8 +1956,8 @@ ZEND_FUNCTION(gmp_setbit)
php_error_docref(NULL, E_WARNING, "Index must be greater than or equal to zero");
RETURN_FALSE;
}
if (index / GMP_NUMB_BITS >= INT_MAX ) {
php_error_docref(NULL, E_WARNING, "Index must be less than %ld * %ld", INT_MAX, GMP_NUMB_BITS);
if (index / GMP_NUMB_BITS >= INT_MAX) {
php_error_docref(NULL, E_WARNING, "Index must be less than %d * %d", INT_MAX, GMP_NUMB_BITS);
RETURN_FALSE;
}
+2
View File
@@ -563,6 +563,8 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len,
size_t result;
zend_string *ret, *out_buffer;
*out = NULL;
/*
This is not the right way to get output size...
This is not space efficient for large text.
@@ -28,7 +28,9 @@
*/
PHP_METHOD(Spoofchecker, __construct)
{
#if U_ICU_VERSION_MAJOR_NUM < 58
int checks;
#endif
zend_error_handling error_handling;
SPOOFCHECKER_METHOD_INIT_VARS;
+12 -10
View File
@@ -117,14 +117,16 @@ if test "$PHP_LDAP" != "no"; then
LDAP_PTHREAD=
fi
if test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME; then
MACHINE_INCLUDES=$($CC -dumpmachine)
if test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.a || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/liblber.$SHLIB_SUFFIX_NAME; then
PHP_ADD_LIBRARY_WITH_PATH(lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(ldap, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
elif test -f $LDAP_LIBDIR/libldap.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/libldap.$SHLIB_SUFFIX_NAME.3 || test -f $LDAP_LIBDIR/libldap.3.dylib; then
elif test -f $LDAP_LIBDIR/libldap.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/libldap.$SHLIB_SUFFIX_NAME.3 || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libldap.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libldap.$SHLIB_SUFFIX_NAME.3 || test -f $LDAP_LIBDIR/libldap.3.dylib; then
PHP_ADD_LIBRARY_WITH_PATH(ldap, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
elif test -f $LDAP_LIBDIR/libssldap50.$SHLIB_SUFFIX_NAME; then
elif test -f $LDAP_LIBDIR/libssldap50.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libssldap50.$SHLIB_SUFFIX_NAME; then
if test -n "$LDAP_PTHREAD"; then
PHP_ADD_LIBRARY($LDAP_PTHREAD)
fi
@@ -137,7 +139,7 @@ if test "$PHP_LDAP" != "no"; then
PHP_ADD_LIBRARY_WITH_PATH(ssl3, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
AC_DEFINE(HAVE_NSLDAP,1,[ ])
elif test -f $LDAP_LIBDIR/libldapssl41.$SHLIB_SUFFIX_NAME; then
elif test -f $LDAP_LIBDIR/libldapssl41.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libldapssl41.$SHLIB_SUFFIX_NAME; then
if test -n "$LDAP_PTHREAD"; then
PHP_ADD_LIBRARY($LDAP_PTHREAD)
fi
@@ -147,35 +149,35 @@ if test "$PHP_LDAP" != "no"; then
PHP_ADD_LIBRARY_WITH_PATH(ldapssl41, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
AC_DEFINE(HAVE_NSLDAP,1,[ ])
elif test -f $LDAP_LIBDIR/libldapssl30.$SHLIB_SUFFIX_NAME; then
elif test -f $LDAP_LIBDIR/libldapssl30.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libldapssl30.$SHLIB_SUFFIX_NAME; then
if test -n "$LDAP_PTHREAD"; then
PHP_ADD_LIBRARY($LDAP_PTHREAD)
fi
PHP_ADD_LIBRARY_WITH_PATH(ldapssl30, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
AC_DEFINE(HAVE_NSLDAP,1,[ ])
elif test -f $LDAP_LIBDIR/libldap30.$SHLIB_SUFFIX_NAME; then
elif test -f $LDAP_LIBDIR/libldap30.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libldap30.$SHLIB_SUFFIX_NAME; then
if test -n "$LDAP_PTHREAD"; then
PHP_ADD_LIBRARY($LDAP_PTHREAD)
fi
PHP_ADD_LIBRARY_WITH_PATH(ldap30, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
AC_DEFINE(HAVE_NSLDAP,1,[ ])
elif test -f $LDAP_LIBDIR/libumich_ldap.$SHLIB_SUFFIX_NAME; then
elif test -f $LDAP_LIBDIR/libumich_ldap.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libumich_ldap.$SHLIB_SUFFIX_NAME; then
PHP_ADD_LIBRARY_WITH_PATH(umich_lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(umich_ldap, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.12.1; then
elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.12.1 || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libclntsh.$SHLIB_SUFFIX_NAME.12.1; then
PHP_ADD_LIBRARY_WITH_PATH(clntsh, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
AC_DEFINE(HAVE_ORALDAP,1,[ ])
AC_DEFINE(HAVE_ORALDAP_12,1,[ ])
elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.11.1; then
elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME.11.1 || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libclntsh.$SHLIB_SUFFIX_NAME.11.1; then
PHP_ADD_LIBRARY_WITH_PATH(clntsh, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
AC_DEFINE(HAVE_ORALDAP,1,[ ])
AC_DEFINE(HAVE_ORALDAP_11,1,[ ])
elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME; then
elif test -f $LDAP_LIBDIR/libclntsh.$SHLIB_SUFFIX_NAME || test -f $LDAP_LIBDIR/$MACHINE_INCLUDES/libclntsh.$SHLIB_SUFFIX_NAME; then
PHP_ADD_LIBRARY_WITH_PATH(clntsh, $LDAP_LIBDIR, LDAP_SHARED_LIBADD)
AC_DEFINE(HAVE_ORALDAP,1,[ ])
AC_DEFINE(HAVE_ORALDAP_10,1,[ ])
+1 -1
View File
@@ -20,6 +20,6 @@ if test "$PHP_LIBXML" != "no"; then
PHP_NEW_EXTENSION(libxml, [libxml.c], $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
PHP_INSTALL_HEADERS([ext/libxml/php_libxml.h])
], [
AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.])
AC_MSG_ERROR([libxml2 not found. Please check your libxml2 installation.])
])
fi
@@ -30,7 +30,7 @@ static const unsigned short cp1251_ucs_table[] = {
0x0402, 0x0403, 0x201a, 0x0453, 0x201e, 0x2026, 0x2020, 0x2021,
0x20ac, 0x2030, 0x0409, 0x2039, 0x040a, 0x040c, 0x040b, 0x040f,
0x0452, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
0x003f, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f,
0xfffd, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f,
0x00a0, 0x040e, 0x045e, 0x0408, 0x00a4, 0x0490, 0x00a6, 0x00a7,
0x0401, 0x00a9, 0x0404, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x0407,
0x00b0, 0x00b1, 0x0406, 0x0456, 0x0491, 0x00b5, 0x00b6, 0x00b7,
@@ -32,9 +32,9 @@
* as it only covers this range, while the rest cover 0xa0 onwards */
static const unsigned short cp1252_ucs_table[] = {
0x20ac,0xfffe,0x201a,0x0192,0x201e,0x2026,0x2020,0x2021,
0x02c6,0x2030,0x0160,0x2039,0x0152,0xfffe,0x017d,0xfffe,
0xfffe,0x2018,0x2019,0x201c,0x201d,0x2022,0x2013,0x2014,
0x02dc,0x2122,0x0161,0x203a,0x0153,0xfffe,0x017e,0x0178
0x20ac,0xfffd,0x201a,0x0192,0x201e,0x2026,0x2020,0x2021,
0x02c6,0x2030,0x0160,0x2039,0x0152,0xfffd,0x017d,0xfffd,
0xfffd,0x2018,0x2019,0x201c,0x201d,0x2022,0x2013,0x2014,
0x02dc,0x2122,0x0161,0x203a,0x0153,0xfffd,0x017e,0x0178
};
#endif /* UNICODE_TABLE_CP1252_H */
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug #62545 (wrong unicode mapping in some charsets)
--SKIPIF--
<?php
if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
?>
--FILE--
<?php
var_dump(
bin2hex(mb_convert_encoding("\x98", 'UTF-8', 'Windows-1251')),
bin2hex(mb_convert_encoding("\x81\x8d\x8f\x90\x9d", 'UTF-8', 'Windows-1252'))
);
?>
===DONE===
--EXPECT--
string(6) "efbfbd"
string(30) "efbfbdefbfbdefbfbdefbfbdefbfbd"
===DONE===
+16 -9
View File
@@ -79,11 +79,15 @@ mysqlnd_run_authentication(
struct st_mysqlnd_authentication_plugin * auth_plugin = conn->m->fetch_auth_plugin_by_name(requested_protocol);
if (!auth_plugin) {
php_error_docref(NULL, E_WARNING, "The server requested authentication method unknown to the client [%s]", requested_protocol);
SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "The server requested authentication method unknown to the client");
goto end;
if (first_call) {
mnd_pefree(requested_protocol, FALSE);
requested_protocol = mnd_pestrdup(MYSQLND_DEFAULT_AUTH_PROTOCOL, FALSE);
} else {
php_error_docref(NULL, E_WARNING, "The server requested authentication method unknown to the client [%s]", requested_protocol);
SET_CLIENT_ERROR(conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "The server requested authentication method unknown to the client");
goto end;
}
}
DBG_INF("plugin found");
{
zend_uchar * switch_to_auth_protocol_data = NULL;
@@ -108,10 +112,13 @@ mysqlnd_run_authentication(
DBG_INF_FMT("salt(%d)=[%.*s]", plugin_data_len, plugin_data_len, plugin_data);
/* The data should be allocated with malloc() */
scrambled_data =
auth_plugin->methods.get_auth_data(NULL, &scrambled_data_len, conn, user, passwd, passwd_len,
plugin_data, plugin_data_len, session_options,
conn->protocol_frame_codec->data, mysql_flags);
if (auth_plugin) {
scrambled_data =
auth_plugin->methods.get_auth_data(NULL, &scrambled_data_len, conn, user, passwd, passwd_len,
plugin_data, plugin_data_len, session_options,
conn->protocol_frame_codec->data, mysql_flags);
}
if (conn->error_info->error_no) {
goto end;
}
@@ -780,7 +787,7 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self
DBG_INF_FMT("salt(%d)=[%.*s]", auth_plugin_data_len, auth_plugin_data_len, auth_plugin_data);
if (conn->protocol_frame_codec->data->ssl) {
if (conn->vio->data->ssl) {
DBG_INF("simple clear text under SSL");
/* clear text under SSL */
*auth_data_len = passwd_len;
+1
View File
@@ -517,6 +517,7 @@ MYSQLND_METHOD(mysqlnd_vio, enable_ssl)(MYSQLND_VIO * const net)
zval cafile_zval;
ZVAL_STRING(&cafile_zval, net->data->options.ssl_ca);
php_stream_context_set_option(context, "ssl", "cafile", &cafile_zval);
zval_ptr_dtor(&cafile_zval);
any_flag = TRUE;
}
if (net->data->options.ssl_capath) {
+7
View File
@@ -1027,6 +1027,13 @@ int odbc_bindcols(odbc_result *result)
break;
}
#endif
/* Workaround for drivers that report VARCHAR(MAX) columns as SQL_VARCHAR (bug #73725) */
if (SQL_VARCHAR == result->values[i].coltype && displaysize == 0) {
result->values[i].coltype = SQL_LONGVARCHAR;
result->values[i].value = NULL;
break;
}
/* Workaround for Oracle ODBC Driver bug (#50162) when fetching TIMESTAMP column */
if (result->values[i].coltype == SQL_TIMESTAMP) {
displaysize += 3;
+55
View File
@@ -0,0 +1,55 @@
--TEST--
Bug #73725 Unable to retrieve value of varchar(max) type
--SKIPIF--
<?php include 'skipif.inc'; ?>
--FILE--
<?php
include dirname(__FILE__) . "/config.inc";
$conn = odbc_connect($dsn, $user, $pass);
odbc_do($conn, "CREATE TABLE bug73725(i int, txt varchar(max), k int)");
odbc_do($conn, "INSERT INTO bug73725 VALUES(101,'Any text', 33)");
odbc_do($conn, "INSERT INTO bug73725 VALUES(102,'Müsliriegel', 34)");
$rc = odbc_do($conn, "SELECT i, txt, k FROM bug73725");
$r = odbc_fetch_array($rc);
var_dump($r);
$r = odbc_fetch_array($rc);
var_dump($r);
?>
==DONE==
--EXPECT--
array(3) {
["i"]=>
string(3) "101"
["txt"]=>
string(8) "Any text"
["k"]=>
string(2) "33"
}
array(3) {
["i"]=>
string(3) "102"
["txt"]=>
string(12) "Müsliriegel"
["k"]=>
string(2) "34"
}
==DONE==
--CLEAN--
<?php
include 'config.inc';
$conn = odbc_connect($dsn, $user, $pass);
odbc_exec($conn, 'DROP TABLE bug73725');
odbc_close($conn);
?>
+7 -2
View File
@@ -792,8 +792,6 @@ optimize_const_unary_op:
}
opline++;
}
strip_nops(op_array, block);
}
/* Rebuild plain (optimized) op_array from CFG */
@@ -1838,6 +1836,13 @@ void zend_optimize_cfg(zend_op_array *op_array, zend_optimizer_ctx *ctx)
zend_optimize_block(b, op_array, usage, &cfg, Tsource);
}
/* Eliminate NOPs */
for (b = blocks; b < end; b++) {
if (b->flags & ZEND_BB_REACHABLE) {
strip_nops(op_array, b);
}
}
/* Jump optimization for each block */
for (b = blocks; b < end; b++) {
if (b->flags & ZEND_BB_REACHABLE) {
+31 -6
View File
@@ -157,6 +157,17 @@
} \
} while (0)
static inline zend_bool add_will_overflow(zend_long a, zend_long b) {
return (b > 0 && a > ZEND_LONG_MAX - b)
|| (b < 0 && a < ZEND_LONG_MIN - b);
}
#if 0
static inline zend_bool sub_will_overflow(zend_long a, zend_long b) {
return (b > 0 && a < ZEND_LONG_MIN + b)
|| (b < 0 && a > ZEND_LONG_MAX + b);
}
#endif
static void zend_ssa_check_scc_var(const zend_op_array *op_array, zend_ssa *ssa, int var, int *index, int *dfs, int *root, zend_worklist_stack *stack) /* {{{ */
{
#ifdef SYM_RANGE
@@ -826,7 +837,9 @@ int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int
#ifdef SYM_RANGE
} else if (narrowing && ssa->var_info[constraint->min_ssa_var].has_range) {
tmp->underflow = ssa->var_info[constraint->min_ssa_var].range.underflow && tmp->underflow;
tmp->min = MAX(ssa->var_info[constraint->min_ssa_var].range.min + constraint->range.min, tmp->min);
if (!add_will_overflow(ssa->var_info[constraint->min_ssa_var].range.min, constraint->range.min)) {
tmp->min = MAX(ssa->var_info[constraint->min_ssa_var].range.min + constraint->range.min, tmp->min);
}
#endif
}
if (constraint->max_ssa_var < 0) {
@@ -834,7 +847,9 @@ int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int
tmp->overflow = constraint->range.overflow && tmp->overflow;
#ifdef SYM_RANGE
} else if (narrowing && ssa->var_info[constraint->max_ssa_var].has_range) {
tmp->max = MIN(ssa->var_info[constraint->max_ssa_var].range.max + constraint->range.max, tmp->max);
if (!add_will_overflow(ssa->var_info[constraint->max_ssa_var].range.max, constraint->range.max)) {
tmp->max = MIN(ssa->var_info[constraint->max_ssa_var].range.max + constraint->range.max, tmp->max);
}
tmp->overflow = ssa->var_info[constraint->max_ssa_var].range.overflow && tmp->overflow;
#endif
}
@@ -844,8 +859,13 @@ int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int
tmp->min = constraint->range.min;
#ifdef SYM_RANGE
} else if (narrowing && ssa->var_info[constraint->min_ssa_var].has_range) {
tmp->underflow = ssa->var_info[constraint->min_ssa_var].range.underflow;
tmp->min = ssa->var_info[constraint->min_ssa_var].range.min + constraint->range.min;
if (add_will_overflow(ssa->var_info[constraint->min_ssa_var].range.min, constraint->range.min)) {
tmp->underflow = 1;
tmp->min = ZEND_LONG_MIN;
} else {
tmp->underflow = ssa->var_info[constraint->min_ssa_var].range.underflow;
tmp->min = ssa->var_info[constraint->min_ssa_var].range.min + constraint->range.min;
}
#endif
} else {
tmp->underflow = 1;
@@ -856,8 +876,13 @@ int zend_inference_calc_range(const zend_op_array *op_array, zend_ssa *ssa, int
tmp->overflow = constraint->range.overflow;
#ifdef SYM_RANGE
} else if (narrowing && ssa->var_info[constraint->max_ssa_var].has_range) {
tmp->max = ssa->var_info[constraint->max_ssa_var].range.max + constraint->range.max;
tmp->overflow = ssa->var_info[constraint->max_ssa_var].range.overflow;
if (add_will_overflow(ssa->var_info[constraint->max_ssa_var].range.max, constraint->range.max)) {
tmp->overflow = 1;
tmp->max = ZEND_LONG_MAX;
} else {
tmp->max = ssa->var_info[constraint->max_ssa_var].range.max + constraint->range.max;
tmp->overflow = ssa->var_info[constraint->max_ssa_var].range.overflow;
}
#endif
} else {
tmp->max = ZEND_LONG_MAX;
+25 -10
View File
@@ -108,6 +108,9 @@ zend_accel_shared_globals *accel_shared_globals = NULL;
zend_bool accel_startup_ok = 0;
static char *zps_failure_reason = NULL;
char *zps_api_failure_reason = NULL;
#ifdef HAVE_OPCACHE_FILE_CACHE
zend_bool file_cache_only = 0; /* process uses file cache only */
#endif
#if ENABLE_FILE_CACHE_FALLBACK
zend_bool fallback_process = 0; /* process uses file cache fallback */
#endif
@@ -448,7 +451,7 @@ zend_string *accel_new_interned_string(zend_string *str)
Bucket *p;
#ifdef HAVE_OPCACHE_FILE_CACHE
if (ZCG(accel_directives).file_cache_only) {
if (file_cache_only) {
return str;
}
#endif
@@ -1232,8 +1235,8 @@ static zend_persistent_script *store_script_in_file_cache(zend_persistent_script
ZCG(mem) = zend_arena_alloc(&CG(arena), memory_used);
#endif
/* Copy into shared memory */
new_persistent_script = zend_accel_script_persist(new_persistent_script, NULL, 0);
/* Copy into memory block */
new_persistent_script = zend_accel_script_persist(new_persistent_script, NULL, 0, 0);
zend_shared_alloc_destroy_xlat_table();
@@ -1352,7 +1355,7 @@ static zend_persistent_script *cache_script_in_shared_memory(zend_persistent_scr
}
/* Copy into shared memory */
new_persistent_script = zend_accel_script_persist(new_persistent_script, &key, key_length);
new_persistent_script = zend_accel_script_persist(new_persistent_script, &key, key_length, 1);
zend_shared_alloc_destroy_xlat_table();
@@ -1700,7 +1703,7 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
/* The Accelerator is disabled, act as if without the Accelerator */
return accelerator_orig_compile_file(file_handle, type);
#ifdef HAVE_OPCACHE_FILE_CACHE
} else if (ZCG(accel_directives).file_cache_only) {
} else if (file_cache_only) {
return file_cache_compile_file(file_handle, type);
#endif
} else if ((!ZCG(counted) && !ZCSG(accelerator_enabled)) ||
@@ -1999,6 +2002,9 @@ static int persistent_stream_open_function(const char *filename, zend_file_handl
static zend_string* persistent_zend_resolve_path(const char *filename, int filename_len)
{
if (ZCG(enabled) && accel_startup_ok &&
#ifdef HAVE_OPCACHE_FILE_CACHE
!file_cache_only &&
#endif
(ZCG(counted) || ZCSG(accelerator_enabled)) &&
!ZCSG(restart_in_progress)) {
@@ -2130,7 +2136,7 @@ static void accel_activate(void)
ZCG(cwd_check) = 1;
#ifdef HAVE_OPCACHE_FILE_CACHE
if (ZCG(accel_directives).file_cache_only) {
if (file_cache_only) {
return;
}
#endif
@@ -2520,6 +2526,8 @@ static inline int accel_find_sapi(void)
static int zend_accel_init_shm(void)
{
int i;
zend_shared_alloc_lock();
accel_shared_globals = zend_shared_alloc(sizeof(zend_accel_shared_globals));
@@ -2583,6 +2591,11 @@ static int zend_accel_init_shm(void)
ZCSG(last_restart_time) = 0;
ZCSG(restart_in_progress) = 0;
for (i = 0; i < -HT_MIN_MASK; i++) {
ZCSG(uninitialized_bucket)[i] = HT_INVALID_IDX;
}
zend_shared_alloc_unlock();
return SUCCESS;
@@ -2801,7 +2814,8 @@ static int accel_startup(zend_extension *extension)
/* End of non-SHM dependent initializations */
/********************************************/
#ifdef HAVE_OPCACHE_FILE_CACHE
if (!ZCG(accel_directives).file_cache_only) {
file_cache_only = ZCG(accel_directives).file_cache_only;
if (!file_cache_only) {
#else
if (1) {
#endif
@@ -2839,6 +2853,7 @@ static int accel_startup(zend_extension *extension)
#if ENABLE_FILE_CACHE_FALLBACK
case ALLOC_FALLBACK:
zend_shared_alloc_lock();
file_cache_only = 1;
fallback_process = 1;
zend_accel_init_auto_globals();
zend_shared_alloc_unlock();
@@ -2937,7 +2952,7 @@ static void accel_free_ts_resources()
void accel_shutdown(void)
{
zend_ini_entry *ini_entry;
zend_bool file_cache_only = 0;
zend_bool _file_cache_only = 0;
zend_optimizer_shutdown();
@@ -2964,12 +2979,12 @@ void accel_shutdown(void)
zend_interned_strings_restore = orig_interned_strings_restore;
#ifdef HAVE_OPCACHE_FILE_CACHE
file_cache_only = ZCG(accel_directives).file_cache_only;
_file_cache_only = file_cache_only;
#endif
accel_free_ts_resources();
if (!file_cache_only) {
if (!_file_cache_only) {
zend_shared_alloc_shutdown();
}
zend_compile_file = accelerator_orig_compile_file;
+7
View File
@@ -120,6 +120,8 @@ extern int lock_file;
#if defined(HAVE_OPCACHE_FILE_CACHE) && defined(ZEND_WIN32)
# define ENABLE_FILE_CACHE_FALLBACK 1
#else
# define ENABLE_FILE_CACHE_FALLBACK 0
#endif
#if ZEND_WIN32
@@ -281,9 +283,14 @@ typedef struct _zend_accel_shared_globals {
char *interned_strings_end;
char *interned_strings_saved_top;
HashTable interned_strings;
/* uninitialized HashTable Support */
uint32_t uninitialized_bucket[-HT_MIN_MASK];
} zend_accel_shared_globals;
extern zend_bool accel_startup_ok;
#ifdef HAVE_OPCACHE_FILE_CACHE
extern zend_bool file_cache_only;
#endif
#if ENABLE_FILE_CACHE_FALLBACK
extern zend_bool fallback_process;
#endif
+1 -4
View File
@@ -71,7 +71,7 @@ static void zend_win_error_message(int type, char *msg, int err)
LocalFree( lpMsgBuf );
zend_accel_error(type, msg);
zend_accel_error(type, "%s", msg);
}
static char *create_name_with_username(char *name)
@@ -182,9 +182,6 @@ static int zend_shared_alloc_reattach(size_t requested_size, char **error_in)
}
accel_shared_globals = (zend_accel_shared_globals *)((char *)((zend_smm_shared_globals *)mapping_base)->app_shared_globals + ((char *)mapping_base - (char *)wanted_mb_save));
/* Make this process to use file-cache only */
ZCG(accel_directives).file_cache_only = 1;
return ALLOC_FALLBACK;
}
#endif
+24
View File
@@ -0,0 +1,24 @@
--TEST--
Bug #75969: Assertion failure in live range DCE due to block pass misoptimization
--INI--
opcache.enable_cli=1
opcache.optimization_level=-1
--FILE--
<?php
// This is required for the segfault
md5('foo');
class Extended_Class {};
$response = array(
'a' => 'b'
);
new Extended_Class( array(
'foo' => $response,
'foo2' => 'bar2'
) );
?>
===DONE===
--EXPECT--
===DONE===
+16
View File
@@ -0,0 +1,16 @@
--TEST--
Bug #76074 (opcache corrupts variable in for-loop)
--FILE--
<?php
function test(int $nr) {
for ($i = $nr; $i <= $nr + 1; $i++)
var_dump($i);
}
test(1);
?>
--EXPECT--
int(1)
int(2)
+5 -5
View File
@@ -406,7 +406,7 @@ void zend_accel_override_file_functions(void)
zend_function *old_function;
if (ZCG(enabled) && accel_startup_ok && ZCG(accel_directives).file_override_enabled) {
#ifdef HAVE_OPCACHE_FILE_CACHE
if (ZCG(accel_directives).file_cache_only) {
if (file_cache_only) {
zend_accel_error(ACCEL_LOG_WARNING, "file_override_enabled has no effect when file_cache_only is set");
return;
}
@@ -442,7 +442,7 @@ void zend_accel_info(ZEND_MODULE_INFO_FUNC_ARGS)
if (ZCG(enabled) && accel_startup_ok &&
#ifdef HAVE_OPCACHE_FILE_CACHE
((ZCG(counted) || ZCSG(accelerator_enabled)) || ZCG(accel_directives).file_cache_only)
((ZCG(counted) || ZCSG(accelerator_enabled)) || file_cache_only)
#else
(ZCG(counted) || ZCSG(accelerator_enabled))
#endif
@@ -457,7 +457,7 @@ void zend_accel_info(ZEND_MODULE_INFO_FUNC_ARGS)
php_info_print_table_row(2, "Optimization", "Disabled");
}
#ifdef HAVE_OPCACHE_FILE_CACHE
if (!ZCG(accel_directives).file_cache_only) {
if (!file_cache_only) {
php_info_print_table_row(2, "SHM Cache", "Enabled");
} else {
php_info_print_table_row(2, "SHM Cache", "Disabled");
@@ -467,7 +467,7 @@ void zend_accel_info(ZEND_MODULE_INFO_FUNC_ARGS)
} else {
php_info_print_table_row(2, "File Cache", "Disabled");
}
if (ZCG(accel_directives).file_cache_only) {
if (file_cache_only) {
if (!accel_startup_ok || zps_api_failure_reason) {
php_info_print_table_row(2, "Startup Failed", zps_api_failure_reason);
} else {
@@ -616,7 +616,7 @@ static ZEND_FUNCTION(opcache_get_status)
if (ZCG(accel_directives).file_cache) {
add_assoc_string(return_value, "file_cache", ZCG(accel_directives).file_cache);
}
if (ZCG(accel_directives).file_cache_only) {
if (file_cache_only) {
add_assoc_bool(return_value, "file_cache_only", 1);
return;
}
+1 -1
View File
@@ -180,7 +180,7 @@ static void zend_hash_clone_constants(HashTable *ht, HashTable *source)
ht->nNumUsed = 0;
ht->nNumOfElements = source->nNumOfElements;
ht->nNextFreeElement = source->nNextFreeElement;
ht->pDestructor = ZVAL_PTR_DTOR;
ht->pDestructor = NULL;
ht->u.flags = (source->u.flags & HASH_FLAG_INITIALIZED) | HASH_FLAG_APPLY_PROTECTION;
ht->nInternalPointer = source->nNumOfElements ? 0 : HT_INVALID_IDX;
+39 -4
View File
@@ -23,6 +23,9 @@
#include "zend_interfaces.h"
#include "php.h"
#ifdef ZEND_WIN32
#include "ext/standard/md5.h"
#endif
#ifdef HAVE_OPCACHE_FILE_CACHE
@@ -721,16 +724,43 @@ static char *zend_file_cache_get_bin_file_path(zend_string *script_path)
size_t len;
char *filename;
#ifndef ZEND_WIN32
len = strlen(ZCG(accel_directives).file_cache);
filename = emalloc(len + 33 + ZSTR_LEN(script_path) + sizeof(SUFFIX));
memcpy(filename, ZCG(accel_directives).file_cache, len);
#ifndef ZEND_WIN32
filename[len] = '/';
memcpy(filename + len + 1, ZCG(system_id), 32);
memcpy(filename + len + 33, ZSTR_VAL(script_path), ZSTR_LEN(script_path));
memcpy(filename + len + 33 + ZSTR_LEN(script_path), SUFFIX, sizeof(SUFFIX));
#else
PHP_MD5_CTX ctx;
char md5uname[32];
unsigned char digest[16], c;
size_t i;
char *uname = php_win32_get_username();
PHP_MD5Init(&ctx);
PHP_MD5Update(&ctx, uname, strlen(uname));
PHP_MD5Final(digest, &ctx);
for (i = 0; i < 16; i++) {
c = digest[i] >> 4;
c = (c <= 9) ? c + '0' : c - 10 + 'a';
md5uname[i * 2] = c;
c = digest[i] & 0x0f;
c = (c <= 9) ? c + '0' : c - 10 + 'a';
md5uname[(i * 2) + 1] = c;
}
len = strlen(ZCG(accel_directives).file_cache);
filename = emalloc(len + 33 + 33 + ZSTR_LEN(script_path) + sizeof(SUFFIX));
memcpy(filename, ZCG(accel_directives).file_cache, len);
filename[len] = '\\';
memcpy(filename + 1 + len, md5uname, 32);
len += 32;
filename[len] = '\\';
memcpy(filename + len + 1, ZCG(system_id), 32);
if (ZSTR_LEN(script_path) >= 2 && ':' == ZSTR_VAL(script_path)[1]) {
/* local fs */
@@ -743,6 +773,7 @@ static char *zend_file_cache_get_bin_file_path(zend_string *script_path)
memcpy(filename + len + 33, ZSTR_VAL(script_path), ZSTR_LEN(script_path));
memcpy(filename + len + 33 + ZSTR_LEN(script_path), SUFFIX, sizeof(SUFFIX));
}
free(uname);
#endif
return filename;
@@ -862,7 +893,11 @@ static void zend_file_cache_unserialize_hash(HashTable *ht,
ht->pDestructor = dtor;
if (!(ht->u.flags & HASH_FLAG_INITIALIZED)) {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
if (EXPECTED(!file_cache_only)) {
HT_SET_DATA_ADDR(ht, &ZCSG(uninitialized_bucket));
} else {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
}
return;
}
if (IS_UNSERIALIZED(ht->arData)) {
@@ -1178,7 +1213,7 @@ static void zend_file_cache_unserialize_class(zval *zv,
UNSERIALIZE_STR(ce->info.user.filename);
UNSERIALIZE_STR(ce->info.user.doc_comment);
zend_file_cache_unserialize_hash(&ce->properties_info,
script, buf, zend_file_cache_unserialize_prop_info, ZVAL_PTR_DTOR);
script, buf, zend_file_cache_unserialize_prop_info, NULL);
if (ce->trait_aliases) {
zend_trait_alias **p, *q;
@@ -1388,7 +1423,7 @@ zend_persistent_script *zend_file_cache_script_load(zend_file_handle *file_handl
return NULL;
}
if (!ZCG(accel_directives).file_cache_only &&
if (!file_cache_only &&
!ZCSG(restart_in_progress) &&
!ZSMMG(memory_exhausted) &&
accelerator_shm_read_lock() == SUCCESS) {
+36 -6
View File
@@ -35,7 +35,7 @@
#ifdef HAVE_OPCACHE_FILE_CACHE
#define zend_set_str_gc_flags(str) do { \
if (ZCG(accel_directives).file_cache_only) { \
if (file_cache_only) { \
GC_FLAGS(str) = IS_STR_INTERNED; \
} else { \
GC_FLAGS(str) = IS_STR_INTERNED | IS_STR_PERMANENT; \
@@ -86,14 +86,24 @@ static void zend_hash_persist(HashTable *ht, zend_persist_func_t pPersistElement
uint32_t idx, nIndex;
Bucket *p;
ht->pDestructor = NULL;
if (!(ht->u.flags & HASH_FLAG_INITIALIZED)) {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
if (EXPECTED(!ZCG(current_persistent_script)->corrupted)) {
HT_SET_DATA_ADDR(ht, &ZCSG(uninitialized_bucket));
} else {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
}
return;
}
if (ht->nNumUsed == 0) {
efree(HT_GET_DATA_ADDR(ht));
ht->nTableMask = HT_MIN_MASK;
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
if (EXPECTED(!ZCG(current_persistent_script)->corrupted)) {
HT_SET_DATA_ADDR(ht, &ZCSG(uninitialized_bucket));
} else {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
}
ht->u.flags &= ~HASH_FLAG_INITIALIZED;
return;
}
@@ -170,14 +180,24 @@ static void zend_hash_persist_immutable(HashTable *ht)
uint32_t idx, nIndex;
Bucket *p;
ht->pDestructor = NULL;
if (!(ht->u.flags & HASH_FLAG_INITIALIZED)) {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
if (EXPECTED(!ZCG(current_persistent_script)->corrupted)) {
HT_SET_DATA_ADDR(ht, &ZCSG(uninitialized_bucket));
} else {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
}
return;
}
if (ht->nNumUsed == 0) {
efree(HT_GET_DATA_ADDR(ht));
ht->nTableMask = HT_MIN_MASK;
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
if (EXPECTED(!ZCG(current_persistent_script)->corrupted)) {
HT_SET_DATA_ADDR(ht, &ZCSG(uninitialized_bucket));
} else {
HT_SET_DATA_ADDR(ht, &uninitialized_bucket);
}
ht->u.flags &= ~HASH_FLAG_INITIALIZED;
return;
}
@@ -829,9 +849,16 @@ static void zend_accel_persist_class_table(HashTable *class_table)
zend_hash_apply(class_table, (apply_func_t) zend_update_parent_ce);
}
zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script, char **key, unsigned int key_length)
zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script, char **key, unsigned int key_length, int for_shm)
{
script->mem = ZCG(mem);
script->corrupted = 0;
ZCG(current_persistent_script) = script;
if (!for_shm) {
/* script is not going to be saved in SHM */
script->corrupted = 1;
}
ZEND_ASSERT(((zend_uintptr_t)ZCG(mem) & 0x7) == 0); /* should be 8 byte aligned */
zend_shared_alloc_clear_xlat_table();
@@ -856,6 +883,9 @@ zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script
zend_hash_persist(&script->script.function_table, zend_persist_op_array);
zend_persist_op_array_ex(&script->script.main_op_array, script);
script->corrupted = 0;
ZCG(current_persistent_script) = NULL;
return script;
}
+1 -1
View File
@@ -24,6 +24,6 @@
int zend_accel_script_persistable(zend_persistent_script *script);
uint zend_accel_script_persist_calc(zend_persistent_script *script, char *key, unsigned int key_length, int for_shm);
zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script, char **key, unsigned int key_length);
zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script, char **key, unsigned int key_length, int for_shm);
#endif /* ZEND_PERSIST_H */
+7 -6
View File
@@ -155,12 +155,12 @@ ZEND_BEGIN_ARG_INFO(arginfo_openssl_x509_check_private_key, 0)
ZEND_ARG_INFO(0, key)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_x509_parse, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_parse, 0, 0, 1)
ZEND_ARG_INFO(0, x509)
ZEND_ARG_INFO(0, shortname)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_checkpurpose, 0, 0, 3)
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_x509_checkpurpose, 0, 0, 2)
ZEND_ARG_INFO(0, x509cert)
ZEND_ARG_INFO(0, purpose)
ZEND_ARG_INFO(0, cainfo) /* array */
@@ -183,7 +183,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkcs12_export_to_file, 0, 0, 4)
ZEND_ARG_INFO(0, args) /* array */
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_pkcs12_export, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkcs12_export, 0, 0, 4)
ZEND_ARG_INFO(0, x509)
ZEND_ARG_INFO(1, out)
ZEND_ARG_INFO(0, priv_key)
@@ -225,12 +225,14 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_new, 0, 0, 2)
ZEND_ARG_INFO(0, extraattribs)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_csr_get_subject, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_get_subject, 0, 0, 1)
ZEND_ARG_INFO(0, csr)
ZEND_ARG_INFO(0, use_shortnames)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_openssl_csr_get_public_key, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_csr_get_public_key, 0, 0, 1)
ZEND_ARG_INFO(0, csr)
ZEND_ARG_INFO(0, use_shortnames)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_pkey_new, 0, 0, 0)
@@ -6652,4 +6654,3 @@ PHP_FUNCTION(openssl_random_pseudo_bytes)
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/
@@ -12,7 +12,7 @@ $cert = "file://" . dirname(__FILE__) . "/cert.crt";
$bert = "file://" . dirname(__FILE__) . "/bug41033.pem";
$sert = "file://" . dirname(__FILE__) . "/san-cert.pem";
$cpca = dirname(__FILE__) . "/san-ca.pem";
$utfl = dirname(__FILE__) . "/sni_server_domain1.pem";
$utfl = dirname(__FILE__) . "/sni_server_uk.pem";
$rcrt = openssl_x509_read($cert);
/* int openssl_x509_checkpurpose ( mixed $x509cert , int $purpose); */
+9 -10
View File
@@ -3,7 +3,6 @@ sni_server
--SKIPIF--
<?php
if (!extension_loaded("openssl")) die("skip openssl not loaded");
if (OPENSSL_VERSION_NUMBER >= 0x10100000) die("skip OpenSSL < v1.1.0 required");
--FILE--
<?php
$serverCode = <<<'CODE'
@@ -11,9 +10,9 @@ $serverCode = <<<'CODE'
$ctx = stream_context_create(['ssl' => [
'local_cert' => __DIR__ . '/domain1.pem',
'SNI_server_certs' => [
"domain1.com" => __DIR__ . "/sni_server_domain1.pem",
"domain2.com" => __DIR__ . "/sni_server_domain2.pem",
"domain3.com" => __DIR__ . "/sni_server_domain3.pem"
"cs.php.net" => __DIR__ . "/sni_server_cs.pem",
"uk.php.net" => __DIR__ . "/sni_server_uk.pem",
"us.php.net" => __DIR__ . "/sni_server_us.pem"
]
]]);
@@ -34,19 +33,19 @@ $clientCode = <<<'CODE'
phpt_wait();
$ctxArr['peer_name'] = 'domain1.com';
$ctxArr['peer_name'] = 'cs.php.net';
$ctx = stream_context_create(['ssl' => $ctxArr]);
$client = stream_socket_client("tls://127.0.0.1:64321", $errno, $errstr, 1, $flags, $ctx);
$cert = stream_context_get_options($ctx)['ssl']['peer_certificate'];
var_dump(openssl_x509_parse($cert)['subject']['CN']);
$ctxArr['peer_name'] = 'domain2.com';
$ctxArr['peer_name'] = 'uk.php.net';
$ctx = stream_context_create(['ssl' => $ctxArr]);
$client = @stream_socket_client("tls://127.0.0.1:64321", $errno, $errstr, 1, $flags, $ctx);
$cert = stream_context_get_options($ctx)['ssl']['peer_certificate'];
var_dump(openssl_x509_parse($cert)['subject']['CN']);
$ctxArr['peer_name'] = 'domain3.com';
$ctxArr['peer_name'] = 'us.php.net';
$ctx = stream_context_create(['ssl' => $ctxArr]);
$client = @stream_socket_client("tls://127.0.0.1:64321", $errno, $errstr, 1, $flags, $ctx);
$cert = stream_context_get_options($ctx)['ssl']['peer_certificate'];
@@ -56,6 +55,6 @@ CODE;
include 'ServerClientTestCase.inc';
ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
--EXPECTF--
string(%d) "domain1.com"
string(%d) "domain2.com"
string(%d) "domain3.com"
string(%d) "cs.php.net"
string(%d) "uk.php.net"
string(%d) "us.php.net"
+59 -59
View File
@@ -1,63 +1,63 @@
-----BEGIN CERTIFICATE-----
MIIFPjCCAyYCAQEwDQYJKoZIhvcNAQEFBQAwWTELMAkGA1UEBhMCVVMxCzAJBgNV
BAgMAlNDMRUwEwYDVQQHDAxNeXJ0bGUgQmVhY2gxEjAQBgNVBAoMCXBocC50ZXN0
czESMBAGA1UEAwwJcGhwLnRlc3RzMB4XDTE0MDMwNTE0MTg1M1oXDTI0MDMwMjE0
MTg1M1owcTELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxNeXJ0
bGUgQmVhY2gxHjAcBgNVBAoMFXBocC50ZXN0cyBzdWJvcmRpbmF0ZTEeMBwGA1UE
AwwVcGhwLnRlc3RzLnN1Ym9yZGluYXRlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
MIICCgKCAgEA4rmcz5M0B2Td+0g8+pmGT0IBCxZTVL14xKA1yLeY+6eshdNiRAIR
8m5sI21AirtAh7mJziA2Q4C/1bRvY9VI/0yxXRP20aicNmhEvFVAvQCxmAkg8hIm
WwDiNLw+4HpAkQInpd8exjExhvanUgAz6tq8w6CL2BqquiwQPVIf5HHMHjomz1gz
iZEs6CRE5YMdUd7ZSx+MHl6ww3WYwW/XHDPzAUIe8uhOT+yA8lVLFAac3+lyjA6g
zMPYG5SrqE6/+yZYDVx2WhVMjJq8d+N6hnIkhZeJyZo2T0G7/pSGIwaVsceIJ/8/
6km8p4Dn2Pq75F8RZW5iz0MnSqKqSH/ANP71UuinpcVfnyg0ajy7J+cNMDC3gNPC
L0b13qRhRsjNYdyOR7Aj5uQgCegDVip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6sNSBjw9Ech78uXN1BQOBTK
lhAgN3FKqOp3hqf0umqf35gDvmWwLB/eptUYZ96gBYT0tbPA0P+YsW+iZmamxXma
Odgg8iRcPxKl9bVPt57NLaDy/RQhOxTGXQs1Q2jp7UhzqoZDClwVSDxd6DEppAFA
OZAY+Rsrm7VoCwVQ/1KbcJHmJ/79tArvaWJk3KHLGMpdZq4KwrC3hM8/QxYtyX/6
cfnXvShBYCdfTGgNlj3t/mNAgp1ZB3s9ClGqRBR/P0Db+ryv5DuxYM6nzEB3Od0y
kT5tHbXDQY+1HCExjOMi7Al0cmC2r3+oxDA4UjGv+npgcfeoxQhXmm/SQRiPdKlb
vT0D594sLoB23jqA9bMehpxEyI7eGjfFUmXwMeu0tJhipvpJI3ogJoM+SCFTyLkc
12cPiz/sR/ALhvhUJXTeUH8wxPjzbA==
-----END CERTIFICATE-----
+22 -7
View File
@@ -756,14 +756,17 @@ PHP_FUNCTION(pcntl_wifexited)
{
#ifdef WIFEXITED
zend_long status_word;
int int_status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
return;
}
if (WIFEXITED(status_word))
int_status_word = (int) status_word;
if (WIFEXITED(int_status_word))
RETURN_TRUE;
#endif
RETURN_FALSE;
}
/* }}} */
@@ -774,12 +777,14 @@ PHP_FUNCTION(pcntl_wifstopped)
{
#ifdef WIFSTOPPED
zend_long status_word;
int int_status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
return;
}
if (WIFSTOPPED(status_word))
int_status_word = (int) status_word;
if (WIFSTOPPED(int_status_word))
RETURN_TRUE;
#endif
RETURN_FALSE;
@@ -792,12 +797,14 @@ PHP_FUNCTION(pcntl_wifsignaled)
{
#ifdef WIFSIGNALED
zend_long status_word;
int int_status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
return;
}
if (WIFSIGNALED(status_word))
int_status_word = (int) status_word;
if (WIFSIGNALED(int_status_word))
RETURN_TRUE;
#endif
RETURN_FALSE;
@@ -809,12 +816,14 @@ PHP_FUNCTION(pcntl_wifcontinued)
{
#ifdef HAVE_WCONTINUED
zend_long status_word;
int int_status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
return;
}
if (WIFCONTINUED(status_word))
int_status_word = (int) status_word;
if (WIFCONTINUED(int_status_word))
RETURN_TRUE;
#endif
RETURN_FALSE;
@@ -828,12 +837,14 @@ PHP_FUNCTION(pcntl_wexitstatus)
{
#ifdef WEXITSTATUS
zend_long status_word;
int int_status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
return;
}
RETURN_LONG(WEXITSTATUS(status_word));
int_status_word = (int) status_word;
RETURN_LONG(WEXITSTATUS(int_status_word));
#else
RETURN_FALSE;
#endif
@@ -846,12 +857,14 @@ PHP_FUNCTION(pcntl_wtermsig)
{
#ifdef WTERMSIG
zend_long status_word;
int int_status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
return;
}
RETURN_LONG(WTERMSIG(status_word));
int_status_word = (int) status_word;
RETURN_LONG(WTERMSIG(int_status_word));
#else
RETURN_FALSE;
#endif
@@ -864,12 +877,14 @@ PHP_FUNCTION(pcntl_wstopsig)
{
#ifdef WSTOPSIG
zend_long status_word;
int int_status_word;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) {
return;
}
RETURN_LONG(WSTOPSIG(status_word));
int_status_word = (int) status_word;
RETURN_LONG(WSTOPSIG(int_status_word));
#else
RETURN_FALSE;
#endif
+4 -1
View File
@@ -618,11 +618,13 @@ static zend_always_inline char * pdo_pgsql_translate_oid_to_table(Oid oid, PGcon
}
efree(querystr);
if ((table_name = PQgetvalue(tmp_res, 0, 0)) == NULL) {
if (1 == PQgetisnull(tmp_res, 0, 0) || (table_name = PQgetvalue(tmp_res, 0, 0)) == NULL) {
PQclear(tmp_res);
return 0;
}
table_name = estrdup(table_name);
PQclear(tmp_res);
return table_name;
}
@@ -652,6 +654,7 @@ static int pgsql_stmt_get_column_meta(pdo_stmt_t *stmt, zend_long colno, zval *r
table_name = pdo_pgsql_translate_oid_to_table(table_oid, S->H->server);
if (table_name) {
add_assoc_string(return_value, "table", table_name);
efree(table_name);
}
switch (S->cols[colno].pgsql_type) {
+1
View File
@@ -4442,6 +4442,7 @@ PHP_FUNCTION(pg_escape_bytea)
to = (char *)PQescapeBytea((unsigned char*)from, from_len, &to_len);
RETVAL_STRINGL(to, to_len-1); /* to_len includes additional '\0' */
PQfreemem(to);
}
/* }}} */
+7 -3
View File
@@ -3635,14 +3635,18 @@ PHP_METHOD(Phar, offsetGet)
*/
static void phar_add_file(phar_archive_data **pphar, char *filename, int filename_len, char *cont_str, size_t cont_len, zval *zresource)
{
int start_pos=0;
char *error;
size_t contents_len;
phar_entry_data *data;
php_stream *contents_file;
if (filename_len >= (int)sizeof(".phar")-1 && !memcmp(filename, ".phar", sizeof(".phar")-1) && (filename[5] == '/' || filename[5] == '\\' || filename[5] == '\0')) {
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Cannot create any files in magic \".phar\" directory");
return;
if (filename_len >= (int)sizeof(".phar")-1) {
start_pos = ('/' == filename[0] ? 1 : 0); /* account for any leading slash: multiple-leads handled elsewhere */
if (!memcmp(&filename[start_pos], ".phar", sizeof(".phar")-1) && (filename[start_pos+5] == '/' || filename[start_pos+5] == '\\' || filename[start_pos+5] == '\0')) {
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Cannot create any files in magic \".phar\" directory");
return;
}
}
if (!(data = phar_get_or_create_entry_data((*pphar)->fname, (*pphar)->fname_len, filename, filename_len, "w+b", 0, &error, 1))) {
+155 -198
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 */
/* Generated by re2c 0.16 */
#line 1 "ext/phar/phar_path_check.re"
/*
+----------------------------------------------------------------------+
@@ -47,158 +47,52 @@ loop:
{
YYCTYPE yych;
unsigned int yyaccept = 0;
if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
yych = *YYCURSOR;
if (yych <= '[') {
if (yych <= ')') {
if (yych <= '\t') {
if (yych <= 0x00) goto yy21;
goto yy23;
if (yych <= '\f') {
if (yych >= 0x01) goto yy4;
} else {
if (yych <= '\n') goto yy2;
if (yych <= 0x19) goto yy23;
goto yy11;
if (yych <= '\r') goto yy6;
if (yych <= 0x19) goto yy4;
goto yy7;
}
} else {
if (yych <= '/') {
if (yych <= '*') goto yy7;
if (yych <= '.') goto yy11;
goto yy3;
} else {
if (yych == '?') goto yy9;
if (yych <= '*') goto yy9;
if (yych <= '.') goto yy7;
goto yy11;
} else {
if (yych == '?') goto yy12;
goto yy7;
}
}
} else {
if (yych <= 0xEC) {
if (yych <= 0xC1) {
if (yych <= '\\') goto yy5;
if (yych <= 0x7F) goto yy11;
goto yy23;
if (yych <= '\\') goto yy14;
if (yych <= 0x7F) goto yy7;
goto yy4;
} else {
if (yych <= 0xDF) goto yy12;
if (yych <= 0xE0) goto yy14;
goto yy15;
if (yych <= 0xDF) goto yy16;
if (yych <= 0xE0) goto yy17;
goto yy18;
}
} else {
if (yych <= 0xF0) {
if (yych <= 0xED) goto yy16;
if (yych <= 0xEF) goto yy17;
goto yy18;
if (yych <= 0xED) goto yy19;
if (yych <= 0xEF) goto yy18;
goto yy20;
} else {
if (yych <= 0xF3) goto yy19;
if (yych <= 0xF4) goto yy20;
goto yy23;
if (yych <= 0xF3) goto yy21;
if (yych <= 0xF4) goto yy22;
goto yy4;
}
}
}
yy2:
YYCURSOR = YYMARKER;
if (yyaccept <= 0) {
goto yy4;
} else {
goto yy13;
}
yy3:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '-') goto yy4;
if (yych <= '.') goto yy35;
if (yych <= '/') goto yy36;
yy4:
#line 88 "ext/phar/phar_path_check.re"
{
goto loop;
}
#line 115 "ext/phar/phar_path_check.c"
yy5:
++YYCURSOR;
#line 72 "ext/phar/phar_path_check.re"
{
*error = "back-slash";
return pcr_err_back_slash;
}
#line 123 "ext/phar/phar_path_check.c"
yy7:
++YYCURSOR;
#line 76 "ext/phar/phar_path_check.re"
{
*error = "star";
return pcr_err_star;
}
#line 131 "ext/phar/phar_path_check.c"
yy9:
++YYCURSOR;
#line 80 "ext/phar/phar_path_check.re"
{
if (**s == '/') {
(*s)++;
}
*len = (p - (const unsigned char*)*s) -1;
*error = NULL;
return pcr_use_query;
}
#line 143 "ext/phar/phar_path_check.c"
yy11:
yych = *++YYCURSOR;
goto yy4;
yy12:
++YYCURSOR;
if ((yych = *YYCURSOR) <= 0x7F) goto yy13;
if (yych <= 0xBF) goto yy26;
yy13:
#line 104 "ext/phar/phar_path_check.re"
{
*error ="illegal character";
return pcr_err_illegal_char;
}
#line 157 "ext/phar/phar_path_check.c"
yy14:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x9F) goto yy13;
if (yych <= 0xBF) goto yy34;
goto yy13;
yy15:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy13;
if (yych <= 0xBF) goto yy33;
goto yy13;
yy16:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy13;
if (yych <= 0x9F) goto yy32;
goto yy13;
yy17:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy13;
if (yych <= 0xBF) goto yy31;
goto yy13;
yy18:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x8F) goto yy13;
if (yych <= 0xBF) goto yy29;
goto yy13;
yy19:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy13;
if (yych <= 0xBF) goto yy27;
goto yy13;
yy20:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy13;
if (yych <= 0x8F) goto yy24;
goto yy13;
yy21:
++YYCURSOR;
#line 91 "ext/phar/phar_path_check.re"
#line 93 "ext/phar/phar_path_check.re"
{
if (**s == '/') {
(*s)++;
@@ -212,93 +106,156 @@ yy21:
*error = NULL;
return pcr_is_ok;
}
#line 216 "ext/phar/phar_path_check.c"
#line 110 "ext/phar/phar_path_check.c"
yy4:
++YYCURSOR;
yy5:
#line 106 "ext/phar/phar_path_check.re"
{
*error ="illegal character";
return pcr_err_illegal_char;
}
#line 119 "ext/phar/phar_path_check.c"
yy6:
yych = *++YYCURSOR;
if (yych == '\n') goto yy4;
goto yy5;
yy7:
++YYCURSOR;
yy8:
#line 90 "ext/phar/phar_path_check.re"
{
goto loop;
}
#line 131 "ext/phar/phar_path_check.c"
yy9:
++YYCURSOR;
#line 78 "ext/phar/phar_path_check.re"
{
*error = "star";
return pcr_err_star;
}
#line 139 "ext/phar/phar_path_check.c"
yy11:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '-') goto yy8;
if (yych <= '.') goto yy23;
if (yych <= '/') goto yy25;
goto yy8;
yy12:
++YYCURSOR;
#line 82 "ext/phar/phar_path_check.re"
{
if (**s == '/') {
(*s)++;
}
*len = (p - (const unsigned char*)*s) -1;
*error = NULL;
return pcr_use_query;
}
#line 158 "ext/phar/phar_path_check.c"
yy14:
++YYCURSOR;
#line 74 "ext/phar/phar_path_check.re"
{
*error = "back-slash";
return pcr_err_back_slash;
}
#line 166 "ext/phar/phar_path_check.c"
yy16:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy5;
if (yych <= 0xBF) goto yy7;
goto yy5;
yy17:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x9F) goto yy5;
if (yych <= 0xBF) goto yy27;
goto yy5;
yy18:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy5;
if (yych <= 0xBF) goto yy27;
goto yy5;
yy19:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy5;
if (yych <= 0x9F) goto yy27;
goto yy5;
yy20:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x8F) goto yy5;
if (yych <= 0xBF) goto yy28;
goto yy5;
yy21:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy5;
if (yych <= 0xBF) goto yy28;
goto yy5;
yy22:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x7F) goto yy5;
if (yych <= 0x8F) goto yy28;
goto yy5;
yy23:
yych = *++YYCURSOR;
goto yy13;
if (yych <= 0x00) goto yy29;
if (yych <= '-') goto yy24;
if (yych <= '.') goto yy31;
if (yych <= '/') goto yy29;
yy24:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych >= 0xC0) goto yy2;
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych >= 0xC0) goto yy2;
yy26:
yych = *++YYCURSOR;
goto yy4;
yy27:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych >= 0xC0) goto yy2;
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych <= 0xBF) goto yy26;
goto yy2;
yy29:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych >= 0xC0) goto yy2;
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych <= 0xBF) goto yy26;
goto yy2;
yy31:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych <= 0xBF) goto yy26;
goto yy2;
yy32:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych <= 0xBF) goto yy26;
goto yy2;
yy33:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych <= 0xBF) goto yy26;
goto yy2;
yy34:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy2;
if (yych <= 0xBF) goto yy26;
goto yy2;
yy35:
yych = *++YYCURSOR;
if (yych <= 0x00) goto yy39;
if (yych <= '-') goto yy2;
if (yych <= '.') goto yy38;
if (yych <= '/') goto yy39;
goto yy2;
yy36:
YYCURSOR = YYMARKER;
if (yyaccept == 0) {
goto yy8;
} else {
goto yy5;
}
yy25:
++YYCURSOR;
#line 60 "ext/phar/phar_path_check.re"
#line 62 "ext/phar/phar_path_check.re"
{
*error = "double slash";
return pcr_err_double_slash;
}
#line 280 "ext/phar/phar_path_check.c"
yy38:
#line 228 "ext/phar/phar_path_check.c"
yy27:
yych = *++YYCURSOR;
if (yych <= 0x00) goto yy41;
if (yych == '/') goto yy41;
goto yy2;
yy39:
if (yych <= 0x7F) goto yy24;
if (yych <= 0xBF) goto yy7;
goto yy24;
yy28:
yych = *++YYCURSOR;
if (yych <= 0x7F) goto yy24;
if (yych <= 0xBF) goto yy27;
goto yy24;
yy29:
++YYCURSOR;
#line 68 "ext/phar/phar_path_check.re"
#line 70 "ext/phar/phar_path_check.re"
{
*error = "current directory reference";
return pcr_err_curr_dir;
}
#line 293 "ext/phar/phar_path_check.c"
yy41:
#line 246 "ext/phar/phar_path_check.c"
yy31:
yych = *++YYCURSOR;
if (yych <= 0x00) goto yy32;
if (yych != '/') goto yy24;
yy32:
++YYCURSOR;
#line 64 "ext/phar/phar_path_check.re"
#line 66 "ext/phar/phar_path_check.re"
{
*error = "upper directory reference";
return pcr_err_up_dir;
}
#line 301 "ext/phar/phar_path_check.c"
#line 258 "ext/phar/phar_path_check.c"
}
#line 108 "ext/phar/phar_path_check.re"
#line 110 "ext/phar/phar_path_check.re"
}
+5 -3
View File
@@ -41,7 +41,8 @@ phar_path_check_result phar_path_check(char **s, int *len, const char **error)
loop:
/*!re2c
END = "\x00";
END = "\x00";
NEWLINE = "\r"? "\n";
UTF8T = [\x80-\xBF] ;
UTF8_1 = [\x1A-\x7F] ;
UTF8_2 = [\xC2-\xDF] UTF8T ;
@@ -55,8 +56,9 @@ UTF8_4B = [\xF1-\xF3] UTF8T{3} ;
UTF8_4C = "\xF4" [\x80-\x8F] UTF8T{2} ;
UTF8_4 = UTF8_4A | UTF8_4B | UTF8_4C ;
UTF8 = UTF8_1 | UTF8_2 | UTF8_3 | UTF8_4 ;
EOS = "/" | END;
ANY = .;
EOS = "/" | END;
ANY = . | NEWLINE;
"//" {
*error = "double slash";
return pcr_err_double_slash;
+36
View File
@@ -0,0 +1,36 @@
--TEST--
Bug #65414 Injection (A1) in .phar files magic .phar directory
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--INI--
phar.readonly = 0
--FILE--
<?php
$phar = new \Phar(__DIR__ . '/bug65414.phar', 0, 'bug65414.phar');
$bads = [
'.phar/injected-1.txt',
'/.phar/injected-2.txt',
'//.phar/injected-3.txt',
'/.phar/',
];
foreach ($bads as $bad) {
echo $bad . ':';
try {
$phar->addFromString($bad, 'this content is injected');
echo 'Failed to throw expected exception';
} catch (BadMethodCallException $ex) {
echo $ex->getMessage() . PHP_EOL;
}
}
echo 'done' . PHP_EOL;
?>
--CLEAN--
<?php
unlink(__DIR__ . '/bug65414.phar');
?>
--EXPECT--
.phar/injected-1.txt:Cannot create any files in magic ".phar" directory
/.phar/injected-2.txt:Cannot create any files in magic ".phar" directory
//.phar/injected-3.txt:Entry //.phar/injected-3.txt does not exist and cannot be created: phar error: invalid path "//.phar/injected-3.txt" contains double slash
/.phar/:Cannot create any files in magic ".phar" directory
done
+1 -1
View File
@@ -21,7 +21,7 @@ if test "$PHP_SIMPLEXML" != "no"; then
PHP_INSTALL_HEADERS([ext/simplexml/php_simplexml.h ext/simplexml/php_simplexml_exports.h])
PHP_SUBST(SIMPLEXML_SHARED_LIBADD)
], [
AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.])
AC_MSG_ERROR([libxml2 not found. Please check your libxml2 installation.])
])
PHP_ADD_EXTENSION_DEP(simplexml, libxml)
PHP_ADD_EXTENSION_DEP(simplexml, spl, true)
+1 -1
View File
@@ -20,6 +20,6 @@ if test "$PHP_SOAP" != "no"; then
PHP_NEW_EXTENSION(soap, soap.c php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_xml.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
PHP_SUBST(SOAP_SHARED_LIBADD)
], [
AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.])
AC_MSG_ERROR([libxml2 not found. Please check your libxml2 installation.])
])
fi
+2 -2
View File
@@ -1619,7 +1619,7 @@ PHP_FUNCTION(socket_recv)
recv_buf = zend_string_alloc(len, 0);
if ((retval = recv(php_sock->bsd_socket, ZSTR_VAL(recv_buf), len, flags)) < 1) {
efree(recv_buf);
zend_string_free(recv_buf);
zval_dtor(buf);
ZVAL_NULL(buf);
@@ -1761,7 +1761,7 @@ PHP_FUNCTION(socket_recvfrom)
sin6.sin6_family = AF_INET6;
if (arg6 == NULL) {
efree(recv_buf);
zend_string_free(recv_buf);
WRONG_PARAM_COUNT;
}
+24 -2
View File
@@ -1797,7 +1797,6 @@ SPL_METHOD(dual_it, key)
proto mixed ParentIterator::current()
proto mixed IteratorIterator::current()
proto mixed NoRewindIterator::current()
proto mixed AppendIterator::current()
Get the current element value */
SPL_METHOD(dual_it, current)
{
@@ -3393,6 +3392,29 @@ SPL_METHOD(AppendIterator, append)
}
} /* }}} */
/* {{{ proto mixed AppendIterator::current()
Get the current element value */
SPL_METHOD(AppendIterator, current)
{
spl_dual_it_object *intern;
if (zend_parse_parameters_none() == FAILURE) {
return;
}
SPL_FETCH_AND_CHECK_DUAL_IT(intern, getThis());
spl_dual_it_fetch(intern, 1);
if (Z_TYPE(intern->current.data) != IS_UNDEF) {
zval *value = &intern->current.data;
ZVAL_DEREF(value);
ZVAL_COPY(return_value, value);
} else {
RETURN_NULL();
}
} /* }}} */
/* {{{ proto void AppendIterator::rewind()
Rewind to the first iterator and rewind the first iterator, too */
SPL_METHOD(AppendIterator, rewind)
@@ -3485,7 +3507,7 @@ static const zend_function_entry spl_funcs_AppendIterator[] = {
SPL_ME(AppendIterator, rewind, arginfo_recursive_it_void, ZEND_ACC_PUBLIC)
SPL_ME(AppendIterator, valid, arginfo_recursive_it_void, ZEND_ACC_PUBLIC)
SPL_ME(dual_it, key, arginfo_recursive_it_void, ZEND_ACC_PUBLIC)
SPL_ME(dual_it, current, arginfo_recursive_it_void, ZEND_ACC_PUBLIC)
SPL_ME(AppendIterator, current, arginfo_recursive_it_void, ZEND_ACC_PUBLIC)
SPL_ME(AppendIterator, next, arginfo_recursive_it_void, ZEND_ACC_PUBLIC)
SPL_ME(dual_it, getInnerIterator, arginfo_recursive_it_void, ZEND_ACC_PUBLIC)
SPL_ME(AppendIterator, getIteratorIndex, arginfo_recursive_it_void, ZEND_ACC_PUBLIC)
+23
View File
@@ -0,0 +1,23 @@
--TEST--
Bug #74519 strange behavior of AppendIterator
--FILE--
<?php
$iterator = new \AppendIterator();
$events = new \ArrayIterator([1,2,3,4,5]);
$iterator->append($events);
$events->next();
while($iterator->valid()) {
echo $iterator->current(), "\n";
$iterator->next();
}
?>
===DONE===
--EXPECT--
2
3
4
5
===DONE===
+5 -5
View File
@@ -634,7 +634,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_long2ip, 0)
ZEND_ARG_INFO(0, proper_address)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_getenv, 0, 0, 1)
ZEND_BEGIN_ARG_INFO_EX(arginfo_getenv, 0, 0, 0)
ZEND_ARG_INFO(0, varname)
ZEND_ARG_INFO(0, local_only)
ZEND_END_ARG_INFO()
@@ -1386,7 +1386,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_vfprintf, 0)
ZEND_END_ARG_INFO()
/* }}} */
/* {{{ fsock.c */
ZEND_BEGIN_ARG_INFO_EX(arginfo_fsockopen, 0, 0, 2)
ZEND_BEGIN_ARG_INFO_EX(arginfo_fsockopen, 0, 0, 1)
ZEND_ARG_INFO(0, hostname)
ZEND_ARG_INFO(0, port)
ZEND_ARG_INFO(1, errno)
@@ -1394,7 +1394,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_fsockopen, 0, 0, 2)
ZEND_ARG_INFO(0, timeout)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_pfsockopen, 0, 0, 2)
ZEND_BEGIN_ARG_INFO_EX(arginfo_pfsockopen, 0, 0, 1)
ZEND_ARG_INFO(0, hostname)
ZEND_ARG_INFO(0, port)
ZEND_ARG_INFO(1, errno)
@@ -2190,7 +2190,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_implode, 0)
ZEND_ARG_INFO(0, pieces)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_strtok, 0)
ZEND_BEGIN_ARG_INFO_EX(arginfo_strtok, 0, 0, 1)
ZEND_ARG_INFO(0, str)
ZEND_ARG_INFO(0, token)
ZEND_END_ARG_INFO()
@@ -2456,7 +2456,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_str_split, 0, 0, 1)
ZEND_ARG_INFO(0, split_length)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_strpbrk, 0, 0, 1)
ZEND_BEGIN_ARG_INFO_EX(arginfo_strpbrk, 0, 0, 2)
ZEND_ARG_INFO(0, haystack)
ZEND_ARG_INFO(0, char_list)
ZEND_END_ARG_INFO()
+4 -1
View File
@@ -549,7 +549,10 @@ static u_char *php_parserr(u_char *cp, u_char *end, querybuf *answer, int type_t
CHECKCP(n);
add_assoc_stringl(subarray, "tag", (char*)cp, n);
cp += n;
add_assoc_string(subarray, "value", (char*)cp);
n = dlen - n - 2;
CHECKCP(n);
add_assoc_stringl(subarray, "value", (char*)cp, n);
cp += n;
break;
case DNS_T_TXT:
{
+2 -2
View File
@@ -736,9 +736,9 @@ finish:
tmp_line, response_code);
}
}
if (tmp_line[tmp_line_len - 1] == '\n') {
if (tmp_line_len >= 1 && tmp_line[tmp_line_len - 1] == '\n') {
--tmp_line_len;
if (tmp_line[tmp_line_len - 1] == '\r') {
if (tmp_line_len >= 1 &&tmp_line[tmp_line_len - 1] == '\r') {
--tmp_line_len;
}
}
@@ -0,0 +1,49 @@
--TEST--
Bug #76068 parse_ini_string fails to parse "[foo]\nbar=1|>baz" with segfault
--FILE--
<?php
$s = parse_ini_string("[foo]\nbar=1|>baz",true, \INI_SCANNER_TYPED);
var_dump($s);
$s = parse_ini_string("[foo]\nbar=\"1|>baz\"",true, \INI_SCANNER_TYPED);
var_dump($s);
$s = parse_ini_string("[foo]\nbar=1",true, \INI_SCANNER_TYPED);
var_dump($s);
$s = parse_ini_string("[foo]\nbar=42|>baz",true, \INI_SCANNER_TYPED);
var_dump($s);
?>
==DONE==
--EXPECT--
array(1) {
["foo"]=>
array(1) {
["bar"]=>
string(1) "1"
}
}
array(1) {
["foo"]=>
array(1) {
["bar"]=>
string(6) "1|>baz"
}
}
array(1) {
["foo"]=>
array(1) {
["bar"]=>
int(1)
}
}
array(1) {
["foo"]=>
array(1) {
["bar"]=>
string(2) "42"
}
}
==DONE==
+32
View File
@@ -0,0 +1,32 @@
--TEST--
Bug #75981 (stack-buffer-overflow while parsing HTTP response)
--INI--
allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
<?php
require 'server.inc';
$options = [
'http' => [
'protocol_version' => '1.1',
'header' => 'Connection: Close'
],
];
$ctx = stream_context_create($options);
$responses = [
"data://text/plain,000000000100\xA\xA"
];
$pid = http_server('tcp://127.0.0.1:12342', $responses);
echo @file_get_contents('http://127.0.0.1:12342/', false, $ctx);
http_server_kill($pid);
?>
DONE
--EXPECT--
DONE
@@ -7,25 +7,32 @@ if (getenv("SKIP_ONLINE_TESTS")) die("skip online test");
?>
--FILE--
<?php
/* This must be a domain that publishes an RFC6844 CAA-type DNS record */
$domain = 'google.com';
$match = false;
$dns = dns_get_record($domain, DNS_CAA);
if (count($dns) > 0) {
if (array_key_exists('type', $dns[0])
and $dns[0]['type'] == 'CAA'
and array_key_exists('flags', $dns[0])
and array_key_exists('tag', $dns[0])
and array_key_exists('value', $dns[0])
) {
$match = true;
/* This must be domains which publish an RFC6844 CAA-type DNS record */
$domains = ["big.basic.caatestsuite.com", "google.com"];
foreach ($domains as $domain) {
$match = false;
$dns = dns_get_record($domain, DNS_CAA);
if (count($dns) > 0) {
if (array_key_exists("type", $dns[0])
and $dns[0]["type"] == "CAA"
and array_key_exists("flags", $dns[0])
and array_key_exists("tag", $dns[0])
and array_key_exists("value", $dns[0])
) {
$chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-.";
if (strlen($dns[0]["value"]) == strspn($dns[0]["value"], $chars)) {
$match = true;
}
}
}
if ($match) {
echo "CAA record found\n";
} else {
echo "CAA lookup failed\n";
var_dump($dns);
}
}
if ($match) {
echo "CAA record found\n";
} else {
echo "CAA Lookup failed\n";
}
?>
--EXPECT--
CAA record found
CAA record found
+1 -1
View File
@@ -29,7 +29,7 @@ if test "$PHP_WDDX" != "no"; then
PHP_ADD_BUILD_DIR(ext/xml)
fi
], [
AC_MSG_ERROR([xml2-config not found. Use --with-libxml-dir=<DIR>])
AC_MSG_ERROR([libxml2 not found. Use --with-libxml-dir=<DIR>])
])
fi
+1 -1
View File
@@ -28,7 +28,7 @@ if test "$PHP_XML" != "no"; then
xml_extra_sources="compat.c"
PHP_ADD_EXTENSION_DEP(xml, libxml)
], [
AC_MSG_ERROR([xml2-config not found. Use --with-libxml-dir=<DIR>])
AC_MSG_ERROR([libxml2 not found. Use --with-libxml-dir=<DIR>])
])
fi
+1 -1
View File
@@ -22,6 +22,6 @@ if test "$PHP_XMLREADER" != "no"; then
PHP_ADD_EXTENSION_DEP(xmlreader, dom, true)
PHP_SUBST(XMLREADER_SHARED_LIBADD)
], [
AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.])
AC_MSG_ERROR([libxml2 not found. Please check your libxml2 installation.])
])
fi
+1 -1
View File
@@ -42,7 +42,7 @@ if test "$PHP_XMLRPC" != "no"; then
PHP_ADD_BUILD_DIR(ext/xml)
fi
], [
AC_MSG_ERROR([xml2-config not found. Use --with-libxml-dir=<DIR>])
AC_MSG_ERROR([libxml2 not found. Use --with-libxml-dir=<DIR>])
])
else
testval=no
+1 -1
View File
@@ -21,6 +21,6 @@ if test "$PHP_XMLWRITER" != "no"; then
PHP_NEW_EXTENSION(xmlwriter, php_xmlwriter.c, $ext_shared)
PHP_SUBST(XMLWRITER_SHARED_LIBADD)
], [
AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.])
AC_MSG_ERROR([libxml2 not found. Please check your libxml2 installation.])
])
fi
+6 -1
View File
@@ -107,7 +107,12 @@ struct _php_core_globals {
HashTable rfc1867_protected_variables;
short connection_status;
short ignore_user_abort;
/* In 7.1/7.2 branches, this was initially a short,
* maintain struct alignment with subsequent padding.
*/
zend_bool ignore_user_abort;
char ignore_user_abort_reserved_padding;
unsigned char header_is_being_sent;
+2 -2
View File
@@ -97,13 +97,13 @@
static int php_do_open_temporary_file(const char *path, const char *pfx, zend_string **opened_path_p)
{
char *trailing_slash;
#ifdef PHP_WIN32
char *opened_path = NULL;
size_t opened_path_len;
wchar_t *cwdw, *pfxw, pathw[MAXPATHLEN];
#else
char opened_path[MAXPATHLEN];
char *trailing_slash;
#endif
char cwd[MAXPATHLEN];
cwd_state new_state;
@@ -139,13 +139,13 @@ static int php_do_open_temporary_file(const char *path, const char *pfx, zend_st
return -1;
}
#ifndef PHP_WIN32
if (IS_SLASH(new_state.cwd[new_state.cwd_length - 1])) {
trailing_slash = "";
} else {
trailing_slash = "/";
}
#ifndef PHP_WIN32
if (snprintf(opened_path, MAXPATHLEN, "%s%s%sXXXXXX", new_state.cwd, trailing_slash, pfx) >= MAXPATHLEN) {
efree(new_state.cwd);
return -1;
+4 -4
View File
@@ -2,7 +2,7 @@
/* edit configure.in to change version number */
#define PHP_MAJOR_VERSION 7
#define PHP_MINOR_VERSION 1
#define PHP_RELEASE_VERSION 14
#define PHP_EXTRA_VERSION "-dev"
#define PHP_VERSION "7.1.14-dev"
#define PHP_VERSION_ID 70114
#define PHP_RELEASE_VERSION 16
#define PHP_EXTRA_VERSION "RC1"
#define PHP_VERSION "7.1.16RC1"
#define PHP_VERSION_ID 70116
+2 -2
View File
@@ -884,7 +884,6 @@ default_socket_timeout = 60
; default extension directory.
;
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5+)
; extension folders as well as the separate PECL DLL download (PHP 5+).
; Be sure to appropriately set the extension_dir directive.
@@ -904,6 +903,7 @@ default_socket_timeout = 60
;extension=php_exif.dll ; Must be after mbstring as it depends on it
;extension=php_mysqli.dll
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
;extension=php_odbc.dll
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mysql.dll
@@ -1049,7 +1049,7 @@ smtp_port = 25
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
mail.add_x_header = Off
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
+2 -2
View File
@@ -884,7 +884,6 @@ default_socket_timeout = 60
; default extension directory.
;
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5+)
; extension folders as well as the separate PECL DLL download (PHP 5+).
; Be sure to appropriately set the extension_dir directive.
@@ -904,6 +903,7 @@ default_socket_timeout = 60
;extension=php_exif.dll ; Must be after mbstring as it depends on it
;extension=php_mysqli.dll
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
;extension=php_odbc.dll
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mysql.dll
@@ -1049,7 +1049,7 @@ smtp_port = 25
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
mail.add_x_header = Off
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
+18
View File
@@ -147,10 +147,28 @@ void config_entry_ctor(zval *zv)
void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
{
php_conf_rec *d = base_conf, *e = new_conf, *n = NULL;
#ifdef ZTS
zend_string *str;
zval *data;
#endif
n = create_php_config(p, "merge_php_config");
/* copy old config */
#ifdef ZTS
ZEND_HASH_FOREACH_STR_KEY_VAL(&d->config, str, data) {
zend_string *key;
zval *new_entry;
/* Avoid sharing the non interned string among threads. */
key = zend_string_dup(str, 1);
new_entry = zend_hash_add(&n->config, key, data);
config_entry_ctor(new_entry);
} ZEND_HASH_FOREACH_END();
#else
zend_hash_copy(&n->config, &d->config, config_entry_ctor);
#endif
/* merge new config */
phpapdebug((stderr, "Merge dir (%p)+(%p)=(%p)\n", base_conf, new_conf, n));
zend_hash_merge_ex(&n->config, &e->config, config_entry_ctor, should_overwrite_per_dir_entry, NULL);
+114 -82
View File
@@ -67,6 +67,9 @@
#include <arpa/inet.h>
#include <netinet/in.h>
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
#include "lscriu.c"
#endif
#define SAPI_LSAPI_MAX_HEADER_LENGTH 2048
@@ -91,6 +94,7 @@ static int ignore_php_ini = 0;
static char * argv0 = NULL;
static int engine = 1;
static int parse_user_ini = 0;
#ifdef ZTS
zend_compiler_globals *compiler_globals;
zend_executor_globals *executor_globals;
@@ -178,7 +182,7 @@ static size_t sapi_lsapi_ub_write(const char *str, size_t str_length)
/* {{{ sapi_lsapi_flush
*/
static void sapi_lsapi_flush( void * server_context )
static void sapi_lsapi_flush(void * server_context)
{
if ( lsapi_mode ) {
if ( LSAPI_Flush() == -1) {
@@ -193,8 +197,7 @@ static void sapi_lsapi_flush( void * server_context )
*/
static int sapi_lsapi_deactivate(void)
{
if ( SG(request_info).path_translated )
{
if ( SG(request_info).path_translated ) {
efree( SG(request_info).path_translated );
SG(request_info).path_translated = NULL;
}
@@ -235,44 +238,44 @@ static int add_variable( const char * pKey, int keyLen, const char * pValue, int
static void litespeed_php_import_environment_variables(zval *array_ptr)
{
char buf[128];
char **env, *p, *t = buf;
size_t alloc_size = sizeof(buf);
unsigned long nlen; /* ptrdiff_t is not portable */
char buf[128];
char **env, *p, *t = buf;
size_t alloc_size = sizeof(buf);
unsigned long nlen; /* ptrdiff_t is not portable */
if (Z_TYPE(PG(http_globals)[TRACK_VARS_ENV]) == IS_ARRAY &&
Z_ARR_P(array_ptr) != Z_ARR(PG(http_globals)[TRACK_VARS_ENV]) &&
zend_hash_num_elements(Z_ARRVAL(PG(http_globals)[TRACK_VARS_ENV])) > 0
) {
) {
zval_dtor(array_ptr);
ZVAL_DUP(array_ptr, &PG(http_globals)[TRACK_VARS_ENV]);
return;
return;
} else if (Z_TYPE(PG(http_globals)[TRACK_VARS_SERVER]) == IS_ARRAY &&
Z_ARR_P(array_ptr) != Z_ARR(PG(http_globals)[TRACK_VARS_SERVER]) &&
zend_hash_num_elements(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER])) > 0
) {
) {
zval_dtor(array_ptr);
ZVAL_DUP(array_ptr, &PG(http_globals)[TRACK_VARS_SERVER]);
return;
}
return;
}
for (env = environ; env != NULL && *env != NULL; env++) {
p = strchr(*env, '=');
if (!p) { /* malformed entry? */
continue;
}
nlen = p - *env;
if (nlen >= alloc_size) {
alloc_size = nlen + 64;
t = (t == buf ? emalloc(alloc_size): erealloc(t, alloc_size));
}
memcpy(t, *env, nlen);
t[nlen] = '\0';
add_variable(t, nlen, p + 1, strlen( p + 1 ), array_ptr);
}
if (t != buf && t != NULL) {
efree(t);
}
for (env = environ; env != NULL && *env != NULL; env++) {
p = strchr(*env, '=');
if (!p) { /* malformed entry? */
continue;
}
nlen = p - *env;
if (nlen >= alloc_size) {
alloc_size = nlen + 64;
t = (t == buf ? emalloc(alloc_size): erealloc(t, alloc_size));
}
memcpy(t, *env, nlen);
t[nlen] = '\0';
add_variable(t, nlen, p + 1, strlen( p + 1 ), array_ptr);
}
if (t != buf && t != NULL) {
efree(t);
}
}
/* {{{ sapi_lsapi_register_variables
@@ -286,9 +289,9 @@ static void sapi_lsapi_register_variables(zval *track_vars_array)
litespeed_php_import_environment_variables(track_vars_array);
LSAPI_ForeachHeader( add_variable, track_vars_array );
LSAPI_ForeachEnv( add_variable, track_vars_array );
add_variable("PHP_SELF", 8, php_self, strlen( php_self ), track_vars_array );
LSAPI_ForeachHeader( add_variable, track_vars_array );
LSAPI_ForeachEnv( add_variable, track_vars_array );
add_variable("PHP_SELF", 8, php_self, strlen( php_self ), track_vars_array );
} else {
php_import_environment_variables(track_vars_array);
@@ -405,11 +408,53 @@ static void log_message (const char *fmt, ...)
#define DEBUG_MESSAGE(fmt, ...)
#endif
static int lsapi_activate_user_ini(TSRMLS_D);
static int lsapi_activate_user_ini();
static int sapi_lsapi_activate(TSRMLS_D)
static int sapi_lsapi_activate()
{
if (parse_user_ini && lsapi_activate_user_ini(TSRMLS_C) == FAILURE) {
char *path, *doc_root, *server_name;
size_t path_len, doc_root_len, server_name_len;
/* PATH_TRANSLATED should be defined at this stage but better safe than sorry :) */
if (!SG(request_info).path_translated) {
return FAILURE;
}
if (php_ini_has_per_host_config()) {
server_name = sapi_lsapi_getenv("SERVER_NAME", 0);
/* SERVER_NAME should also be defined at this stage..but better check it anyway */
if (server_name) {
server_name_len = strlen(server_name);
server_name = estrndup(server_name, server_name_len);
zend_str_tolower(server_name, server_name_len);
php_ini_activate_per_host_config(server_name, server_name_len);
efree(server_name);
}
}
if (php_ini_has_per_dir_config()) {
/* Prepare search path */
path_len = strlen(SG(request_info).path_translated);
/* Make sure we have trailing slash! */
if (!IS_SLASH(SG(request_info).path_translated[path_len])) {
path = emalloc(path_len + 2);
memcpy(path, SG(request_info).path_translated, path_len + 1);
path_len = zend_dirname(path, path_len);
path[path_len++] = DEFAULT_SLASH;
} else {
path = estrndup(SG(request_info).path_translated, path_len);
path_len = zend_dirname(path, path_len);
}
path[path_len] = 0;
/* Activate per-dir-system-configuration defined in php.ini and stored into configuration_hash during startup */
php_ini_activate_per_dir_config(path, path_len); /* Note: for global settings sake we check from root to path */
efree(path);
}
if (parse_user_ini && lsapi_activate_user_ini() == FAILURE) {
return FAILURE;
}
return SUCCESS;
@@ -419,7 +464,7 @@ static int sapi_lsapi_activate(TSRMLS_D)
static sapi_module_struct lsapi_sapi_module =
{
"litespeed",
"LiteSpeed V6.11",
"LiteSpeed V7.0",
php_lsapi_startup, /* startup */
php_module_shutdown_wrapper, /* shutdown */
@@ -443,8 +488,8 @@ static sapi_module_struct lsapi_sapi_module =
sapi_lsapi_register_variables, /* register server variables */
sapi_lsapi_log_message, /* Log message */
NULL, /* Get request time */
NULL, /* Child terminate */
NULL, /* Get request time */
NULL, /* Child terminate */
STANDARD_SAPI_MODULE_PROPERTIES
@@ -455,7 +500,7 @@ static void init_request_info( void )
{
char * pContentType = LSAPI_GetHeader( H_CONTENT_TYPE );
char * pAuth;
SG(request_info).content_type = pContentType ? pContentType : "";
SG(request_info).request_method = LSAPI_GetRequestMethod();
SG(request_info).query_string = LSAPI_GetQueryString();
@@ -465,7 +510,7 @@ static void init_request_info( void )
/* It is not reset by zend engine, set it to 200. */
SG(sapi_headers).http_response_code = 200;
pAuth = LSAPI_GetHeader( H_AUTHORIZATION );
php_handle_auth_data(pAuth);
}
@@ -521,9 +566,8 @@ static int lsapi_module_main(int show_source)
static int alter_ini( const char * pKey, int keyLen, const char * pValue, int valLen,
void * arg )
{
#if PHP_MAJOR_VERSION >= 7
zend_string * psKey;
#endif
int type = ZEND_INI_PERDIR;
int stage = PHP_INI_STAGE_RUNTIME;
if ( '\001' == *pKey ) {
@@ -544,18 +588,12 @@ static int alter_ini( const char * pKey, int keyLen, const char * pValue, int va
}
else
{
#if PHP_MAJOR_VERSION >= 7
--keyLen;
psKey = zend_string_init(pKey, keyLen, 1);
zend_alter_ini_entry_chars(psKey,
(char *)pValue, valLen,
type, stage);
zend_string_release(psKey);
#else
zend_alter_ini_entry((char *)pKey, keyLen,
(char *)pValue, valLen,
type, stage);
#endif
}
}
return 1;
@@ -687,7 +725,6 @@ static int lsapi_activate_user_ini_mk_path(_lsapi_activate_user_ini_ctx *ctx,
if (!path)
return FAILURE;
ctx->path_len = zend_dirname(path, ctx->path_len);
DEBUG_MESSAGE("dirname: %s", ctx->path);
if (*fn_next) {
rc = (*fn_next)(ctx, fn_next + 1);
@@ -711,9 +748,7 @@ static int lsapi_activate_user_ini_mk_realpath(_lsapi_activate_user_ini_ctx *ctx
}
ctx->path = real_path;
ctx->path_len = strlen(ctx->path);
DEBUG_MESSAGE("calculated tsrm realpath: %s", real_path);
} else {
DEBUG_MESSAGE("%s is an absolute path", ctx->path);
real_path = NULL;
}
@@ -734,10 +769,8 @@ static int lsapi_activate_user_ini_mk_user_config(_lsapi_activate_user_ini_ctx *
/* Find cached config entry: If not found, create one */
ctx->entry = zend_hash_str_find_ptr(&user_config_cache, ctx->path, ctx->path_len);
if (ctx->entry) {
DEBUG_MESSAGE("found entry for %s", ctx->path);
} else {
DEBUG_MESSAGE("entry for %s not found, creating new entry", ctx->path);
if (!ctx->entry)
{
ctx->entry = pemalloc(sizeof(user_config_cache_entry), 1);
ctx->entry->expires = 0;
zend_hash_init(&ctx->entry->user_config, 0, NULL,
@@ -760,7 +793,6 @@ static void walk_down_the_path_callback(char* begin,
_lsapi_activate_user_ini_ctx *ctx = data;
char tmp = end[0];
end[0] = 0;
DEBUG_MESSAGE("parsing %s%c%s", begin, DEFAULT_SLASH, PG(user_ini_filename));
php_parse_user_ini_file(begin, PG(user_ini_filename), &ctx->entry->user_config);
end[0] = tmp;
}
@@ -807,7 +839,6 @@ static int lsapi_activate_user_ini_finally(_lsapi_activate_user_ini_ctx *ctx,
int rc = SUCCESS;
fn_activate_user_ini_chain_t *fn_next = next;
DEBUG_MESSAGE("calling php_ini_activate_config()");
php_ini_activate_config(&ctx->entry->user_config, PHP_INI_PERDIR,
PHP_INI_STAGE_HTACCESS);
@@ -852,7 +883,7 @@ static void override_ini()
}
static int processReq( void )
static int processReq(void)
{
int ret = 0;
zend_first_try {
@@ -864,7 +895,7 @@ static int processReq( void )
override_ini();
if ( engine ) {
init_request_info( );
init_request_info();
if ( lsapi_module_main( source_highlight ) == -1 ) {
ret = -1;
@@ -878,7 +909,7 @@ static int processReq( void )
return ret;
}
static void cli_usage( void )
static void cli_usage(void)
{
static const char * usage =
"Usage: php\n"
@@ -979,9 +1010,7 @@ static int cli_main( int argc, char * argv[] )
char ** argend= &argv[argc];
int ret = -1;
int c;
#if PHP_MAJOR_VERSION >= 7
zend_string * psKey;
#endif
zend_string *psKey;
lsapi_mode = 0; /* enter CLI mode */
#ifdef PHP_WIN32
@@ -998,21 +1027,12 @@ static int cli_main( int argc, char * argv[] )
CG(in_compilation) = 0; /* not initialized but needed for several options */
SG(options) |= SAPI_OPTION_NO_CHDIR;
#if PHP_MAJOR_VERSION < 7
EG(uninitialized_zval_ptr) = NULL;
#endif
for( ini = ini_defaults; *ini; ini+=2 ) {
#if PHP_MAJOR_VERSION >= 7
psKey = zend_string_init(*ini, strlen( *ini ), 1);
psKey = zend_string_init(*ini, strlen( *ini ), 1);
zend_alter_ini_entry_chars(psKey,
(char *)*(ini+1), strlen( *(ini+1) ),
PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
zend_string_release(psKey);
#else
zend_alter_ini_entry( (char *)*ini, strlen( *ini )+1,
(char *)*(ini+1), strlen( *(ini+1) ),
PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
#endif
zend_string_release(psKey);
}
while (( p < argend )&&(**p == '-' )) {
@@ -1234,8 +1254,12 @@ int main( int argc, char * argv[] )
tsrm_startup(1, 1, 0, NULL);
#endif
zend_signal_startup();
#if PHP_MAJOR_VERSION >= 7
#if defined(ZEND_SIGNALS) || PHP_MINOR_VERSION > 0
zend_signal_startup();
#endif
#endif
if (argc > 1 ) {
if ( parse_opt( argc, argv, &climode,
&php_ini_path, &php_bind ) == -1 ) {
@@ -1303,6 +1327,10 @@ int main( int argc, char * argv[] )
LSAPI_Init();
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
int is_criu = LSCRIU_Init(); // Must be called before the regular init as it unsets the parameters.
#endif
LSAPI_Init_Env_Parameters( NULL );
lsapi_mode = 1;
@@ -1314,7 +1342,15 @@ int main( int argc, char * argv[] )
php_bind = NULL;
}
while( LSAPI_Prefork_Accept_r( &g_req ) >= 0 ) {
int iRequestsProcessed = 0;
int result;
while( ( result = LSAPI_Prefork_Accept_r( &g_req )) >= 0 ) {
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
if (is_criu && !result) {
LSCRIU_inc_req_procssed();
}
#endif
if ( slow_script_msec ) {
gettimeofday( &tv_req_begin, NULL );
}
@@ -1488,11 +1524,7 @@ PHP_FUNCTION(apache_get_modules)
array_init(return_value);
while( *name )
{
add_next_index_string(return_value, *name
#if PHP_MAJOR_VERSION < 7
, 1
#endif
);
add_next_index_string(return_value, *name);
++name;
}
}
+555 -167
View File
File diff suppressed because it is too large. Load diff
+43 -14
View File
@@ -17,7 +17,7 @@
*/
/*
Copyright (c) 2002-2015, Lite Speed Technologies Inc.
Copyright (c) 2002-2018, Lite Speed Technologies Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -56,9 +56,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern "C" {
#endif
#include <stddef.h>
#include <lsapidef.h>
#include "lsapidef.h"
#include <stddef.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -169,7 +169,6 @@ int LSAPI_ForeachSpecialEnv_r( LSAPI_Request * pReq,
char * LSAPI_GetEnv_r( LSAPI_Request * pReq, const char * name );
ssize_t LSAPI_ReadReqBody_r( LSAPI_Request * pReq, char * pBuf, size_t len );
int LSAPI_ReqBodyGetChar_r( LSAPI_Request * pReq );
@@ -294,28 +293,28 @@ static inline int LSAPI_ForeachSpecialEnv( LSAPI_CB_EnvHandler fn, void * arg )
static inline char * LSAPI_GetEnv( const char * name )
{ return LSAPI_GetEnv_r( &g_req, name ); }
static inline char * LSAPI_GetQueryString()
static inline char * LSAPI_GetQueryString(void)
{ return LSAPI_GetQueryString_r( &g_req ); }
static inline char * LSAPI_GetScriptFileName()
static inline char * LSAPI_GetScriptFileName(void)
{ return LSAPI_GetScriptFileName_r( &g_req ); }
static inline char * LSAPI_GetScriptName()
static inline char * LSAPI_GetScriptName(void)
{ return LSAPI_GetScriptName_r( &g_req ); }
static inline char * LSAPI_GetRequestMethod()
static inline char * LSAPI_GetRequestMethod(void)
{ return LSAPI_GetRequestMethod_r( &g_req ); }
static inline off_t LSAPI_GetReqBodyLen()
static inline off_t LSAPI_GetReqBodyLen(void)
{ return LSAPI_GetReqBodyLen_r( &g_req ); }
static inline off_t LSAPI_GetReqBodyRemain()
static inline off_t LSAPI_GetReqBodyRemain(void)
{ return LSAPI_GetReqBodyRemain_r( &g_req ); }
static inline ssize_t LSAPI_ReadReqBody( char * pBuf, size_t len )
{ return LSAPI_ReadReqBody_r( &g_req, pBuf, len ); }
static inline int LSAPI_ReqBodyGetChar()
static inline int LSAPI_ReqBodyGetChar(void)
{ return LSAPI_ReqBodyGetChar_r( &g_req ); }
static inline int LSAPI_ReqBodyGetLine( char * pBuf, int len, int *getLF )
@@ -337,7 +336,7 @@ static inline ssize_t LSAPI_sendfile( int fdIn, off_t* off, size_t size )
static inline ssize_t LSAPI_Write_Stderr( const char * pBuf, ssize_t len )
{ return LSAPI_Write_Stderr_r( &g_req, pBuf, len ); }
static inline int LSAPI_Flush()
static inline int LSAPI_Flush(void)
{ return LSAPI_Flush_r( &g_req ); }
static inline int LSAPI_AppendRespHeader( char * pBuf, int len )
@@ -379,9 +378,39 @@ int LSAPI_Init_Env_Parameters( fn_select_t fp );
void LSAPI_Set_Slow_Req_Msecs( int msecs );
int LSAPI_Get_Slow_Req_Msecs( );
int LSAPI_Get_Slow_Req_Msecs(void);
int LSAPI_is_suEXEC_Daemon(void);
int LSAPI_Set_Restored_Parent_Pid(int pid);
typedef void (*LSAPI_On_Timer_pf)(void);
void LSAPI_Register_Pgrp_Timer_Callback(LSAPI_On_Timer_pf);
int LSAPI_Inc_Req_Processed(int cnt);
#define LSAPI_LOG_LEVEL_BITS 0xff
#define LSAPI_LOG_FLAG_NONE 0
#define LSAPI_LOG_FLAG_DEBUG 1
#define LSAPI_LOG_FLAG_INFO 2
#define LSAPI_LOG_FLAG_NOTICE 3
#define LSAPI_LOG_FLAG_WARN 4
#define LSAPI_LOG_FLAG_ERROR 5
#define LSAPI_LOG_FLAG_CRIT 6
#define LSAPI_LOG_FLAG_FATAL 7
#define LSAPI_LOG_TIMESTAMP_BITS (0xff00)
#define LSAPI_LOG_TIMESTAMP_FULL (0x100)
#define LSAPI_LOG_TIMESTAMP_HMS (0x200)
#define LSAPI_LOG_PID (0x10000)
void LSAPI_Log(int flag, const char * fmt, ...)
#if __GNUC__
__attribute__((format(printf, 2, 3)))
#endif
;
int LSAPI_is_suEXEC_Daemon();
#if defined (c_plusplus) || defined (__cplusplus)
}
File diff suppressed because it is too large. Load diff
+67
View File
@@ -0,0 +1,67 @@
/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2018 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: George Wang <gwang@litespeedtech.com> |
+----------------------------------------------------------------------+
*/
/*
Copyright (c) 2002-2018, Lite Speed Technologies Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of the Lite Speed Technologies Inc nor the
names of its contributors may be used to endorse or promote
products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _LSCRIU_H_
#define _LSCRIU_H_
#if defined (c_plusplus) || defined (__cplusplus)
extern "C" {
#endif
// return 1 if CRIU is available, return 0 if CRIU is not available
int LSCRIU_Init(void);
void LSCRIU_inc_req_procssed(void);
#if defined (c_plusplus) || defined (__cplusplus)
}
#endif
#endif // LSCRIU_
+4
View File
@@ -11,6 +11,10 @@ PHPDBG_DLL='php' + PHP_VERSION + 'phpdbg.dll';
PHPDBG_EXE='phpdbg.exe';
PHPDBG_CFLAGS='/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1';
var PHP_PHPDBG_PGO = false;
var PHP_PHPDBG_WEBHELPER_PGO = false;
var PHP_PHPDBGS_PGO = false;
if (PHP_PHPDBG == "yes") {
SAPI('phpdbg', PHPDBG_SOURCES, PHPDBG_EXE, PHPDBG_CFLAGS);
ADD_FLAG("LIBS_PHPDBG", "ws2_32.lib user32.lib");
+127 -127
View File
@@ -1,128 +1,128 @@
// vim:ft=javascript
// $Id: config.w32 306241 2010-12-11 22:18:10Z pajoye $
// "Master" config file; think of it as a configure.in
// equivalent.
ARG_WITH("toolset", "Toolset to use for the compilation, give: vs, clang, icc. " +
"The only recommended and supported toolset for production use " +
"is Visual Studio. Use others at your own risk.", "vs");
toolset_option_handle()
var PHP_CYGWIN="notset";
toolset_setup_compiler();
// do we use x64 or 80x86 version of compiler?
X64 = toolset_is_64();
toolset_setup_arch();
toolset_setup_linker();
toolset_setup_project_tools();
// stick objects somewhere outside of the source tree
ARG_ENABLE('object-out-dir', 'Alternate location for binary objects during build', '');
object_out_dir_option_handle();
ARG_ENABLE('debug', 'Compile with debugging symbols', PHP_DEBUG);
ARG_ENABLE('debug-pack', 'Release binaries with external debug symbols (--enable-debug must not be specified)', 'no');
if (PHP_DEBUG == "yes" && PHP_DEBUG_PACK == "yes") {
ERROR("Use of both --enable-debug and --enable-debug-pack not allowed.");
}
if (PHP_PREFIX == '') {
PHP_PREFIX = "C:\\php";
if (PHP_DEBUG == "yes")
PHP_PREFIX += "\\debug";
}
DEFINE('PHP_PREFIX', PHP_PREFIX);
DEFINE("BASE_INCLUDES", "/I " + PHP_DIR + "/include /I " + PHP_DIR + "/include/main /I " + PHP_DIR + "/include/Zend /I " + PHP_DIR + "/include/TSRM /I " + PHP_DIR + "/include/ext ");
toolset_setup_common_cflags();
// vim:ft=javascript
// $Id: config.w32 306241 2010-12-11 22:18:10Z pajoye $
// "Master" config file; think of it as a configure.in
// equivalent.
ARG_WITH("toolset", "Toolset to use for the compilation, give: vs, clang, icc. " +
"The only recommended and supported toolset for production use " +
"is Visual Studio. Use others at your own risk.", "vs");
toolset_option_handle()
var PHP_CYGWIN="notset";
toolset_setup_compiler();
// do we use x64 or 80x86 version of compiler?
X64 = toolset_is_64();
toolset_setup_arch();
toolset_setup_linker();
toolset_setup_project_tools();
// stick objects somewhere outside of the source tree
ARG_ENABLE('object-out-dir', 'Alternate location for binary objects during build', '');
object_out_dir_option_handle();
ARG_ENABLE('debug', 'Compile with debugging symbols', PHP_DEBUG);
ARG_ENABLE('debug-pack', 'Release binaries with external debug symbols (--enable-debug must not be specified)', 'no');
if (PHP_DEBUG == "yes" && PHP_DEBUG_PACK == "yes") {
ERROR("Use of both --enable-debug and --enable-debug-pack not allowed.");
}
if (PHP_PREFIX == '') {
PHP_PREFIX = "C:\\php";
if (PHP_DEBUG == "yes")
PHP_PREFIX += "\\debug";
}
DEFINE('PHP_PREFIX', PHP_PREFIX);
DEFINE("BASE_INCLUDES", "/I " + PHP_DIR + "/include /I " + PHP_DIR + "/include/main /I " + PHP_DIR + "/include/Zend /I " + PHP_DIR + "/include/TSRM /I " + PHP_DIR + "/include/ext ");
toolset_setup_common_cflags();
ARG_WITH('prefix', 'PHP installation prefix', PHP_PREFIX);
ARG_WITH('mp', 'Tell Visual Studio use up to [n,auto,disable] processes for compilation', 'auto');
var PHP_MP_DISABLED = true;
if (VS_TOOLSET && PHP_MP != 'disable') {
// no from disable-all
if(PHP_MP == 'auto' || PHP_MP == 'no') {
ADD_FLAG('CFLAGS', ' /MP ');
PHP_MP_DISABLED = false;
} else {
if(parseInt(PHP_MP) != 0) {
ADD_FLAG('CFLAGS', ' /MP'+ PHP_MP +' ');
PHP_MP_DISABLED = false;
} else {
STDOUT.WriteLine('WARNING: Invalid argument for MP: ' + PHP_MP);
}
}
}
/* For snapshot builders, where can we find the additional
* files that make up the snapshot template? */
ARG_WITH("snapshot-template", "Path to snapshot builder template dir", "no");
// General link flags
toolset_setup_common_ldlags();
// General libs
toolset_setup_common_libs();
// Set some debug/release specific options
toolset_setup_build_mode();
setup_zts_stuff();
if (MODE_PHPIZE) {
DEFINE("PHPDLL", PHP_DLL);
DEFINE("PHPLIB", PHP_DLL_LIB);
}
// Find the php_build dir - it contains headers and libraries
// that we need
ARG_WITH('php-build', 'Path to where you extracted the development libraries (http://wiki.php.net/internals/windows/libs). Assumes that it is a sibling of this source dir (..\\deps) if not specified', 'no');
php_build_option_handle();
ARG_WITH('extra-includes', 'Extra include path to use when building everything', '');
ARG_WITH('extra-libs', 'Extra library path to use when linking everything', '');
var php_usual_include_suspects = PHP_PHP_BUILD+"\\include";
var php_usual_lib_suspects = PHP_PHP_BUILD+"\\lib";
ADD_FLAG("CFLAGS", '/I "' + php_usual_include_suspects + '" ');
ADD_FLAG("LDFLAGS", '/libpath:"\\"' + php_usual_lib_suspects + '\\"" ');
ADD_FLAG("ARFLAGS", '/libpath:"\\"' + php_usual_lib_suspects + '\\"" ');
probe_basic_headers();
add_extra_dirs();
//DEFINE("PHP_BUILD", PHP_PHP_BUILD);
STDOUT.WriteBlankLines(1);
STDOUT.WriteLine("Build dir: " + get_define('BUILD_DIR'));
STDOUT.WriteLine("PHP Core: " + get_define('PHPDLL') + " and " + get_define('PHPLIB'));
/* XXX inspect this for other toolsets */
//AC_DEFINE('ZEND_DVAL_TO_LVAL_CAST_OK', 1);
AC_DEFINE('HAVE_STRNLEN', 1);
STDOUT.WriteBlankLines(1);
if (PHP_SNAPSHOT_TEMPLATE == "no") {
/* default is as a sibling of the php_build dir */
if (FSO.FolderExists(PHP_PHP_BUILD + "\\template")) {
PHP_SNAPSHOT_TEMPLATE = FSO.GetAbsolutePathName(PHP_PHP_BUILD + "\\template");
} else if (FSO.FolderExists(PHP_PHP_BUILD + "\\..\\template")) {
PHP_SNAPSHOT_TEMPLATE = FSO.GetAbsolutePathName(PHP_PHP_BUILD + "\\..\\template");
}
}
DEFINE('SNAPSHOT_TEMPLATE', PHP_SNAPSHOT_TEMPLATE);
AC_DEFINE("PHP_DIR", PHP_DIR);
DEFINE("PHP_DIR", PHP_DIR);
ARG_WITH("codegen-arch", "Architecture for code generation", "no");
toolset_setup_codegen_arch();
ARG_WITH('mp', 'Tell Visual Studio use up to [n,auto,disable] processes for compilation', 'auto');
var PHP_MP_DISABLED = true;
if (VS_TOOLSET && PHP_MP != 'disable') {
// no from disable-all
if(PHP_MP == 'auto' || PHP_MP == 'no') {
ADD_FLAG('CFLAGS', ' /MP ');
PHP_MP_DISABLED = false;
} else {
if(parseInt(PHP_MP) != 0) {
ADD_FLAG('CFLAGS', ' /MP'+ PHP_MP +' ');
PHP_MP_DISABLED = false;
} else {
STDOUT.WriteLine('WARNING: Invalid argument for MP: ' + PHP_MP);
}
}
}
/* For snapshot builders, where can we find the additional
* files that make up the snapshot template? */
ARG_WITH("snapshot-template", "Path to snapshot builder template dir", "no");
// General link flags
toolset_setup_common_ldlags();
// General libs
toolset_setup_common_libs();
// Set some debug/release specific options
toolset_setup_build_mode();
setup_zts_stuff();
if (MODE_PHPIZE) {
DEFINE("PHPDLL", PHP_DLL);
DEFINE("PHPLIB", PHP_DLL_LIB);
}
// Find the php_build dir - it contains headers and libraries
// that we need
ARG_WITH('php-build', 'Path to where you extracted the development libraries (http://wiki.php.net/internals/windows/libs). Assumes that it is a sibling of this source dir (..\\deps) if not specified', 'no');
php_build_option_handle();
ARG_WITH('extra-includes', 'Extra include path to use when building everything', '');
ARG_WITH('extra-libs', 'Extra library path to use when linking everything', '');
var php_usual_include_suspects = PHP_PHP_BUILD+"\\include";
var php_usual_lib_suspects = PHP_PHP_BUILD+"\\lib";
ADD_FLAG("CFLAGS", '/I "' + php_usual_include_suspects + '" ');
ADD_FLAG("LDFLAGS", '/libpath:"\\"' + php_usual_lib_suspects + '\\"" ');
ADD_FLAG("ARFLAGS", '/libpath:"\\"' + php_usual_lib_suspects + '\\"" ');
probe_basic_headers();
add_extra_dirs();
//DEFINE("PHP_BUILD", PHP_PHP_BUILD);
STDOUT.WriteBlankLines(1);
STDOUT.WriteLine("Build dir: " + get_define('BUILD_DIR'));
STDOUT.WriteLine("PHP Core: " + get_define('PHPDLL') + " and " + get_define('PHPLIB'));
/* XXX inspect this for other toolsets */
//AC_DEFINE('ZEND_DVAL_TO_LVAL_CAST_OK', 1);
AC_DEFINE('HAVE_STRNLEN', 1);
STDOUT.WriteBlankLines(1);
if (PHP_SNAPSHOT_TEMPLATE == "no") {
/* default is as a sibling of the php_build dir */
if (FSO.FolderExists(PHP_PHP_BUILD + "\\template")) {
PHP_SNAPSHOT_TEMPLATE = FSO.GetAbsolutePathName(PHP_PHP_BUILD + "\\template");
} else if (FSO.FolderExists(PHP_PHP_BUILD + "\\..\\template")) {
PHP_SNAPSHOT_TEMPLATE = FSO.GetAbsolutePathName(PHP_PHP_BUILD + "\\..\\template");
}
}
DEFINE('SNAPSHOT_TEMPLATE', PHP_SNAPSHOT_TEMPLATE);
AC_DEFINE("PHP_DIR", PHP_DIR);
DEFINE("PHP_DIR", PHP_DIR);
ARG_WITH("codegen-arch", "Architecture for code generation", "no");
toolset_setup_codegen_arch();
+19 -5
View File
@@ -1103,7 +1103,7 @@ function generate_version_info_resource(makefiletarget, basename, creditspath, s
*/
if (FSO.FileExists(creditspath + '\\template.rc')) {
MFO.WriteLine("$(BUILD_DIR)\\" + resname + ": " + creditspath + "\\template.rc");
MFO.WriteLine("\t$(RC) /nologo /fo $(BUILD_DIR)\\" + resname + logo + debug +
MFO.WriteLine("\t$(RC) /nologo $(BASE_INCLUDES) /fo $(BUILD_DIR)\\" + resname + logo + debug +
' /d FILE_DESCRIPTION="\\"' + res_desc + '\\"" /d FILE_NAME="\\"' +
makefiletarget + '\\"" /d PRODUCT_NAME="\\"' + res_prod_name +
versioning + '\\"" /d THANKS_GUYS="\\"' + thanks + '\\"" ' +
@@ -1112,14 +1112,14 @@ function generate_version_info_resource(makefiletarget, basename, creditspath, s
}
if (MODE_PHPIZE) {
MFO.WriteLine("$(BUILD_DIR)\\" + resname + ": $(PHP_DIR)\\build\\template.rc");
MFO.WriteLine("\t$(RC) /nologo /I $(PHP_DIR)/include /n /fo $(BUILD_DIR)\\" + resname + logo + debug +
MFO.WriteLine("\t$(RC) /nologo $(BASE_INCLUDES) /I $(PHP_DIR)/include /n /fo $(BUILD_DIR)\\" + resname + logo + debug +
' /d FILE_DESCRIPTION="\\"' + res_desc + '\\"" /d FILE_NAME="\\"'
+ makefiletarget + '\\"" /d URL="\\"' + project_url +
'\\"" /d INTERNAL_NAME="\\"' + internal_name + versioning +
'\\"" /d THANKS_GUYS="\\"' + thanks + '\\"" $(PHP_DIR)\\build\\template.rc');
} else {
MFO.WriteLine("$(BUILD_DIR)\\" + resname + ": win32\\build\\template.rc");
MFO.WriteLine("\t$(RC) /nologo /n /fo $(BUILD_DIR)\\" + resname + logo + debug +
MFO.WriteLine("\t$(RC) /nologo $(BASE_INCLUDES) /n /fo $(BUILD_DIR)\\" + resname + logo + debug +
' /d FILE_DESCRIPTION="\\"' + res_desc + '\\"" /d FILE_NAME="\\"'
+ makefiletarget + '\\"" /d URL="\\"' + project_url +
'\\"" /d INTERNAL_NAME="\\"' + internal_name + versioning +
@@ -1649,7 +1649,7 @@ function ADD_SOURCES(dir, file_list, target, obj_dir)
"--library=" + cppcheck_lib + " " +
/* "--rule-file=win32\build\cppcheck_rules.xml " + */
" --std=c89 --std=c++11 " +
"--quiet --inconclusive --template=vs ";
"--quiet --inconclusive --template=vs -j 4 ";
var cppcheck_build_dir = get_define("CPPCHECK_BUILD_DIR");
if (!!cppcheck_build_dir) {
@@ -2344,7 +2344,8 @@ function handle_analyzer_makefile_flags(fd, key, val)
.replace("/guard:cf ", "")
.replace(/\/MP \d+ /, "")
.replace(/\/MP /, "")
.replace("/LD ", "");
.replace("/LD ", "")
.replace("/Qspectre ", "");
} else if ("cppcheck" == PHP_ANALYZER) {
new_val = "";
@@ -3068,6 +3069,19 @@ function toolset_setup_common_cflags()
// Set some debug/release specific options
ADD_FLAG('CFLAGS', ' /RTC1 ');
} else {
if (PHP_DEBUG == "no" && PHP_SECURITY_FLAGS == "yes") {
/* Mitigations for CVE-2017-5753.
TODO backport for all supported VS versions when they release it. */
if (VCVERS >= 1912) {
var subver1912 = probe_binary(PHP_CL).substr(6);
if (VCVERS >= 1913 || 1912 == VCVERS && subver1912 >= 25835) {
ADD_FLAG('CFLAGS', "/Qspectre");
} else {
/* Undocumented. */
ADD_FLAG('CFLAGS', "/d2guardspecload");
}
}
}
if (VCVERS >= 1900) {
if (PHP_SECURITY_FLAGS == "yes") {
ADD_FLAG('CFLAGS', "/guard:cf");
+264 -264
View File
@@ -1,266 +1,266 @@
/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2018 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Pierre Joye <pierre1@php.net> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
// This generates a configure script for win32 build
var STDOUT = WScript.StdOut;
var FSO = WScript.CreateObject("Scripting.FileSystemObject");
var C = FSO.CreateTextFile("configure.js", true);
var B = FSO.CreateTextFile("configure.bat", true);
re = /\\script/i;
var PHP_DIR=FSO.GetParentFolderName(WScript.ScriptFullName).replace(re,"");
var modules = "";
var MODULES = WScript.CreateObject("Scripting.Dictionary");
var module_dirs = new Array();
function ERROR(msg)
{
STDERR.WriteLine("ERROR: " + msg);
WScript.Quit(3);
}
function file_get_contents(filename)
{
var t = "";
var F = FSO.OpenTextFile(filename, 1);
if (!F.AtEndOfStream) {
t = F.ReadAll();
F.Close();
}
return t;
}
function Module_Item(module_name, config_path, dir_line, deps, content)
{
this.module_name = module_name;
this.config_path = config_path;
this.dir_line = dir_line;
this.deps = deps;
this.content = content;
}
function get_module_dep(contents)
{
var re_dep_line = new RegExp("ADD_EXTENSION_DEP\\([^,]*\\s*,\\s*['\"]([^'\"]+)['\"].*\\)", "gm");
var calls = contents.match(re_dep_line);
var deps = new Array();
if (calls != null) {
for (i = 0; i < calls.length; i++) {
// now we need the extension name out of this thing
if (calls[i].match(re_dep_line)) {
deps[deps.length] = RegExp.$1;
}
}
}
return deps;
}
function find_config_w32(dirname)
{
if (!FSO.FolderExists(dirname)) {
return;
}
var f = FSO.GetFolder(dirname);
var fc = new Enumerator(f.SubFolders);
var c, i, ok, n;
var item = null;
c = dirname + "\\config.w32";
if (FSO.FileExists(c)) {
var dir_line = "configure_module_dirname = condense_path(FSO.GetParentFolderName('"
+ c.replace(new RegExp('(["\\\\])', "g"), '\\$1') + "'));\r\n";
var contents = file_get_contents(c);
deps = get_module_dep(contents);
item = new Module_Item(n, c, dir_line, deps, contents);
MODULES.Add(n, item);
}
for (; !fc.atEnd(); fc.moveNext()) {
/* check if we already picked up a module with the same dirname;
* if we have, don't include it here */
n = FSO.GetFileName(fc.item());
if (n == '.svn' || n == 'tests' || n == '.git') {
continue;
}
c = FSO.BuildPath(fc.item(), "config.w32");
if (FSO.FileExists(c)) {
var dir_line = "configure_module_dirname = condense_path(FSO.GetParentFolderName('"
+ c.replace(new RegExp('(["\\\\])', "g"), '\\$1') + "'));\r\n";
var contents = file_get_contents(c);
deps = get_module_dep(contents);
item = new Module_Item(n, c, dir_line, deps, contents);
MODULES.Add(n, item);
}
}
}
function emit_module(item)
{
return item.dir_line + item.content;
}
function emit_dep_modules(module_names)
{
var i, mod_name, j;
var output = "";
var item = null;
for (i in module_names) {
mod_name = module_names[i];
if (MODULES.Exists(mod_name)) {
item = MODULES.Item(mod_name);
MODULES.Remove(mod_name);
if (item.deps.length) {
output += emit_dep_modules(item.deps);
}
output += emit_module(item);
}
}
return output;
}
function gen_modules()
{
var module_names = (new VBArray(MODULES.Keys())).toArray();
var i, mod_name, j;
var item;
var output = "";
// first, look for modules with empty deps; emit those first
for (i in module_names) {
STDOUT.WriteLine("module ... " + module_names);
mod_name = module_names[i];
item = MODULES.Item(mod_name);
if (item.deps.length == 0) {
MODULES.Remove(mod_name);
output += emit_module(item);
}
}
// now we are left with modules that have dependencies on other modules
module_names = (new VBArray(MODULES.Keys())).toArray();
output += emit_dep_modules(module_names);
return output;
}
// Process buildconf arguments
function buildconf_process_args()
{
args = WScript.Arguments;
for (i = 0; i < args.length; i++) {
arg = args(i);
// If it is --foo=bar, split on the equals sign
arg = arg.split("=", 2);
argname = arg[0];
if (arg.length > 1) {
argval = arg[1];
} else {
argval = null;
}
if (argname == '--clean' && argval != null) {
STDOUT.WriteLine("Cleaning...");
return 0;
}
if (argname == '--help') {
STDOUT.WriteLine("Usage: phpize [--clean|--help|--version|-v]");
return 0;
}
return 1;
}
}
if (buildconf_process_args() == 0) {
WScript.Quit(3);
}
STDOUT.WriteLine("Rebuilding configure.js");
STDOUT.WriteLine(PHP_DIR);
// Write the head of the configure script
C.WriteLine("/* This file automatically generated from script/confutils.js */");
C.WriteLine("var MODE_PHPIZE = true;");
C.WriteLine("var PHP_DIR = " + '"' + PHP_DIR.replace(new RegExp('(["\\\\])', "g"), '\\$1') + '"');
C.WriteLine("var PHP_PREFIX = " + '"' + PHP_PREFIX.replace(new RegExp('(["\\\\])', "g"), '\\$1') + '"');
/* XXX this needs to be implemented for the phpize mode yet, a quick fix just to disable it for now */
C.WriteLine("var PHP_ANALYZER = 'disabled';");
C.WriteLine("var PHP_PGO = 'no';");
C.WriteLine("var PHP_PGI = 'no';");
C.Write(file_get_contents(PHP_DIR + "//script//ext_deps.js"));
if (FSO.FileExists(PHP_DIR + "/script/ext_pickle.js")) {
C.Write(file_get_contents(PHP_DIR + "//script//ext_pickle.js"));
}
C.Write(file_get_contents(PHP_DIR + "/script/confutils.js"));
C.Write(file_get_contents(PHP_DIR + "/script/config.phpize.js"));
// Pull in code for the base detection
modules = file_get_contents(PHP_DIR + "/script/config.w32.phpize.in");
C.WriteLine("ARG_ENABLE('debug', 'Compile with debugging symbols', PHP_DEBUG);");
find_config_w32(".");
// Now generate contents of module based on MODULES, chasing dependencies
// to ensure that dependent modules are emitted first
modules += gen_modules();
// Look for ARG_ENABLE or ARG_WITH calls
re = new RegExp("(ARG_(ENABLE|WITH)\([^;]+\);)", "gm");
calls = modules.match(re);
for (i = 0; i < calls.length; i++) {
item = calls[i];
C.WriteLine("try {");
C.WriteLine(item);
C.WriteLine("} catch (e) {");
C.WriteLine('\tSTDOUT.WriteLine("problem: " + e);');
C.WriteLine("}");
}
C.WriteBlankLines(1);
C.WriteLine("conf_process_args();");
C.WriteBlankLines(1);
// Comment out the calls from their original positions
modules = modules.replace(re, "/* $1 */");
C.Write(modules);
C.WriteBlankLines(1);
C.Write(file_get_contents(PHP_DIR + "\\script\\configure.tail"));
B.WriteLine("@echo off");
B.WriteLine("cscript /nologo configure.js %*");
/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2018 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Pierre Joye <pierre1@php.net> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
// This generates a configure script for win32 build
var STDOUT = WScript.StdOut;
var FSO = WScript.CreateObject("Scripting.FileSystemObject");
var C = FSO.CreateTextFile("configure.js", true);
var B = FSO.CreateTextFile("configure.bat", true);
re = /\\script/i;
var PHP_DIR=FSO.GetParentFolderName(WScript.ScriptFullName).replace(re,"");
var modules = "";
var MODULES = WScript.CreateObject("Scripting.Dictionary");
var module_dirs = new Array();
function ERROR(msg)
{
STDERR.WriteLine("ERROR: " + msg);
WScript.Quit(3);
}
function file_get_contents(filename)
{
var t = "";
var F = FSO.OpenTextFile(filename, 1);
if (!F.AtEndOfStream) {
t = F.ReadAll();
F.Close();
}
return t;
}
function Module_Item(module_name, config_path, dir_line, deps, content)
{
this.module_name = module_name;
this.config_path = config_path;
this.dir_line = dir_line;
this.deps = deps;
this.content = content;
}
function get_module_dep(contents)
{
var re_dep_line = new RegExp("ADD_EXTENSION_DEP\\([^,]*\\s*,\\s*['\"]([^'\"]+)['\"].*\\)", "gm");
var calls = contents.match(re_dep_line);
var deps = new Array();
if (calls != null) {
for (i = 0; i < calls.length; i++) {
// now we need the extension name out of this thing
if (calls[i].match(re_dep_line)) {
deps[deps.length] = RegExp.$1;
}
}
}
return deps;
}
function find_config_w32(dirname)
{
if (!FSO.FolderExists(dirname)) {
return;
}
var f = FSO.GetFolder(dirname);
var fc = new Enumerator(f.SubFolders);
var c, i, ok, n;
var item = null;
c = dirname + "\\config.w32";
if (FSO.FileExists(c)) {
var dir_line = "configure_module_dirname = condense_path(FSO.GetParentFolderName('"
+ c.replace(new RegExp('(["\\\\])', "g"), '\\$1') + "'));\r\n";
var contents = file_get_contents(c);
deps = get_module_dep(contents);
item = new Module_Item(n, c, dir_line, deps, contents);
MODULES.Add(n, item);
}
for (; !fc.atEnd(); fc.moveNext()) {
/* check if we already picked up a module with the same dirname;
* if we have, don't include it here */
n = FSO.GetFileName(fc.item());
if (n == '.svn' || n == 'tests' || n == '.git') {
continue;
}
c = FSO.BuildPath(fc.item(), "config.w32");
if (FSO.FileExists(c)) {
var dir_line = "configure_module_dirname = condense_path(FSO.GetParentFolderName('"
+ c.replace(new RegExp('(["\\\\])', "g"), '\\$1') + "'));\r\n";
var contents = file_get_contents(c);
deps = get_module_dep(contents);
item = new Module_Item(n, c, dir_line, deps, contents);
MODULES.Add(n, item);
}
}
}
function emit_module(item)
{
return item.dir_line + item.content;
}
function emit_dep_modules(module_names)
{
var i, mod_name, j;
var output = "";
var item = null;
for (i in module_names) {
mod_name = module_names[i];
if (MODULES.Exists(mod_name)) {
item = MODULES.Item(mod_name);
MODULES.Remove(mod_name);
if (item.deps.length) {
output += emit_dep_modules(item.deps);
}
output += emit_module(item);
}
}
return output;
}
function gen_modules()
{
var module_names = (new VBArray(MODULES.Keys())).toArray();
var i, mod_name, j;
var item;
var output = "";
// first, look for modules with empty deps; emit those first
for (i in module_names) {
STDOUT.WriteLine("module ... " + module_names);
mod_name = module_names[i];
item = MODULES.Item(mod_name);
if (item.deps.length == 0) {
MODULES.Remove(mod_name);
output += emit_module(item);
}
}
// now we are left with modules that have dependencies on other modules
module_names = (new VBArray(MODULES.Keys())).toArray();
output += emit_dep_modules(module_names);
return output;
}
// Process buildconf arguments
function buildconf_process_args()
{
args = WScript.Arguments;
for (i = 0; i < args.length; i++) {
arg = args(i);
// If it is --foo=bar, split on the equals sign
arg = arg.split("=", 2);
argname = arg[0];
if (arg.length > 1) {
argval = arg[1];
} else {
argval = null;
}
if (argname == '--clean' && argval != null) {
STDOUT.WriteLine("Cleaning...");
return 0;
}
if (argname == '--help') {
STDOUT.WriteLine("Usage: phpize [--clean|--help|--version|-v]");
return 0;
}
return 1;
}
}
if (buildconf_process_args() == 0) {
WScript.Quit(3);
}
STDOUT.WriteLine("Rebuilding configure.js");
STDOUT.WriteLine(PHP_DIR);
// Write the head of the configure script
C.WriteLine("/* This file automatically generated from script/confutils.js */");
C.WriteLine("var MODE_PHPIZE = true;");
C.WriteLine("var PHP_DIR = " + '"' + PHP_DIR.replace(new RegExp('(["\\\\])', "g"), '\\$1') + '"');
C.WriteLine("var PHP_PREFIX = " + '"' + PHP_PREFIX.replace(new RegExp('(["\\\\])', "g"), '\\$1') + '"');
/* XXX this needs to be implemented for the phpize mode yet, a quick fix just to disable it for now */
C.WriteLine("var PHP_ANALYZER = 'disabled';");
C.WriteLine("var PHP_PGO = 'no';");
C.WriteLine("var PHP_PGI = 'no';");
C.Write(file_get_contents(PHP_DIR + "//script//ext_deps.js"));
if (FSO.FileExists(PHP_DIR + "/script/ext_pickle.js")) {
C.Write(file_get_contents(PHP_DIR + "//script//ext_pickle.js"));
}
C.Write(file_get_contents(PHP_DIR + "/script/confutils.js"));
C.Write(file_get_contents(PHP_DIR + "/script/config.phpize.js"));
// Pull in code for the base detection
modules = file_get_contents(PHP_DIR + "/script/config.w32.phpize.in");
C.WriteLine("ARG_ENABLE('debug', 'Compile with debugging symbols', PHP_DEBUG);");
find_config_w32(".");
// Now generate contents of module based on MODULES, chasing dependencies
// to ensure that dependent modules are emitted first
modules += gen_modules();
// Look for ARG_ENABLE or ARG_WITH calls
re = new RegExp("(ARG_(ENABLE|WITH)\([^;]+\);)", "gm");
calls = modules.match(re);
for (i = 0; i < calls.length; i++) {
item = calls[i];
C.WriteLine("try {");
C.WriteLine(item);
C.WriteLine("} catch (e) {");
C.WriteLine('\tSTDOUT.WriteLine("problem: " + e);');
C.WriteLine("}");
}
C.WriteBlankLines(1);
C.WriteLine("conf_process_args();");
C.WriteBlankLines(1);
// Comment out the calls from their original positions
modules = modules.replace(re, "/* $1 */");
C.Write(modules);
C.WriteBlankLines(1);
C.Write(file_get_contents(PHP_DIR + "\\script\\configure.tail"));
B.WriteLine("@echo off");
B.WriteLine("cscript /nologo configure.js %*");
FSO.CopyFile(PHP_DIR + "\\script\\run-tests.php", "run-tests.php", true);