History log of /php-src/Zend/zend_weakrefs.c (Results 26 – 50 of 52)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: php-7.4.25, php-8.0.12
# 86531745 19-Oct-2021 Nikita Popov

Fix nested WeakMap destruction

This undoes the change from a4b209fdcfe799ab97f55c4c9d22d889813fc266
and addresses the original problem by dropping the unrefs during
shutdown. All obj

Fix nested WeakMap destruction

This undoes the change from a4b209fdcfe799ab97f55c4c9d22d889813fc266
and addresses the original problem by dropping the unrefs during
shutdown. All objects should get unref'ed without that, and this
code path should only get hit for dangling references due to
bailout.

Alternatively we'd have to relax some assertions that check that the
object is part of the weakrefs table, which seems worse.

Fixes oss-fuzz #40090.

show more ...

Revision tags: php-8.1.0RC4
# a4b209fd 08-Oct-2021 Nikita Popov

Make weak ref notify robust against bailout

First drop it from EG(weakrefs), as the weakref_unref operation
may call a destructor, which may bail out.

Fixes oss-fuzz #39718.

Revision tags: php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22, php-8.1.0beta1
# 570d9b63 20-Jul-2021 Joe Watkins

Not serializable flag permeation

Revision tags: php-7.4.22RC1, php-8.0.9RC1
# e081db04 12-Jul-2021 Nikita Popov

Don't return embedded HT from WeakMap get_gc() handler

This HT is embedded in the WeakMap and as such musn't be freed by
GC (or otherwise participate in GC). Instead add the values
c

Don't return embedded HT from WeakMap get_gc() handler

This HT is embedded in the WeakMap and as such musn't be freed by
GC (or otherwise participate in GC). Instead add the values
contained in it to the GC buffer.

show more ...

Revision tags: php-8.1.0alpha3, php-7.4.21, php-7.3.29, php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1, php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1
# 84a843df 30-Mar-2021 Dmitry Stogov

Use better function

Revision tags: php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16, php-8.0.3RC1, php-7.4.16RC1
# 6ce70447 12-Feb-2021 Máté Kocsis

Generate zend class entries based on stubs

Closes GH-6685

Revision tags: php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1
# 3e01f5af 15-Jan-2021 Nikita Popov

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool

Replace zend_bool uses with bool

We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.

show more ...

Revision tags: php-8.0.1, php-7.4.14
# dfb9e033 02-Jan-2021 Tyson Andre

Use Z_PARAM_OBJ macros when zval isn't needed

In some cases, like spl_object_id, the code is simpler but equally efficient
after optimizations.

In other cases, like get_mangled_

Use Z_PARAM_OBJ macros when zval isn't needed

In some cases, like spl_object_id, the code is simpler but equally efficient
after optimizations.

In other cases, like get_mangled_object_vars(), the compiler can't infer that
the object in the zval won't change.

Closes GH-6567

show more ...

Revision tags: php-7.3.26, php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1, php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1
# 1071d857 07-Aug-2020 Sara Golemon

Flesh out HashTable insertion APIs

Fills out the array/object-property insert helpers for zend_array, zend_object, and zend_reference.

This adds the following matrix of 18 APIs

Flesh out HashTable insertion APIs

Fills out the array/object-property insert helpers for zend_array, zend_object, and zend_reference.

This adds the following matrix of 18 APIs
add_next_index_T()
add_index_T()
add_assoc_T()
add_assoc_T_ex()
add_property_T()
add_property_T_ex()

Where T in array, object, reference

Converted internal callsites currently doing an explicit object wrap.

show more ...

# fa8d9b11 28-Aug-2020 George Peter Banyard

Improve type declarations for Zend APIs

Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functio

Improve type declarations for Zend APIs

Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functions which return true/false (1/0)
Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics

Closes GH-6002

show more ...

# 614c0b84 27-Aug-2020 Nikita Popov

Allow removing non-existing key from WeakMap

In line with usual PHP semantics. This previously triggered an
assertion failure.

# 0026d8a7 27-Aug-2020 Nikita Popov

Fix use-after-free is WeakMap key and value are the same

Drop the object from the WeakMap as the last step, as this might
end up destroying the object.

Revision tags: php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21
# 6e92487f 22-Jul-2020 twosee

Fix warnings of strict-prototypes

