1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 19:41:05 +02:00
Commit Graph

55692 Commits

Author SHA1 Message Date
Christoph M. Becker
ae7554270f Fix #79805: sapi_windows_vt100_support throws TypeError
It does not make sense to throw a `TypeError` when the stream can't be
analyzed.  If `sapi_windows_vt100_support()` is used as getter, we just
return `false` in that case; if the function is used as setter, we
additionally trigger a warning.

We also fix the test cases for this function, which have been broken
before.  Note that these tests are still whitespace sensitive.
2020-07-16 18:36:02 +02:00
Christoph M. Becker
4659c12ae0 Fix #79846: 8c67c16699 broke simple regexp
We backport the respective upstream fix[1].

[1] <https://vcs.pcre.org/pcre2?view=revision&revision=1267>
2020-07-16 18:32:26 +02:00
Dmitry Stogov
03a98d9420 cleanup 2020-07-16 17:09:14 +03:00
Christoph M. Becker
7e357f470d Merge branch 'PHP-7.4'
* PHP-7.4:
  Enable further tests on Windows
2020-07-16 16:08:07 +02:00
Christoph M. Becker
c1b5e7a9ab Enable further tests on Windows 2020-07-16 16:07:23 +02:00
Dmitry Stogov
d50919a03b Check type guard on result of FETCH_OBJ_R/IS instructions 2020-07-16 15:14:11 +03:00
Dmitry Stogov
ebb94af754 Fixed tracing JIT for ASSIGN to typed reference 2020-07-16 00:19:00 +03:00
Christoph M. Becker
371e29ef3a Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix tests regarding negative fileinode()
2020-07-15 16:39:54 +02:00
Christoph M. Becker
dd1d1191e1 Fix tests regarding negative fileinode()
The results of `fileinode()` may be negative due to wrap-around
behavior (at least on Windows as of PHP 7.4.0).
2020-07-15 16:38:38 +02:00
Dmitry Stogov
f74e9a4dd3 Check type guard on result of FETCH_DIM_R/IS instructions 2020-07-15 17:28:46 +03:00
Nikita Popov
1c0ee68b83 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug #78008: dns_check_record() always return true on Alpine
2020-07-15 15:10:50 +02:00
Nikita Popov
2053329b1a Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #78008: dns_check_record() always return true on Alpine
2020-07-15 15:10:40 +02:00
Andy Postnikov
2c57378bd3 Fix bug #78008: dns_check_record() always return true on Alpine
- free handle before return result
- cleaned up remaining usage of MAXPACKET
- update dns_get_mx() to use the same approach

Closes GH-5854.
2020-07-15 15:10:19 +02:00
Nikita Popov
9a1a94e9b9 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79820
2020-07-15 10:59:32 +02:00
Christopher Broadbent
ee7c7a8e26 Fixed bug #79820
Similar to what is done for ReflectionType itself, copy the
type name stored inside ReflectionProperty. Also make sure the
type field is always initialized for dynamic properties.

This is a non-issue in PHP 8, because we store a pointer to the
property_info there, rather than a copy.
2020-07-15 10:58:56 +02:00
Nikita Popov
27800441b5 Reduce scope of preload compiler_options
Only set preloading compiler_options while executing the preload
file, not when performing linking afterwards. Otherwise options
like IGNORE_INTERNAL_CLASSES will hide classes from inheritance
verification.
2020-07-14 16:10:04 +02:00
Nikita Popov
b702ad14c9 Fix preloading of union typed property inherited from internal class
Tricky edge case: We inherit a property from an internal class,
in which case no property duplication takes place. We should not
try to persist the property info in that case. This didn't really
matter previously, but now that the property has some non-interned
owned data (the type), we need to make sure we don't try to free
that.
2020-07-14 15:24:58 +02:00
Nikita Popov
7e6b2e2e23 Check for name vs ce in a few more places
The type lists may contain CEs, we should not assume they only
contain names.
2020-07-14 14:47:47 +02:00
Dmitry Stogov
7c16d11e3c Tracing JIT for SWITCH instructions 2020-07-14 15:15:08 +03:00
Dmitry Stogov
ddba2a705e Better support for 64-bit .aword constants 2020-07-14 15:14:21 +03:00
Nikita Popov
06162194d6 Fix preloading property type resolution
This was causing many failures under --preload...
2020-07-14 12:59:04 +02:00
Nikita Popov
f855b59994 Merge remote-tracking branch 'upstream/PHP-7.4' into PHP-7.4
* upstream/PHP-7.4:
  Fix test for x86 Windows
2020-07-14 12:43:58 +02:00
Nikita Popov
745bc4c2ea Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79849
2020-07-14 12:43:03 +02:00
Nikita Popov
162776a132 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79849
2020-07-14 12:42:46 +02:00
Evgeny Stepanischev
ce149b0cb8 Fixed bug #79849
Closes GH-5853.
2020-07-14 12:41:43 +02:00
Nikita Popov
70501b81a7 Fixed bug #79852 2020-07-14 12:31:06 +02:00
Nikita Popov
8c89f23c45 Use different scratch register
r1 clashes with FCARG1a on Windows, so use a different scratch
register. FCARG2a should be free here. Hopefully fixes the
AppVeyor build.
2020-07-14 10:52:50 +02:00
Martin Schröder
547d98b81d Support socketpairs in proc_open()
Closes GH-5777.
2020-07-14 10:35:45 +02:00
Christoph M. Becker
1a00d015be Remove out-dated comment
ZTS support has been added around ~7.2.
2020-07-13 19:14:59 +02:00
Christoph M. Becker
11a628d96c Fix typos 2020-07-13 19:13:45 +02:00
Nikita Popov
e59efb3740 Put debug function behind ifdef 2020-07-13 17:24:31 +02:00
Nikita Popov
2d98f0cad2 Restore warning 2020-07-13 14:40:19 +02:00
Dmitry Stogov
48963378c1 Improved reference-counting inference 2020-07-13 13:08:32 +03:00
Rowan Tommins
55a15f32ce Improve output of tokens in Parse Errors
Currently, unexpected tokens in the parser are shown as the text
found, plus the internal token name, including the notorious
"unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM)".

