Commit Graph

112589 Commits

Author SHA1 Message Date
Christoph M. Becker
e944ae6b2a Upgrade to SQLite 3.28.0
Over the years, multiple security vulnerabilities[1] have been found
and fixed in SQLite3, so it makes sense to update our bundled libsqlite
to the latest available version.

[1] <https://www.cvedetails.com/vulnerability-list/vendor_id-9237/Sqlite.html>
2019-07-09 09:59:46 +02:00
Dmitry Stogov
e1f418dd18 Remove duplicated code for (PRE|POST)_DEC_(OBJ|STATIC_PROP) opcodes 2019-07-09 10:46:04 +03:00
Derick Rethans
086b476c27 Update NEWS for 7.4.0beta1 2019-07-09 07:41:09 +00:00
Derick Rethans
3fd7c478a5 Update NEWS for PHP 7.4.0alpha3 2019-07-09 07:39:49 +00:00
Peter Kokot
d094ca83df Catch up with current procedures
- Git is used for moving existing extensions to PECL
- PHP versions with the PHP 7.4 examples
- Some minor tweaks here and there
- Mention re2c also
- Mention Docker image as a helper tool
2019-07-08 23:28:02 +02:00
Peter Kokot
5017676438 Add zend.exception_ignore_args [ci skip] 2019-07-08 19:34:47 +02:00
Peter Kokot
e180290a1e Update NEWS [ci skip] 2019-07-08 18:50:59 +02:00
Peter Kokot
fa37cfe8cc Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Update NEWS [ci skip]
  Update NEWS [ci skip]
2019-07-08 18:49:15 +02:00
Peter Kokot
4fcf8e9385 Update NEWS [ci skip] 2019-07-08 18:48:50 +02:00
Peter Kokot
ed4aa4b624 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Update NEWS [ci skip]
2019-07-08 18:48:27 +02:00
Peter Kokot
f81be1aff6 Update NEWS [ci skip] 2019-07-08 18:47:55 +02:00
Dmitry Stogov
1804fd634e Fixed dispatch from inlined hybrid opcode to another opcode 2019-07-08 18:01:46 +03:00
Nikita Popov
428cfdd181 Add ReflectionReference::getRefcount()
And don't return null for rc=1 references. Leave it to the user
to decide whether or not they want to consider these as references
or not.

Fixes bug #78263.
2019-07-08 16:54:03 +02:00
Peter Kokot
0f0c6c617f Catch up with recent changes [ci skip]
- RFC about password_hash portability improvements added
- build system minor updates noted
- typos
2019-07-08 16:23:27 +02:00
Peter Kokot
4b864c2ebb Remove APACHE symbol
The APACHE symbol was used in very early PHP versions to indicate the
Apache module usage. Since PHP 4 this is no longer used in the code.
2019-07-08 15:05:54 +02:00
Peter Kokot
900de30b0f Refactor genif.sh
Changes:
- Coding style fixes
- ${1+"$@"} replaced with "$@" [1]
- EXTRA_MODULE_PTRS variable is not used anymore
- awk tool defined via environment variable
- srcdir determined automatically from the genif.sh location

[1] https://www.in-ulm.de/~mascheck/various/bourne_args/

Closes GH-4372
2019-07-08 14:58:26 +02:00
Nikita Popov
392398bfe6 Make busy wait busier
Another stab in the dark to fix the intermittent failures of timeout
tests on macos CI: We're using ITIMER_PROF, which means that the
timer counts against user+system time. The "busy" wait loop counts
against real time. Currently it calls microtime() on every iteration.
If that call is implemented as a syscall rather than going through
vDSO or commpage we might be seeing many context switches here which
drive up the real time, but not user or system time.

See if making the loop busier and calling microtime() less helps the
situation.
2019-07-08 13:35:29 +02:00
Dmitry Stogov
9a833438d1 Delay EG(exception) check on slow path 2019-07-08 13:56:34 +03:00
Scott Dutton
d90cdbd9df Deprecate passing invalid character to base_convert etc
RFC: https://wiki.php.net/rfc/base_convert_improvements
2019-07-08 12:49:21 +02:00
Peter Kokot
550c2aa89b Remove C89 checks for signal.h and strerror
These are part of the C89 and on today's systems not needed to be
checked anymore. This removes symbols HAVE_SIGNAL and HAVE_STRERROR.

- http://port70.net/~nsz/c/c89/c89-draft.html
- locale.h is also part of C89 but will be removed per request in PHP 8
2019-07-08 12:46:51 +02:00
Peter Kokot
f002761e08 Update libmagic patch
This simplifies the libmagic patch:
- in upstream the HAVE_STRERROR check has been removed
- in upstream library the HAVE_SIGNAL_H has been removed
- indentations syncs with the upstream library
- some irrelevant changes removed from the patch (log comment), upstream
  has this correctly logged already so no need to patch the comment.

Closes GH-4298
2019-07-08 12:38:47 +02:00
Christoph M. Becker
338e1b245d Implement FR #77230: Support custom CFLAGS and LDFLAGS from environment
While it is already possible to *set* CFLAGS and LDFLAGS (actually all
variables) from the environment for `nmake` (by passing the `/E`
option), it is not possible to *add* any (C|LD)FLAGS, which can be
useful in some cases.  Instead of allowing this for `nmake`, we add
support for additional custom (C|LD)FLAGS to `configure`, similar to
how that works on Linux, so one could actually write:
````
set CFLAGS=foo & set LDFLAGS=bar & configure
````
This also allows us to use these flags during configure.
2019-07-08 10:46:51 +02:00
Christoph M. Becker
98b6330ab4 Fix TsHashTable related race conditions
Although TsHashTable and the according API are supposed to easily make
a HashTable thread-safe, they do not; for instance, there can be race
conditions between finding and updating entries.  We therefore avoid
the usage of TsHashTable in favor of a HashTable with our own mutex
management.

