Commit Graph

117351 Commits

Author SHA1 Message Date
Nikita Popov
d2cb200e10 Enable formatting of phpt files in tidy.php 2020-02-03 22:52:04 +01:00
Máté Kocsis
9942f45b7a
Fix indentation/trailing whitespaces of 32-bit tests 2020-02-03 16:50:59 +01:00
Máté Kocsis
0253a232c3
Fix indentation/trailing whitespaces of tests 2020-02-03 15:04:02 +01:00
Nikita Popov
169805777c Merge branch 'PHP-7.4'
* PHP-7.4:
  Apply tidy formatting
2020-02-03 13:42:08 +01:00
Nikita Popov
58b17906f5 Apply tidy formatting
Mostly reindent PHP scripts to spaces.
2020-02-03 13:41:31 +01:00
Nikita Popov
6b38251820 Add bundled jit libraries to exclude list 2020-02-03 13:41:09 +01:00
Nikita Popov
fc2663abef Merge branch 'PHP-7.4'
* PHP-7.4:
  Add tidy.php to enforce formatting
2020-02-03 13:35:49 +01:00
Nikita Popov
4fd6318580 Add tidy.php to enforce formatting
Many parts are disabled for the PHP-7.4 branch. We only strip
trailing whitespace in C files and reindent .php files to spaces.
2020-02-03 13:34:42 +01:00
Christoph M. Becker
d601b123e7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Relax test expectation
2020-02-03 13:05:54 +01:00
Christoph M. Becker
42e67881c9 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Relax test expectation
2020-02-03 13:05:09 +01:00
Christoph M. Becker
b93e4aa11c Relax test expectation
Since we're dealing with floating point numbers, precision issues may
hit us, and actually it's not necessary to check for the exact number
anyway, because it is not exact in the first place.  Therefore, we
relax the test expectations.
2020-02-03 13:03:54 +01:00
Christoph M. Becker
aba6937c0a Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79212: NumberFormatter::format() may detect wrong type
2020-02-03 12:30:42 +01:00
Christoph M. Becker
57b9eca83d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79212: NumberFormatter::format() may detect wrong type
2020-02-03 12:29:43 +01:00
Christoph M. Becker
c2935499b1 Fix #79212: NumberFormatter::format() may detect wrong type
We have to convert to number *before* detecting the type, to cater to
internal objects implementing `cast_object`.

We also get rid of the fallback behavior of using `FORMAT_TYPE_INT32`,
because that can no longer happen; after `convert_scalar_to_number_ex`
the type is either `IS_LONG` or `IS_DOUBLE`.  We cater explicitly to
the `IS_ARRAY` case what also avoids triggering a type confusion when
`::TYPE_INT64` is passed as `$type`.
2020-02-03 12:28:32 +01:00
Remi Collet
c2a61c9d06 zip ext is now 1.17.1 2020-02-03 11:37:20 +01:00
Derick Rethans
d6b04bfbd5 Export zend_type_to_string() with ZEND_API 2020-02-03 10:26:20 +00:00
Remi Collet
4d80c3b7e0 Merge branch 'PHP-7.4'
* PHP-7.4:
  add test
  NEWS
  Fixed bug #73119 Wrong return for ZipArchive::addEmptyDir Method
2020-02-03 10:24:57 +01:00
Remi Collet
7fc06635c4 add test 2020-02-03 10:24:45 +01:00
Remi Collet
846e52bd45 NEWS 2020-02-03 10:10:17 +01:00
Remi Collet
3c274613dc Fixed bug #73119 Wrong return for ZipArchive::addEmptyDir Method 2020-02-03 10:10:17 +01:00
Remi Collet
5eb9cffa14 Merge branch 'PHP-7.4'
* PHP-7.4:
  NEWS
  Fixed bug #73119 Wrong return for ZipArchive::addEmptyDir Method
2020-02-03 10:09:27 +01:00
Remi Collet
3375cfe0cf NEWS 2020-02-03 10:09:12 +01:00
Nikita Popov
98a8ab1389 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add WHITESPACE_SENSITIVE run-tests section
2020-02-03 10:08:20 +01:00
Nikita Popov
27fb0b28dd Add WHITESPACE_SENSITIVE run-tests section
This is used to indicate that the test should not be changed by
automated formatting changes.
2020-02-03 10:08:15 +01:00
Remi Collet
0bc19a4b81 Fixed bug #73119 Wrong return for ZipArchive::addEmptyDir Method 2020-02-03 10:08:09 +01:00
Nikita Popov
4cdd15d414 Merge branch 'PHP-7.4'
* PHP-7.4:
  Disable parallelism for FPM tests
2020-02-03 09:58:03 +01:00
Nikita Popov
aaf9cbb7eb Disable parallelism for FPM tests
Let's see if this helps with spurious failures on Azure.
2020-02-03 09:57:34 +01:00
Máté Kocsis
2015c7a48e
Fix another batch of indentation in tests 2020-02-02 23:33:40 +01:00
Akim Demaille
4cbffd89d9
Clean up the generation of the parsers
Prefer '%define api.value.type' to '#define YYSTYPE', so that Bison
know the type.

Use '%code requires' to declare what is needed to define the api.value.type
(that code is output in the generated header before the generated
definition of YYSTYPE).

Prefer '%define api.prefix' inside the grammar file to '-p' outside,
as anyway the functions defined in the file actually use this prefix.

Prefer `%param` to both `%parse-param` and `%lex-param`.

Closes GH-5138
2020-02-01 14:21:53 +01:00
Akim Demaille
2127a37b83
Bison: enable all the warnings and fix them
First, fix 5547d36120: the definition of
YFLAGS was not passed into the Makefile: AC_SUBST does not suffice, we
need PHP_SUBST_OLD.  While at it, allow to pass variable and value at
the same time.

