1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 18:22:42 +01:00
Commit Graph

54512 Commits

Author SHA1 Message Date
Máté Kocsis
fe88d23914 Fix ZPP of SplFileInfo::openFile() 2020-03-23 13:37:51 +01:00
Máté Kocsis
66fc55642c Add stubs for SplFileInfo et al.
Closes GH-5287
2020-03-23 13:36:17 +01:00
Nikita Popov
e9c2dec720 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix RSA memory leak in mysqlnd auth
2020-03-23 12:01:15 +01:00
Nikita Popov
db08ef0d32 Fix RSA memory leak in mysqlnd auth 2020-03-23 11:55:22 +01:00
Nikita Popov
e88c7bf5c7 Fix signed integer overflow UB in dasm
Should hopefully fix the ubsan and community builds.
2020-03-23 11:12:42 +01:00
Nikita Popov
6766b5f9bc Fix pointer UB in dynasm
Looks like newer GCC versions started warning about this.
2020-03-23 11:03:56 +01:00
Nikita Popov
adb7297b0f Minor cleanup in spl_direcotry
* Rename variable for clarity
* Reduce section with replaced error handling
* Drop comment code line
2020-03-23 10:02:29 +01:00
ZoDream
28afaef6fa Repair ext_skel.php to create the basic framework for a PHP extension
Copy the arginfo stubs file, and drop the %EXTNAME%_ to make things line up.

Closes GH-5289.
2020-03-23 09:25:06 +01:00
Tyson Andre
26b9780d02 Fix compilation error on mac with -Wshift-negative-value
Fix for mac OS build error seen in ccc49ead68
when shifting -1 (max argument count?)

```
ext/opcache/jit/zend_jit_trace.c:1668:2:
error: shifting a negative signed value is undefined
[-Werror,-Wshift-negative-value]
        TRACE_FRAME_INIT(frame, op_array, 0, -1);
```

Closes GH-5284.
2020-03-23 09:24:26 +01:00
Tyson Andre
dcca0391e2 Skip ftruncate_bug76422 if disk_free_space() <= 4GB
Followup to https://github.com/php/php-src/pull/5043

In the middle of running this test with TESTS=-j9,
run-tests.php stopped the test suite because the partition started
with 3.5GB of free disk space and new test files couldn't be created.

Reclaiming the disk space of that file also took a while.

Closes GH-5283
2020-03-21 12:01:28 -04:00
Dmitry Stogov
4b8171e087 Add tracing JIT guards for INTI_FCALL_BY_NAME and INIT_NS_FCALL_BY_NAME 2020-03-20 16:59:02 +03:00
Remi Collet
d12b4c3c24 bump zip version 2020-03-20 14:08:57 +01:00
Dmitry Stogov
3715475381 JIT for INIT_NS_FCALL_BY_NAME 2020-03-20 15:36:40 +03:00
Remi Collet
57042ac23e add missing test 2020-03-20 12:13:25 +01:00
Remi Collet
db62ad18f3 fix test, thanks Indrek 2020-03-20 12:13:25 +01:00
Dmitry Stogov
166bc64caf CAST to the same type mat be JIT-ed as QM_ASSIGN 2020-03-20 13:31:55 +03:00
Remi Collet
a4d12f46d1 ZipArchive::open(): Using empty file as ZipArchive is deprecated 2020-03-20 11:27:42 +01:00
Remi Collet
217ff8132e Merge branch 'PHP-7.4'
* PHP-7.4:
  unneeded after fix
  NEWS
  NEWS
  Fix Bug #79296 ZipArchive::open fails on empty file
2020-03-20 11:19:04 +01:00
Remi Collet
347d18b48e unneeded after fix 2020-03-20 11:18:52 +01:00
Remi Collet
98687abb1d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  NEWS
  Fix Bug #79296 ZipArchive::open fails on empty file
