History log of /php-src/Zend/zend_gc.c (Results 26 – 50 of 238)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: 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, php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16, php-8.0.3RC1, php-7.4.16RC1, php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1, php-8.0.1, php-7.4.14, 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, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, 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, php-7.4.7RC1, php-7.3.19RC1
# b58d7454 15-May-2020 Nikita Popov

Rerun GC if destructors encountered

Since PHP 7.4 objects that have a destructor require two GC runs
to be collected. Currently the collection is delayed to the next
automatic GC run

Rerun GC if destructors encountered

Since PHP 7.4 objects that have a destructor require two GC runs
to be collected. Currently the collection is delayed to the next
automatic GC run. However, in some cases this may result in a large
increase in memory usage, as in one of the cases of bug #79519.

See also bug #78933 and bug #81117 where the current behavior is
unexpected for users.

This patch will automatically rerun GC if destructors were encountered.
I think this should not have much cost, because it is very likely that
objects on which the destructor has been called really are garbage,
so the extra GC run should not be doing wasted work.

Closes GH-5581.

show more ...

# 0643301c 09-Jun-2021 Nikita Popov

Don't perform recursive get_gc call

On further consideration, we should be making use of the fact
that zend_object_iterator is also a zend_object here, and let
GC handle the get_gc c

Don't perform recursive get_gc call

On further consideration, we should be making use of the fact
that zend_object_iterator is also a zend_object here, and let
GC handle the get_gc call on it. Calling get_gc recursively like
this is generally not safe, because there is only one gc_buffer.

This also happens to be much simpler...

show more ...

# 15fafcd6 08-Jun-2021 Nikita Popov

Expose inner dual_it iterator to GC

Moving the zend_iterator_dtor from dual_it_dtor to dual_it_free_storage
exposed this GC leak in an existing test. Forward the result of the
iterat

Expose inner dual_it iterator to GC

Moving the zend_iterator_dtor from dual_it_dtor to dual_it_free_storage
exposed this GC leak in an existing test. Forward the result of the
iterator get_gc to the dual_it get_gc.

show more ...

# c40231af 12-May-2021 George Peter Banyard

Mark various functions with void arguments.

This fixes a bunch of [-Wstrict-prototypes] warning,
because in C func() and func(void) have different semantics.

# 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 ...

# 9fc11762 11-Jan-2021 Dmitry Stogov

PHP array cannot refer to EG(symbol_table) any more. Replace corresponding checks by ZEND_ASSERT().

# 0fb2374e 23-Oct-2020 Nikita Popov

Make GC default threshold handling consistent

While the initial threshold is set to 10001 roots, the threshold
adjustment logic may then set it to 10000. The exact value really
doesn

Make GC default threshold handling consistent

While the initial threshold is set to 10001 roots, the threshold
adjustment logic may then set it to 10000. The exact value really
doesn't matter, but we should make it consistent.

show more ...

# bb3d4456 15-Jun-2020 Dmitry Stogov

Change GC_COLLECTABLE flag into GC_NOT_COLLECTABLE to simplify GC_MAY_LEAK() check

# 50c87e92 12-Jun-2020 Nikita Popov

Use GC stack in nested data removal

We should be doing this anyway to prevent stack overflow, but on
master this is important for an additional reason: The temporary
GC buffer provid

Use GC stack in nested data removal

We should be doing this anyway to prevent stack overflow, but on
master this is important for an additional reason: The temporary
GC buffer provided for get_gc handlers may get reused if the scan
is performed recursively instead of indirected via the GC stack.

This fixes oss-fuzz #23350.

show more ...

# 4a7ec516 12-Jun-2020 Nikita Popov

Move label to correct position

# 0949214a 12-Jun-2020 Nikita Popov

Fix null pointer UB in GC

This is just plain stupid: In C, it is not permitted to add zero
to a null pointer. In C++, it is permitted.

# 1b85e749 06-Jun-2020 twosee

Fix warning of strict-prototypes

Closes GH-5673.

Revision tags: php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1
# 48a34bc1 24-Apr-2020 Nikita Popov

Add helper APIs for get_gc implementations

get_gc() implementations that need to explore heterogeneous data
currently work by computing how many GC entries they need,
allocating a bu

Add helper APIs for get_gc implementations

get_gc() implementations that need to explore heterogeneous data
currently work by computing how many GC entries they need,
allocating a buffer for that and storing it on the object. This
is inefficient and wastes memory, because the buffer is retained
after the GC run.

This commit adds an API for a single global GC buffer, which can
be reused by get_gc implementations (as only one get_gc call is
ever active at the same time). The GC buffer will automatically
grow during the GC run and be discarded at the end.

show more ...

Revision tags: 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, 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
# 500ba8b2 20-Nov-2019 Tyson Andre

Handle reallocated root buffer during GC destroy phase (v2)

We no longer protect GC during the destroy phase, so we need to
deal with buffer reallocation.

Note that the implemen

Handle reallocated root buffer during GC destroy phase (v2)

We no longer protect GC during the destroy phase, so we need to
deal with buffer reallocation.

Note that the implementation of spl_SplObjectStorage_free_storage
will call the destructor of SplObjectStorage, and free the instance properties,
which I think is what caused the root buffer to be reallocated.
(`current` is a pointer for an index within the root buffer?)

This fixes bug #78811 for me.

Closes GH-4935

show more ...

Revision tags: php-7.3.12
# 9899fdc4 15-Nov-2019 Nikita Popov

Merge branch 'PHP-7.4'

* PHP-7.4:
Handle reallocated root buffer during GC destroy phase
Zend Engine version is no longer in -dev


# 3f4a1511 15-Nov-2019 Nikita Popov

Handle reallocated root buffer during GC destroy phase

We no longer protect GC during the destroy phase, so we need to
deal with buffer reallocation.

Possible fix for bug #78811.

Revision tags: php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, 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, php-7.2.23
# 3b52307c 24-Sep-2019 Nikita Popov

Merge branch 'PHP-7.4'


Revision tags: php-7.3.10
# 73115ef8 23-Sep-2019 Nikita Popov

Fixed bug #78589

Don't protect GC while destroying zvals. We may need to add GC
roots during this phase.

Revision tags: 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
# 38c2230d 26-Aug-2019 Nikita Popov

Merge branch 'PHP-7.4'


# fa8565a0 26-Aug-2019 Nikita Popov

Merge branch 'PHP-7.3' into PHP-7.4


# 461db524 26-Aug-2019 Nikita Popov

Merge branch 'PHP-7.2' into PHP-7.3


# 589542f5 26-Aug-2019 Nikita Popov

Remove properties HT from nested GC data

The properties HT may be a GC root itself, so we need to remove it.
I'm not sure this issue actually applies to PHP 7.2, but committing
it th

Remove properties HT from nested GC data

The properties HT may be a GC root itself, so we need to remove it.
I'm not sure this issue actually applies to PHP 7.2, but committing
it there to be safe. As seen from the test case, the handling here
is rather buggy on 7.2.

show more ...

Revision tags: php-7.4.0beta4
# ded28e24 14-Aug-2019 Nikita Popov

Merge branch 'PHP-7.4'


# c238b5bb 14-Aug-2019 Nikita Popov

Fix reference printing in GC tracing

Revision tags: php-7.2.22RC1, php-7.3.9RC1
# 8c927442 13-Aug-2019 Nikita Popov

Merge branch 'PHP-7.4'


12345678910