Closes GH-5887.

Revision tags: php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20, php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19
# d30cd7d7 26-May-2020 Máté Kocsis

Review the usage of apostrophes in error messages

Closes GH-5590

# 312201dc 01-Jul-2020 Nikita Popov

Add get_gc handle for object iterators

Optional handler with the same semantics as the object handler.

Revision tags: php-7.4.7RC1, php-7.3.19RC1, php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17, php-7.4.5RC1, php-7.3.17RC1, php-7.3.18, php-7.4.4, php-7.2.29, php-7.3.16, php-7.4.4RC1, php-7.3.16RC1
# ff19ec2d 26-Feb-2020 Nikita Popov

Introduce InternalIterator

Userland classes that implement Traversable must do so either
through Iterator or IteratorAggregate. The same requirement does
not exist for internal class

Introduce InternalIterator

Userland classes that implement Traversable must do so either
through Iterator or IteratorAggregate. The same requirement does
not exist for internal classes: They can implement the internal
get_iterator mechanism, without exposing either the Iterator or
IteratorAggregate APIs. This makes them usable in get_iterator(),
but incompatible with any Iterator based APIs.

A lot of internal classes do this, because exposing the userland
APIs is simply a lot of work. This patch alleviates this issue by
providing a generic InternalIterator class, which acts as an
adapater between get_iterator and Iterator, and can be easily
used by many internal classes. At the same time, we extend the
requirement that Traversable implies Iterator or IteratorAggregate
to internal classes as well.

Closes GH-5216.

show more ...

# 653e4ea1 14-May-2020 Nikita Popov

Add flag to forbid dynamic property creation on internal classes

While performing resource -> object migrations, we're adding
defensive classes that are final, non-serializable and non-c

Add flag to forbid dynamic property creation on internal classes

While performing resource -> object migrations, we're adding
defensive classes that are final, non-serializable and non-clonable
(unless they are, of course). This path adds a ZEND_ACC_NO_DYNAMIC_PROPERTIES
flag, that also forbids the creation of dynamic properties on these objects.
This is a subset of #3931 and targeted at internal usage only
(though may be extended to userland at some point in the future).

It's already possible to achieve this (what the removed
WeakRef/WeakMap code does), but there's some caveats: First, this
simple approach is only possible if the class has no declared
properties, otherwise it's necessary to special-case those
properties. Second, it's easy to make it overly strict, e.g. by
forbidding isset($obj->prop) as well. And finally, it requires a
lot of boilerplate code for each class.

Closes GH-5572.

show more ...

# 15846ff1 17-Jun-2020 Nikita Popov

Add ZVAL_OBJ_COPY macro

For the common ZVAL_OBJ + GC_ADDREF pattern.
This mirrors the existing ZVAL_STR_COPY API.

# 33c3691c 25-Apr-2020 Máté Kocsis

Generate method entries from stubs for Zend classes

Closes GH-5459

Revision tags: php-7.4.3, php-7.2.28, php-7.3.15RC1, php-7.4.3RC1, php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14, php-7.3.14RC1, php-7.4.2RC1, php-7.4.1, php-7.2.26, php-7.3.13, php-7.4.1RC1, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1
# d8c99025 31-Oct-2019 Nikita Popov

Implement WeakMap

RFC: https://wiki.php.net/rfc/weak_maps

# 2204dbde 31-Oct-2019 Máté Kocsis

Add missing ZPP checks

Closes GH-4878.

# 2f8b7668 31-Oct-2019 Nikita Popov

Add stubs for WeakReference

Revision tags: php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3
# 5d6e923d 24-Sep-2019 Gabriel Caruso

Remove mention of PHP major version in Copyright headers

Closes GH-4732.

Revision tags: php-7.2.23, php-7.3.10, php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1, php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1, php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3, php-7.3.7, php-7.2.20, php-7.4.0alpha2, php-7.3.7RC3, php-7.3.7RC2, php-7.2.20RC2, php-7.4.0alpha1, php-7.3.7RC1, php-7.2.20RC1
# b4a3b49e 31-May-2019 Dmitry Stogov

Merge branch 'PHP-7.4'

* PHP-7.4:
Better hot/cold code splitting


# 1df9f238 31-May-2019 Dmitry Stogov

Better hot/cold code splitting

123