2020-03-20 11:16:38 +01:00
Remi Collet
8aab43c85d Fix Bug #79296 ZipArchive::open fails on empty file 2020-03-20 11:14:58 +01:00
Dmitry Stogov
517c30b05f JIT for FETCH_THIS 2020-03-20 12:33:41 +03:00
Christoph M. Becker
825384c478 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix potential test conflict
2020-03-20 08:57:43 +01:00
Christoph M. Becker
9e6d80dc8f Fix potential test conflict
Cf. <https://ci.appveyor.com/project/php/php-src/builds/31564684/job/k9u3xv860fao3n2e#L5578>
2020-03-20 08:56:40 +01:00
Dmitry Stogov
ccc49ead68 Change jit_trace_stack_frame layout 2020-03-20 10:54:45 +03:00
Dmitry Stogov
7283dbba27 ZEND_MAKE_REF can't throw 2020-03-20 01:37:27 +03:00
Dmitry Stogov
9232af91fd JIT for STRLEN 2020-03-20 01:23:36 +03:00
Dmitry Stogov
3958d5bdc5 JIT for ECHO and variable string operands 2020-03-20 01:01:33 +03:00
Dmitry Stogov
282265bccd JIT for SEND_FUNC_ARG 2020-03-19 23:59:11 +03:00
Christoph M. Becker
8ea143a943 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79396: DateTime hour incorrect during DST jump forward
2020-03-19 08:53:46 +01:00
Christoph M. Becker
1d9e716a47 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79396: DateTime hour incorrect during DST jump forward
2020-03-19 08:51:55 +01:00
Nate Brunette
d70058a139 Fix #79396: DateTime hour incorrect during DST jump forward
When you attempt to set the time to a non-existent time occuring during
a DST jump forward, the hour does not move forward correctly.
2020-03-19 08:50:34 +01:00
Dmitry Stogov
8e879b9f44 JIT for ZEND_CHECK_FUNC_ARG 2020-03-18 23:56:03 +03:00
Máté Kocsis
bb6f374048 Improve argument error messages in ext/standard
Closes GH-5198
2020-03-18 19:56:10 +01:00
Dmitry Stogov
c2f1c36e30 Eliminate run-time check 2020-03-18 21:19:31 +03:00
Christoph M. Becker
ddf38fd764 Merge branch 'PHP-7.4'
* PHP-7.4:
  Improve FFI test suite for Windows
2020-03-18 17:01:30 +01:00
Christoph M. Becker
280485adc1 Improve FFI test suite for Windows
We add Windows support to four existing test cases, extract some useful
utility functions, and use them to simplify further test cases.

We also remove the Windows specific code from preload.inc, since
preloading isn't supported on Windows anyway.
2020-03-18 16:53:06 +01:00
Dmitry Stogov
12cdab2d76 Improved JIT for BIND_GLOBAL 2020-03-18 17:20:40 +03:00
Nikita Popov
df79277de3 Revert "Fetch for read in nested property assignments"
This reverts commit bb43a3822e.

After thinking about this a bit more, this is now going to be
a complete solution for the "readonly properties" case, for example:

    unset($foo->readOnly->bar);

should also be legal and

    $foo->readOnly['bar'] = 42;

should also be legal if $foo->readOnly is not an array but an
ArrayAccess object.

I think it may be better to distinguish better on the BP_VAR flag
level. Reverting for now.
2020-03-18 14:54:43 +01:00
Remi Collet
a5f136b855 bump zp to 1.18.1 + doc 2020-03-18 14:09:50 +01:00
Remi Collet
3b22e10535 Fix bug #77960 add compr. /encr. options for ZipArchive::addGlob and ZipArchive::addPattern
options parameter now accepts:
- comp_method
- comp_flags
- enc_method
- enc_password
2020-03-18 14:05:09 +01:00
Nikita Popov
bb43a3822e Fetch for read in nested property assignments
$a->b->c = 'd';

is now compiled the same way as

    $b = $a->b;
    $b->c = 'd';

That is, we perform a read fetch on $a->b, rather than a write
fetch.

This is possible, because PHP 8 removed auto-vivification support
for objects, so $a->b->c = 'd' may no longer modify $a->b proper
(i.e. not counting interior mutability of the object).

Closes GH-5250.
2020-03-18 12:08:06 +01:00
Nikita Popov
e957a8cd92 Merge branch 'PHP-7.4'
* PHP-7.4:
  Make bug52820.phpt more robust
  Explicitly start mysql
  Use "set -e" in some pipeline steps
2020-03-18 11:46:37 +01:00
Nikita Popov
ba6834fa57 Make bug52820.phpt more robust
Use a more robust error condition...
2020-03-18 11:46:27 +01:00
Nikita Popov
70ef2f3817 Use different scratch register in read_obj
We already use r0 to hold the zval.
2020-03-18 11:44:34 +01:00
Nikita Popov
69937870da Explicitly pass scratch register to SAVE_VALID_OPLINE 2020-03-18 11:44:25 +01:00
Dmitry Stogov
f767807986 Result of ASSIGN may be different from the assigned value when LHS is a typed reference 2020-03-18 01:40:41 +03:00
Dmitry Stogov
a8e8c40ad4 Use zend_fetch_arg_info_type() 2020-03-17 18:10:27 +03:00
Dmitry Stogov
29bef78e9f Use _const_op_type() for converting constant into type info 2020-03-17 17:55:34 +03:00
Nikita Popov
1ba6e66c46 Improve type inference
After thinking about this a bit more, the code here was too
conservative. We know that everything but an object is going to
throw, so it's sufficient to restrict the type to MAY_BE_OBJECT.

The change in the test is weird but not incorrect, because it
operates on empty inferred types, in which case the code must be
dead (which it is). We should probably add a more explicit removal
of code working on empty types.
2020-03-17 15:41:47 +01:00