The patch has been provided by krakjoe@php.net; I only did some minor
fixes and tweaks.
2019-07-08 10:31:36 +02:00
Peter Kokot
a39ea91753 Simplify PHP_CHECK_PDO_INCLUDES calls
Conditional checks were once used for backwards compatibility with
phpize from PHP versions that didn't have this macro call yet.

Closes GH-4376
2019-07-08 10:24:41 +02:00
Dmitry Stogov
1305d9c0d2 Fixed opcode description 2019-07-08 11:20:46 +03:00
Peter Kokot
5ba69ab3ad Remove some unused variables
- Variables php_abs_top_srcdir php_abs_top_builddir are no longer used.
- ZEND_EXT_TYPE is always zend_extension and variable is no longer used.

Closes GH-4378
2019-07-08 10:18:17 +02:00
Sara Golemon
0ba1db7a4a Provide argon2i(d) password hashing from sodium when needed 2019-07-07 21:53:43 -04:00
Stanislav Malyshev
57e7c3aac1 Simplify expression and remove the possibility of div by 0
Maybe should use exp2() but not sure about how supported it is.
2019-07-07 16:16:05 -07:00
Peter Kokot
3bde4838f4 Remove PHP_DEBUG_MACRO
The macro is no longer used. The warning at the end of the configure
script therefore is also no longer used.
2019-07-07 12:15:36 +02:00
Peter Kokot
49cc2a63b3 Remove some more Apache 1 left overs
- warning in configure.ac is relevant for the sapi/apache
- errors output redirected to /dev/null when checking Apache version
2019-07-07 12:09:19 +02:00
Nikita Popov
7514b5d91c Mention that zend_parse_parameters should not be tested
Also mention that --CREDITS-- section should not be included
anymore. We should also change qa.php.net to stop advertising
these.

[ci skip]
2019-07-07 11:24:26 +02:00
Peter Kokot
539b577827 Move footer to the end of configure output 2019-07-06 01:00:24 +02:00
Peter Kokot
1c9e8e8f6a Remove PTHREADS_ASSIGN_VARS
This simplifies TSRM build steps a bit and avoids doing unnecessary
steps:
- The `PTHREADS_CHECK_COMPILE` can called inside the for loops only
  since this is only where the `$pthreads_checked` variable is used.
- Assigning variables can be then done only in the configure.ac
  once.
- use `m4_include()` instead of the `sinclude()` in the middle of
  the build steps.
- The `$threads_result` variable is not used in the code or in
  extensions.
2019-07-05 23:26:20 +02:00
Christoph M. Becker
30441e65dd Remove superfluous assignment 2019-07-05 15:56:26 +02:00
Dmitry Stogov
55f7d3b70a Eliminate useless checks 2019-07-05 14:21:18 +03:00
Christoph M. Becker
4e5a717866 Temporarily skip test
This test hangs on Windows for ~10 minutes as of commit 30019f4, so we
temporarily skip it.  The issue will be investigated by Joe and myself
in due course.
2019-07-05 12:48:10 +02:00
Nikita Popov
201673d1a6 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-05 12:07:45 +02:00
Nikita Popov
e3c701ea38 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-05 12:07:10 +02:00
Nikita Popov
5846e85283 Backport fe_reset_rw case 2019-07-05 12:06:52 +02:00
Nikita Popov
73fd2da754 Make sure all cases of fetch_dim_w adjustment are handled
Use EMPTY_SWITCH_DEFAULT_CASE() to trigger an assertion in case
we miss something.

Add missing FE_RESET_RW case.
2019-07-05 12:02:26 +02:00
Nikita Popov
1086198711 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-05 11:41:57 +02:00
Nikita Popov
920283ff2b Merge branch 'PHP-7.2' into PHP-7.3 2019-07-05 11:40:45 +02:00
Nikita Popov
c353f17d42 Fix inference for compound object op on dim 2019-07-05 11:39:42 +02:00
Nikita Popov
ea86a9209c Optimize integer in_array with strict=true
It doesn't make sense that using in_array with strict=false is
much faster for this case, due to lack of a specialized codepath.
2019-07-05 11:20:29 +02:00
Dmitry Stogov
48ca5a1e17 Replace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ZEND_ASSGIN_OBJ_OP and ZEND_ASSIGN_STATIC_PROP_OP 2019-07-05 12:03:25 +03:00
Nikita Popov
24ecfcc833 Add test
Forgot to commit this.
2019-07-05 11:00:27 +02:00
Nikita Popov
ea43624972 Fix wrong size calculation related to function name
It would be nice if we could drop this manual function name reuse
code altogether and rely on interning for it.
2019-07-05 10:46:41 +02:00
Nikita Popov
d3c4841b18 Preloading: Don't move conditional functions to back to scripts
Conditional function declaration may be referenced by functions or
classes that have been preloaded, so we should not move them back
to scripts.

What we probably should be doing though is to discard conditional
functions that are not used in the optimizer. This is probably
reasonably common for polyfills, where we will be able to const-eval
the conditions and drop the BBs declaring the functions, but won't
delete the function declarations themselves.
2019-07-05 10:46:41 +02:00
George Wang
6a403504e7 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-04 12:14:48 -04:00
George Wang
3ec8776940 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-04 12:04:08 -04:00