Commit Graph

5123 Commits

Author SHA1 Message Date
Remi Collet
0d87a0ba57 next is 7.2.6 2018-04-11 07:53:53 +02:00
Nikita Popov
bd4b203585 Merge branch 'PHP-7.2' 2018-03-23 21:14:58 +01:00
Thomas Petazzoni
2842aa2a07 main/php_ini.c: build empty php_load_zend_extension_cb() when !HAVE_LIBDL
Commit 0782a7fc63 ("Fixed bug #74866
extension_dir = "./ext" now use current directory for base") modified
the php_load_zend_extension_cb() function to use php_load_shlib(), and
pass a handle to the newly introduced zend_load_extension_handle()
function instead of passing the extension path to
zend_load_extension().

While doing so, it introduced a call to php_load_shlib() from code
that is built even when HAVE_LIBDL is not defined. However,
php_load_shlib() is not implemented when HAVE_LIBDL is not defined,
for obvious reasons.

It turns out that zend_load_extension_handle() anyway doesn't do
anything when ZEND_EXTENSIONS_SUPPORT is defined to 0, and
ZEND_EXTENSIONS_SUPPORT is not defined when HAVE_LIBDL is not defined
(Zend/zend_portability.h).

Fixes the following build failure when building on a system that
doesn't have libdl:

main/php_ini.o: In function `php_load_zend_extension_cb':
php_ini.c:(.text+0x478): undefined reference to `php_load_shlib'
php_ini.c:(.text+0x4b0): undefined reference to `php_load_shlib'
collect2: error: ld returned 1 exit status

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-03-23 21:13:45 +01:00
Joe Watkins
d2b47e8065
bump versions 2018-03-14 05:58:42 +01:00
Remi Collet
d660d6d31b next is 7.2.5 2018-03-13 12:49:25 +01:00
Anatol Belski
f28630eae0 Merge branch 'PHP-7.2'
* PHP-7.2:
  Guard platform dependent code
2018-03-07 12:29:56 +01:00
Anatol Belski
22857f1d89 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Guard platform dependent code
2018-03-07 12:29:22 +01:00
Anatol Belski
281e2f8207 Guard platform dependent code 2018-03-07 12:28:29 +01:00
Sara Golemon
5dd2a4185c
Now working on 7.2.4-dev 2018-02-13 14:32:37 -05:00
Joe
1f0ea7fa4d
bump versions 2018-02-13 20:24:34 +01:00
Gabriel Caruso
8034fdc9d9 Use int instead of integer in proto 2018-02-02 22:32:15 +01:00
Anatol Belski
ec0bcecee7 Add RtlSecureZeroMemory to explicit_bzero() compile case
just in case one would use the function directly. The use of
ZEND_SECURE_ZERO could be eliminated now, too. Or it can be
kept for BC.
2018-01-26 21:34:31 +01:00
Sara Golemon
df4edde870
Remove padding just merged since 7.3 isn't released yet.
Also bump PHP_API_VERSION since the struct size has changed.
2018-01-23 11:13:41 -05:00
Sara Golemon
76b63ed149 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix alignment of PG struct cause by ignore_user_abort big endian fix
2018-01-23 11:11:43 -05:00
Sara Golemon
0c22cda951 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix alignment of PG struct cause by ignore_user_abort big endian fix
2018-01-23 11:11:37 -05: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
81425be70b Merge branch 'PHP-7.2'
* PHP-7.2:
  BigEndian fix for ignore_user_abort. Use zend_bool to match OnUpdateBool
2018-01-23 08:59:30 -05:00
Sara Golemon
871066523e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  BigEndian fix for ignore_user_abort. Use zend_bool to match OnUpdateBool
2018-01-23 08:58:53 -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
David Carlier
7f51257c08 NetBSD has its own unoptimizable memset version since 2013
checking presence of the function if older versions of NetBSD
2018-01-19 18:24:36 +01:00
Anatol Belski
ea56fc840e 7.0.15 next 2018-01-16 19:47:35 +01:00
Remi Collet
5a54107879 next is 7.2.3 2018-01-16 09:54:57 +01:00
Lior Kaplan
0e3dede07c Happy new year (Update copyright to 2018) 2018-01-04 01:02:17 +02:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Dmitry Stogov
d9f5ea691f zend_fcall_info_cache.initialized is removed (zend_fcall_info_cache is initialized if zend_fcall_info_cache.function_handler is set). 2017-12-27 15:15:03 +03:00
Nikita Popov
688b9136ab Fixed bug #54043 2017-12-23 13:35:08 +01:00
Nikita Popov
66c8a9d672 Remove EH_SUPPRESS mode
It is unused and does not work in any meaningful way:
Warnings are suppressed, but everything else (both notices and
fatals) are not. It would make some sense if it suppressed
warnings and lower, but right now this is a pointless mode.
2017-12-23 13:28:09 +01:00
Xinchen Hui
4dfbfe93aa Use cheaper API 2017-12-18 11:55:14 +08:00
David Carlier
e835e3c132 Improve explicit_bzero implementation
Using the weak symbol explicit_bzero_hook does not work if LTO is
enabled. Instead avoid memset optimizations using an asm memory
barrier.

Use a fallback implementation where the memory is zeroed through
volatile.
2017-12-16 23:07:48 +01:00
Markus Staab
5142a06506 Use known string "file" in stream layer 2017-12-16 13:25:05 +01:00
Dmitry Stogov
0f06df310c Turn "php_stream_wrapper"s into constants
Keep non-constant "php_stream_wrapper"s in API functions and callbacks for compatibility.
2017-12-14 22:46:22 +03:00
Dmitry Stogov
83e495e0fd Move constants into read-only data segment 2017-12-14 22:14:36 +03:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Dmitry Stogov
76e4c8ba73 typo 2017-12-12 19:01:10 +03:00
Dmitry Stogov
fe4c7898d8 Avoid reallocation and double copying of variable names. 2017-12-12 13:47:47 +03:00
Javier Eguiluz
c136fda18e Fixed a typo 2017-12-09 18:39:06 +01:00
Anatol Belski
98416a37f3 Put missing signature into header 2017-12-09 00:26:18 +01:00
Dmitry Stogov
6a9d2b2190 Cleanup type conversion 2017-12-07 19:24:55 +03:00
krakjoe
71a460ba7e
bump versions 2017-12-05 14:18:48 +01:00
Dmitry Stogov
cc6a41fad1 Use interned strings as variable names 2017-12-01 01:37:48 +03:00
Dmitry Stogov
7cc6f60134 Added "argv" and "argc" as known strings.
Fixed incorrect "argc" update and corresponding phpdbg test.
2017-12-01 01:35:47 +03:00
Dmitry Stogov
af7705bec2 Avoid strings duplication (zend_hash* and printf may work with non zero terminated strings) 2017-11-30 23:29:21 +03:00
Dmitry Stogov
f98721b4e0 Intern auto global name strings in first place 2017-11-29 17:10:51 +03:00
Anatol Belski
a935ad927e Merge branch 'PHP-7.2'
* PHP-7.2:
  Follow up on bug #75574 for FCGI side
2017-11-28 20:35:19 +01:00
Anatol Belski
0b30461764 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Follow up on bug #75574 for FCGI side
2017-11-28 20:34:44 +01:00
Anatol Belski
8b57a5bca0 Follow up on bug #75574 for FCGI side 2017-11-28 20:33:11 +01:00
Nikita Popov
9215be76a6 Fix C++ build failure due to format macros
PRIi64 etc. may not be available without this macro definition, on
pre-C++11 compilers. At least I think that's the issue.
2017-11-24 19:02:59 +01:00
Anatol Belski
e69fa2865f Eliminate cast 2017-11-22 12:50:50 +01:00
krakjoe
f3545165b2
Merge branch 'PHP-7.2'
* PHP-7.2:
  Check for binary_location allocation failure
2017-11-22 04:49:52 +00:00
krakjoe
ae810d785c
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Check for binary_location allocation failure
2017-11-22 04:49:43 +00:00
krakjoe
fee6c812c4
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Check for binary_location allocation failure
2017-11-22 04:49:34 +00:00
Sebastian Ramadan
7e0feb8856
Check for binary_location allocation failure 2017-11-22 04:49:04 +00:00
Sebastian Ramadan
7d5691cd69 Fix some printf() specifier usages
Use PRIu32 when printing uint32_t.
Fix some %u/%d confusions.
Add some casts where types are not standardized.
2017-11-21 22:50:27 +01:00
Anatol Belski
6b54b3409a Ensure shift doesn't overflow, closes #2916 2017-11-21 18:48:37 +01:00
Nikita Popov
26f8fc833b Enable and fix printf() format warnings
Add _unchecked() variants of zend_spprintf and zend_strpprintf for
cases where we specifically want to disable these checks, such as
use of %H.
2017-11-16 21:15:36 +01:00
Anatol Belski
a5bc5aed71 Patch core for PCRE2 support
RFC https://wiki.php.net/rfc/pcre2-migration
2017-11-13 19:37:38 +01:00
Sara Golemon
fd463cfbad Merge branch 'PHP-7.2'
* PHP-7.2:
  Bugfix#75515 php://streams behaving greedily
2017-11-13 13:35:46 -05:00
Sara Golemon
0a45e8f096
Bugfix#75515 php://streams behaving greedily
5060fc23 attempted to fix #68948 by treating all non-uri streams
as non-blocking, however php://fd/* streams (which includes stdin)
may block if the other end of the IPC isn't finished.

This represents a partial revert to the pre RC6 state,
but includes an escape hatch for php://memory and php://temp
streams which are local to the current process.

This also restores stream_set_chunk_size test to previous state.
2017-11-13 09:40:34 -05:00
Remi Collet
704bcd385f next version is 7.2.1 2017-11-13 12:46:30 +01:00
Joe Watkins
3be6810385
bump versions 2017-11-07 15:35:14 +00:00
Anatol Belski
bc7d4dc523 7.0.27 next 2017-11-07 10:07:52 +01:00
Sara Golemon
e36244e776 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixes #68948 related to a BC break introduced by #68532 fix.
2017-11-06 17:41:09 -05:00
Simon JAILLET
5060fc2349 Fixes #68948 related to a BC break introduced by #68532 fix. 2017-11-06 17:34:42 -05:00
Dmitry Stogov
95b33f2394 Added RC_DEBUG exception 2017-11-03 00:34:18 +03:00
Dmitry Stogov
d92a701a3b Added RC_DEBUG exception 2017-11-02 23:54:24 +03:00
Dmitry Stogov
3e35def20b Start RC_DEBUG at the end of MINIT and finish in MSHUTDOWN after all worker threads are terminated. 2017-11-02 23:52:50 +03:00
Dmitry Stogov
f2b91b31e4 Switch back from "request" interned strings storage to "permanent" in MSHUTDOWN 2017-11-02 23:29:21 +03:00
Dmitry Stogov
87a72e7e62 Use interned strins for output handler aliases and conflict checkers names. 2017-11-02 14:11:56 +03:00
Dmitry Stogov
468fd78bff Fixed memory leaks 2017-11-02 03:04:27 +03:00
Dmitry Stogov
67d5f39a47 Persistent resources are "thread-local".
Register persistent resources through new functions zend_register_persistent_resource()/zend_register_persistent_resource_ex().
2017-11-01 15:19:31 +03:00
Xinchen Hui
a8a17a72b0 RC manipulation cleanup 2017-11-01 10:25:10 +08:00
Dmitry Stogov
8897c80956 Use interned strings for stream transports 2017-11-01 02:39:09 +03:00
Dmitry Stogov
bbfd0df9d3 Use interned strings for persistent stream wrappers and filters 2017-10-31 18:51:35 +03:00
Dmitry Stogov
974a8f8ad2 Use internet strings for EG(ini_entries) 2017-10-31 02:16:46 +03:00
Dmitry Stogov
8203a0668d Merge branch 'master' into rc_debug
* master:
  Use per-request heap instead of system one
  Extend zend_register_class_alias_ex() with additional argument to allow creating persistent or per-request aliases
  Makrk persistent resources and references with GC_PERSISTENT flag
2017-10-27 14:59:09 +03:00
Dmitry Stogov
cf67a421e9 Use per-request heap instead of system one 2017-10-27 14:45:54 +03:00
Dmitry Stogov
49ea143bbd Encapsulate reference-counting primitives.
Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead.
Added mactros to validate reference-counting (disabled for now).
These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
2017-10-27 01:28:58 +03:00
Joe Watkins
5d2456c278
Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix issue with zend signals in php_request_startup
2017-10-19 11:48:37 +01:00
Joe Watkins
0397b8c5c5
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix issue with zend signals in php_request_startup
2017-10-19 11:48:27 +01:00
Herman J. Radtke III
bb1814b5c3
Fix issue with zend signals in php_request_startup
The zend_signals_activate() function is called in php_request_startup()
even if `--disable-zend-signals` is used. This causes uninitialized
variables to be used on ZTS builds.

This was removed in 7.1 in c870633. Removing guards from the SAPIs
should be fine, but removing the guard from main/main.c prevents anyone
using the static embedded library to integrate PHP into their programs.

For more details, see the "Additional remark" section in
https://bugs.php.net/bug.php?id=74149
2017-10-19 11:48:16 +01:00
Dmitry Stogov
b4903aef16 Move a part of opcache initialization into post_startup phase (when all extensions already loaded). 2017-10-18 17:18:54 +03:00
Joe Watkins
c2bfdf3712
bump version 2017-10-10 16:12:36 +01:00
Anatol Belski
51658bac35 Move dev to 7.0.26 2017-10-10 08:26:04 +02:00
Peter Kokot
4fcecfb291 Remove old apache_hooks occurrence
The apache_hooks SAPI has been removed since PHP >= 7.0 and there is no
need to have two different php_request_startup definitions.

Also php_request_startup_for_hook() and php_request_shutdown_for_hook() functions
are not used in the PHP source code directly anymore. They are out of sync and
are not touched when making changes to the shutdown sequence.

The php_start_sapi() function was therefore not used anymore and is
removed.
2017-10-08 17:49:24 +02:00
Nikita Popov
18e297d3dd Merge branch 'PHP-7.2' 2017-09-24 08:55:28 +02:00
Nikita Popov
76b2b4a190 Merge branch 'PHP-7.1' into PHP-7.2 2017-09-24 08:55:12 +02:00
Nikita Popov
628c257f71 Merge branch 'PHP-7.0' into PHP-7.1 2017-09-24 08:54:36 +02:00
Nikita Popov
73d6456d7d Fixed bug #75252 2017-09-24 08:53:27 +02:00
Anatol Belski
a9273a7dfe Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix thread safety
2017-09-21 10:33:35 +02:00
Anatol Belski
95870dcc77 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix thread safety
2017-09-21 10:33:13 +02:00
Anatol Belski
96323d1bd7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix thread safety
2017-09-21 10:32:47 +02:00
Anatol Belski
da2f581833 Fix thread safety 2017-09-21 10:32:09 +02:00
Andrea Faulds
471d2bb0ae Merge branch 'PHP-7.2' 2017-09-21 00:05:55 +01:00
Andrea Faulds
7418f6814f Merge branch 'PHP-7.1' into PHP-7.2 2017-09-21 00:04:56 +01:00
Andrea Faulds
b71023e297 Merge branch 'PHP-7.0' into PHP-7.1 2017-09-21 00:04:08 +01:00
Andrea Faulds
418f97443a Fix bug #75236 2017-09-21 00:02:52 +01:00
Dmitry Stogov
dc5d850478 Merge branch 'PHP-7.2'
* PHP-7.2:
  Use private names for new libpcre symbols.
2017-09-18 20:01:51 +03:00