Then pass -Wall to bison, rather than only -Wempty-rules.

Use %precedence where associativity is useless.

Remove useless %precedence.
GH-5138
2020-02-01 14:21:21 +01:00
Pieter Hordijk
b97c9dc72a
Added opcache extension to inis
Extensions are not loaded by default (commented out)

Closes GH-5136
2020-02-01 07:15:18 +01:00
Máté Kocsis
19222b8581
Fix var_dump test 2020-01-31 18:36:43 +01:00
Máté Kocsis
8b36be268d
Fix indentation and whitespaces in tests
In preparation for GH-5074
2020-01-31 17:47:14 +01:00
Sebastian Pop
ee87e86d0a inline by hand to avoid uninitialized variable warning
When compiling with "-Wall -Werror" gcc emits two errors:

../src/pcre2_jit_neon_inc.h:211:8: error: ‘cmp1b’ is used uninitialized in this function [-Werror=uninitialized]
  211 | data = fast_forward_char_pair_compare(compare1_type, data, cmp1a, cmp1b);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/pcre2_jit_neon_inc.h:212:9: error: ‘cmp2b’ is used uninitialized in this function [-Werror=uninitialized]
  212 | data2 = fast_forward_char_pair_compare(compare2_type, data2, cmp2a, cmp2b);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The compiler emits the error message before inlining.
Because the warning is based on an intra-procedural data
flow analysis, the compiler does not see that cmp1b and
cmp2b are not used when they are not initialized.

Here is the code of that function, cmp2 is only used
when ctype is compare_match2 or compare_match1i,
and not when ctype is compare_match1:

static inline vect_t fast_forward_char_pair_compare(compare_type ctype, vect_t dst, vect_t cmp1, vect_t cmp2)
{
if (ctype == compare_match2)
 {
 vect_t tmp = dst;
 dst = VCEQQ(dst, cmp1);
 tmp = VCEQQ(tmp, cmp2);
 dst = VORRQ(dst, tmp);
 return dst;
 }

if (ctype == compare_match1i)
  dst = VORRQ(dst, cmp2);
dst = VCEQQ(dst, cmp1);
return dst;
}

The patch inlines by hand the case of compare_match1 such that the
code avoids referring to cmp1b and cmp2b.

Tested on aarch64-linux with `make check`.
2020-01-31 14:56:51 +01:00
Dmitry Stogov
2b279b428f We don't need "safe" destruction anymore 2020-01-31 16:01:09 +03:00
Dmitry Stogov
6b862e82d9 These EG(current_execute_data) = EX(prev_execute_data) assignments are useless now 2020-01-31 14:50:41 +03:00
Dmitry Stogov
08d2d9257d Export zend_dump_op() and add ZEND_DUMP_NUMERIC_OPLINES flag to print oplines as "dddd" instead of "Ld+" 2020-01-31 13:27:35 +03:00
Nikita Popov
d8a1e3dab0 Fix JIT as well 2020-01-31 10:35:46 +01:00
Nikita Popov
ec0ce49f5c Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug #76047
2020-01-31 10:30:09 +01:00
Nikita Popov
d422478f6d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #76047
2020-01-31 10:29:45 +01:00
Nikita Popov
ef1e4891b4 Fix bug #76047
Unlink the current stack frame before freeing CVs or extra args.
This means it will no longer show up in back traces that are
generated during CV destruction.

We already did this prior to destructing the object/closure,
presumably for the same reason.
2020-01-31 10:26:40 +01:00
Akim Demaille
37d0f7d3b3
Use "%empty" in the parsers, instead of comments
The annotation %empty is properly enforced: warnings when it's
missing, and errors when it's inappropriate.  Support for %empty was
introduced in Bison 3.0.

Pass -Wempty-rule to Bison.

Closes GH-5134
2020-01-31 09:52:40 +01:00
Remi Collet
b915d68852 Zip: version is now 1.17.0
change for Windows (which have libzip 1.4 by default)
update NEWS
2020-01-31 09:10:10 +01:00
Remi Collet
3af1cee884 add ZipArchive::registerProgressCallback and ZipArchive::registerCancelCallback methods 2020-01-31 09:06:42 +01:00
Dmitry Stogov
7e7a85e881 Fixed JIT part for bug #79094 2020-01-31 10:39:22 +03:00
Dmitry Stogov
7ebf1d44ed Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79094 (Crashing when running recursion function)
2020-01-31 10:34:28 +03:00
Dmitry Stogov
db7193f31e Fixed bug #79094 (Crashing when running recursion function) 2020-01-31 10:34:04 +03:00
Benjamin Eberlei
176ec97a16 Add NEWS entry for new ReflectionProperty methods. 2020-01-30 17:48:20 +01:00
Máté Kocsis
5bf6aedae4
Promote mysqli warnings to exceptions
Closes GH-5058
2020-01-30 17:05:07 +01:00
Nikita Popov
453713868f Revert "Make BG(syslog_device) per request"
This reverts commit b0d7b126a2.

This change wasn't quite right: I noticed only now that the
RSHUTDOWN function is #ifdef PHP_WIN32 and I'm not fully convinced
that ifdef can be removed: syslog might also be used by error
logging in FPM for example, in which case we probably shouldn't
be closing the log here.

Generally it's unclear how the openlog() functionality exposed
by PHP is supposed to interact with openlog() uses by SAPIs.

For now I'll just revert this change and let it leak across
requests.
2020-01-30 16:18:02 +01:00