1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 02:33:17 +02:00
Commit Graph

59676 Commits

Author SHA1 Message Date
Kamil Tekiela abacd91cc8 Merge branch 'PHP-8.0'
* PHP-8.0:
  Prevent mysqli::next_result from reporting errors from previous calls (#7304)
2021-07-27 11:57:39 +01:00
Kamil Tekiela 65e2dbd0de Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Prevent mysqli::next_result from reporting errors from previous calls (#7304)
2021-07-27 11:56:14 +01:00
Kamil Tekiela d26069a2f1 Prevent mysqli::next_result from reporting errors from previous calls (#7304) 2021-07-27 11:50:28 +01:00
Nikita Popov 8675380b67 Increment refcounts in mutable data copies
For mutable_data on preloaded classes, there may be refcounted
values in the constants/properties table.
2021-07-27 12:29:46 +02:00
Christoph M. Becker ccb6642c91 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #81294: Segfault when removing a filter
2021-07-27 12:17:07 +02:00
Christoph M. Becker bf9afc184f Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #81294: Segfault when removing a filter
2021-07-27 12:14:22 +02:00
Christoph M. Becker 1fa26eccba Fix #81294: Segfault when removing a filter
We need to call the proper method.

Closes GH-7308.
2021-07-27 12:12:02 +02:00
Nikita Popov 1bd6fafa2f Fix preloading of trait property attributes 2021-07-27 12:07:22 +02:00
Nikita Popov 5a7e1a7aa8 Don't use IMMUTABLE flag to decide whether mutable_data is used
mutable_data may be used for IMMUTABLE classes, internal classes
and to-be-preloaded classes. Check whether the mutable_data
map_ptr is set rather than only the IMMUTABLE flag.
2021-07-27 11:44:01 +02:00
Nikita Popov b35418402f Allocate map_ptr for mutable_data during preloading
We need to discard objects in the class constants if they happened
to be evaluated during preloading. To allow doing so, we need to
use mutable_data, which will place the evaluated constants into
a separate table.
2021-07-27 11:16:38 +02:00
Nikita Popov c1959e63e5 Fix preloading of enums
We should not store constants that resolve to objects.
2021-07-27 11:01:44 +02:00
Nikita Popov 703e92c121 Don't force constant resolution for include preloading
Same as with property types, we no longer require that all constants
are resolved for preloading to work, it's just an optimization. As
such, drop the forced resolution for include-based preloading and
just keep the optimization.
2021-07-27 10:50:31 +02:00
Nikita Popov 70195c3561 Don't force property type resolution for include preloading
Having all property types resolved is no longer a hard requirement
for preloading, resolving the types is just an optimization. As
such, drop the special logic that forced loading of property
types when include-based preloading is used. Instead only keep
the code that resolves types based on actually preloaded classes.

Also drop the ZEND_ACC_PROPERTY_TYPES_RESOLVED flag, which is now
nearly useless and takes up flag space...
2021-07-27 10:36:21 +02:00
Máté Kocsis 663536d7d9 Improve class inheritance error messages (#7307) 2021-07-27 09:42:37 +02:00
Nikita Popov a374230c15 Add support for internal enums
This adds support for internal enums with the same basic approach
as userland enums. Enum values are stored as CONSTANT_AST and
objects created during constant updating at runtime. This means
that we need to use mutable_data for internal enums.

This just adds basic support and APIs, it does not include the
stubs integration from #7212.

Closes GH-7302.
2021-07-27 09:19:14 +02:00
Máté Kocsis 8d25b62414 Display the readonly property modifier when printing reflection info 2021-07-25 12:13:48 +02:00
Christoph M. Becker f5ee3429db Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #81283: shmop can't read beyond 2147483647 bytes
2021-07-23 17:51:15 +02:00
Christoph M. Becker 71879d385e Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #81283: shmop can't read beyond 2147483647 bytes
2021-07-23 17:49:56 +02:00
Christoph M. Becker 387c0de983 Fix #81283: shmop can't read beyond 2147483647 bytes
`start`, `count` and `shmop->size` are `zend_long`, so we must not
restrict to `INT_MAX`.

Closes GH-7301.
2021-07-23 17:46:42 +02:00
Nikita Popov 338a47bb85 Fix bug #63327
Use ZEND_MM_ALIGNED_SIZE for the extra size information.
I don't have a relevant system to test, but this should fix the
issue as long as required alignment is detected correctly.
2021-07-23 10:29:44 +02:00
Nikita Popov 5ac55af5e5 Add test for bug #80564
This has also been fixed by 3eb97a4566.
2021-07-23 09:45:39 +02:00
Nikita Popov 3eb97a4566 Always use separate static_members_table
When running without opcache, static_members_table is shared with
default_static_members_table. This is visible in reflection output,
because ReflectionProperty::getDefaultValue() will return the
current value, rather than the default value.

Address this by never sharing the table, which matches the behavior
we already see under opcache.

Fixes bug #80821.

Closes GH-7299.
2021-07-23 09:29:32 +02:00
Máté Kocsis 87c181a0b0 Fix oci8.old_oci_close_semantics deprecation is always displayed 2021-07-22 16:21:46 +02:00
Dmitry Stogov e1f211f7bb Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed typo
2021-07-22 16:15:44 +03:00
Dmitry Stogov 8fbeebec34 Fixed typo 2021-07-22 16:14:26 +03:00
Dmitry Stogov 9c2b87c3cf JIT: avoid $this check in closures called from methods 2021-07-22 16:05:43 +03:00
Máté Kocsis fc56de113c Add support for generating readonly properties via stubs (#7297) 2021-07-22 11:09:10 +02:00
Nikita Popov 8a26cbe0dd Remove unnecessary PDORow get_method / get_class_name handlers
These implement the default behavior, but badly.
2021-07-22 10:40:10 +02:00
Nikita Popov a5ad9eeefa Add explicit IntlPartsIterator::getRuleStatus() method
Rather than doing a magic forward, explicitly add a forwarding
method. This must be the most frivolous use of get_method I've
ever seen.
2021-07-22 10:33:49 +02:00
Andy Postnikov bb9ef2bedb Backport libgd commit
Source - https://github.com/libgd/libgd/commit/f6a111c632fcf76dd3a42d750f18d2ed7bf8a5f1
Related to https://github.com/php/php-src/pull/5127#issuecomment-884032991
2021-07-22 09:57:41 +02:00
Nikita Popov 9e787d51b5 Fix typo
Did not have intl enabled in this build...
2021-07-22 09:47:45 +02:00
Nikita Popov 6d505d4445 Add RETURN/RETVAL_COPY_DEREF() macros
These were missing from the set...

I think quite a few of these usages don't actually need the DEREF,
but I've just kept things as is for now.
2021-07-22 09:44:19 +02:00
Máté Kocsis 23b1c4a982 Migrate to PHP-Parser 4.12.0 and regenerate some arginfos 2021-07-22 09:40:16 +02:00
Dmitry Stogov 713eec75f2 Merge branch 'PHP-8.0'
* PHP-8.0:
  Added test
2021-07-21 19:43:00 +03:00
Dmitry Stogov 17b5fe13e2 Added test 2021-07-21 19:29:59 +03:00
Dmitry Stogov 053c56f52e Fixed bug #81226 (Integer overflow behavior is different with JIT enabled) 2021-07-21 19:28:43 +03:00
Joe Watkins 848b5458d1 more fiber notifications (#7293) 2021-07-21 17:18:15 +02:00
Dmitry Stogov 9108ac678e Fixed test 2021-07-21 14:51:36 +03:00
Dmitry Stogov a3a74b07e5 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed Bug #80959 (infinite loop in building cfg during JIT compilation)
2021-07-21 14:34:04 +03:00
Dmitry Stogov a9991fbf28 Fixed Bug #80959 (infinite loop in building cfg during JIT compilation) 2021-07-21 14:32:44 +03:00
Nikita Popov 239446c5cf Merge branch 'PHP-8.0'
* PHP-8.0:
  dom_import_simplexml() cannot return null
2021-07-21 11:14:03 +02:00
Nikita Popov a0893865b3 dom_import_simplexml() cannot return null 2021-07-21 11:13:37 +02:00
Nikita Popov a3f5b11994 Sync JIT overloaded assign/inc/dec overloaded property
We should only release the read_property return value if
retval is used, same as in zend_execute.c. This fixes a test
failure under PROFITABILITY_CHECKS=0.
2021-07-21 10:45:02 +02:00
Nikita Popov a190c7fdb7 Sync JIT zend_check_string_offset()
Return after zend_jit_illegal_string_offset() to avoid a redundant
warning during conversion.

This fixes some tests under PROFITABILITY_CHECKS=0.
2021-07-21 10:32:45 +02:00
Nikita Popov 1602db2d3f Fix return type of DOMNodeList::item()
It can also return DOMNameSpaceNode :(
2021-07-21 09:56:35 +02:00
Levi Morrison ae8647d9d3 Remove leading underscore for _zend_hash_find_known_hash (#7260)
Convert zend_hash_find_ex(..., 1) to zend_hash_find_known_hash(...)
Convert zend_hash_find_ex(..., 0) to zend_hash_find(...)

Also add serializable changes to UPGRADING.INTERNALS summary
2021-07-20 17:07:17 -06:00
Dmitry Stogov c22a4d76d5 Fixed test 2021-07-20 22:21:10 +03:00
Dmitry Stogov 4cf7a25856 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed Bug #81255 (Memory leak in PHPUnit with functional JIT)
2021-07-20 22:17:41 +03:00
Dmitry Stogov 02acc5ad3b Fixed Bug #81255 (Memory leak in PHPUnit with functional JIT) 2021-07-20 22:14:32 +03:00
Christoph M. Becker 520a8e002a Skip new preload test on Windows 2021-07-20 16:32:24 +02:00