This commit replaces that with a more user-friendly format, with
two main types of token:

* Tokens which always represent the same text are shown like
  'unexpected token "::"' and 'expected "::"'
* Tokens which have variable text are given a user-friendly
  name, and show like 'unexpected identifier "foo"', and
  'expected identifer'.

A few tokens have special cases:

* unexpected token """ -> unexpected double-quote mark
* unexpected quoted string "'foo'" -> unexpected single-quoted
  string "foo"
* unexpected quoted string ""foo"" -> unexpected double-quoted
  string "foo"
* unexpected illegal character "_" -> unexpected character 0xNN
  (where _ is almost certainly a control character, and NN is the
   hexadecimal value of the byte)

The \ token has a special case in the implementation just to stop
bison making a mess of escaping it and it coming out as \\
2020-07-13 11:07:40 +02:00
Dmitry Stogov
d4fdf79add JIT for array merging 2020-07-13 12:04:08 +03:00
Nat Wyatt
6f48ccf51c Fix compilation errors when EXIF_DEBUG is defined
Fix warnings and error when compiling with EXIF_DEBUG defined.

Closes GH-5838.
2020-07-13 11:00:02 +02:00
Christoph M. Becker
99c78963c8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test for x86 Windows
2020-07-13 10:53:55 +02:00
Christoph M. Becker
e2c17cef4b Fix test for x86 Windows
`st_dev` deliberately overflows on such systems, cf.
<http://svn.php.net/viewvc?view=revision&revision=350100>.
2020-07-13 10:52:26 +02:00
Nikita Popov
1c5f0b8a16 Check for undef var in verify return jit 2020-07-13 10:05:39 +02:00
Christoph M. Becker
c9639cffdb Fix PDO_Firebird numeric to string conversion on Windows
Commit aaa1f90[1] dropped support for the `snprinf()` `I` modifier, so
we use the standard `ll` modifier which is suitable for 32bit and 64bit
Windows.  We also replace the deprecated `I64` suffix[2] with the `LL`
suffix.

This fixes ext/pdo_firebird/tests/bug_64037.phpt.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=aaa1f90e3f90c24098fa55a7b868fdca0b89ee25>
[2] <https://docs.microsoft.com/en-us/cpp/cpp/numeric-boolean-and-pointer-literals-cpp?view=vs-2019#integer-literals>
2020-07-12 23:52:22 +02:00
Christoph M. Becker
b6e70e14bd Fix PDO_Firebird tests which assume ERRMODE_SILENT
These have apparently been missed when PR 5388[1] had been merged.

[1] <https://github.com/php/php-src/pull/5388>
2020-07-12 18:15:56 +02:00
Christoph M. Becker
6c7b5c0760 Unbork tests for PDO_Firebird
PDO_Firebird raises a warning regarding the unknown SQL syntax, which
we have to silence to avoid run-tests.php to mark the test as borked.
2020-07-12 17:51:29 +02:00
Ilija Tovilo
1c967df5a0 Fix free of uninitialized memory in MATCH_ERROR
As suggested by Tyson Andre:
https://github.com/php/php-src/pull/5371#issuecomment-657081464

Also fix line number of unhandled match error

Closes GH-5841.
2020-07-12 13:33:36 +02:00
twosee
c0172aa2bd debug_zval_dump(): Don't skip recursion detection on first level
A complement to ae6f45ad45

Closes GH-5843.
2020-07-12 03:08:42 +08:00
Jens de Nies
11f4a5e563 Removed the "oci_internal_debug" function and its alias. Also deprecated the "ocifetchinto" function.
Closes GH-5810
2020-07-11 19:57:30 +02:00
Chuck Adams
f06a6b4697 (ffi) fix ifdefs for non-windows systems without long double
Closes GH-5840
2020-07-11 19:50:15 +02:00
Christoph M. Becker
340e2ead77 Export php_gd_libgdimageptr_from_zval_p()
Some extension may need to retrieve the `gdImagePtr` from an `GdImage`
object; thus, we export the respective function.  To not being forced
to include gd.h in php_gd.h, we use the opaque `struct gdImageStruct *`
as return type.

We also rename php_gd2.dll to php_gd.dll, since there's not really much
point in giving the DLL a version number, since there is no php_gd.dll
for years (if there ever has been).  Renaming, on the other hand,
matches the name on other systems (gd.so), and allows to actually use
`ADD_EXTENSION_DEP()`.
2020-07-11 19:33:20 +02:00
twosee
614b2191bd Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed BC break of php_debug_zval_dump
2020-07-11 18:32:18 +08:00
twosee
7a39e174aa Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed BC break of php_debug_zval_dump
2020-07-11 18:31:30 +08:00
twosee
f0b2c2cb98 Fixed BC break of php_debug_zval_dump
It introduced by fixing bug #79830
2020-07-11 18:30:28 +08:00