History log of /PHP-7.4/Zend/zend_alloc.c (Results 1 – 25 of 443)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1b3b5c94 30-May-2021 Peter van Dommelen

Fixed bug #81070

When the memory limit is reduced using an `ini_set("memory_limit", ..)`
below the currently allocated memory, the out-of-memory check overflowed.
Instead of implemen

Fixed bug #81070

When the memory limit is reduced using an `ini_set("memory_limit", ..)`
below the currently allocated memory, the out-of-memory check overflowed.
Instead of implementing additional checks during allocation,
`zend_set_memory_limit()` now validates the new memory limit. When
below the current memory usage the ini_set call will fail and throw
a warning.

This is part of GH-7040.

show more ...


# 600402d9 07-Apr-2021 fishmore <37470985+bigboysun@users.noreply.github.com>

Update zend_alloc.c

Don't free main thunk. It will crash.


# 45b4368d 27-Feb-2020 Dmitry Stogov

Fixed incorrect behavior of internal memory debugger


Revision tags: 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, php-7.4.0RC5
# af57b633 23-Oct-2019 Rasmus Lerdorf

Reverting push to wrong repo


# 5870efbc 23-Oct-2019 Rasmus Lerdorf

Update alloc patch


Revision tags: php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1
# abaf9a76 03-Oct-2019 Christoph M. Becker

Fix #78620: Out of memory error

The integer addition in `ZEND_MM_ALIGNED_SIZE_EX` can overflow, what we
have to catch early.


# f2fb37a7 02-Oct-2019 Christoph M. Becker

Revert "Fix #78620: Out of memory error"

This reverts commit 8ce04df7e0108a10f7b782a28204e9384ab1129c.

Cf. <https://github.com/php/php-src/pull/4766#discussion_r330658679>.


# 8ce04df7 02-Oct-2019 Christoph M. Becker

Fix #78620: Out of memory error

If the integer addition in `ZEND_MM_ALIGNED_SIZE_EX` overflows, the
macro evaluates to `0`, what we should catch early.


Revision tags: php-7.4.0RC3, 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
# ce25fa0d 27-Jul-2019 David Carlier

Monitoring anonymous pages on mac via vmmap tag


# 16d35eb6 26-Aug-2019 Nikita Popov

Fix overflow in memory limit checks

Due to overflows in the memory limit checks, we were missing cases
where the allocation size was close to the address space size, and
caused an OO

Fix overflow in memory limit checks

Due to overflows in the memory limit checks, we were missing cases
where the allocation size was close to the address space size, and
caused an OOM condition rather than a memory limit error.

show more ...


Revision tags: php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3, php-7.3.7, php-7.2.20
# 70fa4715 28-Jun-2019 Nikita Popov

Fix custom heap free

This seems to be designed around the use-case where the custom
allocator is a wrapper around ZMM.


# cfeda978 27-Jun-2019 Nikita Popov

Add tracked allocator mode

In this case we will use the system allocator, but still remember
all allocations and free them the same way that Zend MM does. This
allows us to accuratel

Add tracked allocator mode

In this case we will use the system allocator, but still remember
all allocations and free them the same way that Zend MM does. This
allows us to accurately model leak behavior.

Enabled using USE_ZEND_ALLOC=0 USE_TRACKED_ALLOC=1.

show more ...


Revision tags: php-7.4.0alpha2, php-7.3.7RC3
# 3d429869 19-Jun-2019 Nikita Popov

Fix shift UB in constants

We were shifting out the top bit of a signed integer.


Revision tags: php-7.3.7RC2, php-7.2.20RC2, php-7.4.0alpha1, php-7.3.7RC1, php-7.2.20RC1, php-7.2.19
# 08a0030b 29-May-2019 Anatol Belski

Fix conditional compilation

The new symbols are shared and don't need to depend on the availability
of __builtin_constant_p.


# 8c0b0c6a 28-May-2019 Dmitry Stogov

Avoid cold code duplication


Revision tags: php-7.3.6, php-7.1.30, php-7.2.19RC1, php-7.3.6RC1
# 3c92b79e 07-May-2019 Peter Kokot

Remove unused functions

- zend_mm_bitset_find_zero
- zend_mm_bitset_find_one
- zend_mm_bitset_find_zero_and_set
- zend_is_by_ref_func_arg_fetch


Revision tags: php-7.1.29, php-7.2.18, php-7.3.5, php-7.2.18RC1, php-7.3.5RC1
# 5f891578 07-Apr-2019 Peter Kokot

Remove HAVE_SIGNAL_H

The `<signal.h>` header file is part of the standard C89 headers [1] and
on current systems can be included unconditionally.

Since file requires at least C8

Remove HAVE_SIGNAL_H

The `<signal.h>` header file is part of the standard C89 headers [1] and
on current systems can be included unconditionally.

Since file requires at least C89 or greater, the `HAVE_SIGNAL_H` symbol
defined by Autoconf in Zend.m4 [2] can be ommitted and simplifed.

The bundled libmagic (file) also ommits the usage of HAVE_SIGNAL_H since
5.35 however current version in PHP is very modified 5.34 version and
will be refactored separately. Check for HAVE_SIGNAL_H is therefore
still done in the configure.ac.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4

show more ...


# fd1ad1e2 07-Apr-2019 Peter Kokot

Remove HAVE_LIMITS_H

The `<limits.h>` header file is part of the standard C89 headers [1]
and on current systems can be included unconditionally.

Since PHP requires at least C89

Remove HAVE_LIMITS_H

The `<limits.h>` header file is part of the standard C89 headers [1]
and on current systems can be included unconditionally.

Since PHP requires at least C89 or greater, the `HAVE_LIMITS_H` symbol
defined by Autoconf in configure.ac [2] can be ommitted and simplifed
however due to bundled file library (libmagic) and timelib still using
it, the removal there was omitted and done only in Zend.m4 file.

Current bundled libraries libtime, oniguruma, and libmagic still include
partial `HAVE_LIMITS_H` usage and will be more refactored when this is
possible.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4

show more ...


Revision tags: php-7.2.17, php-7.3.4, php-7.1.28, php-7.3.4RC1, php-7.2.17RC1
# 9499484e 14-Mar-2019 Dmitry Stogov

Implemented a faster way to access predefined TSRM resources - CG(), EG(), etc.


# 04b67bac 12-Mar-2019 Dmitry Stogov

Avoid reinitailization of ZTS cache pointer. Initialize it once in TSRM.c


# db777e91 05-Mar-2019 Stanislav Malyshev

Fix shifting signed values too far

Signed shift of 31 for int and 63 for long is flagged as undefined
behavior by UBSan (-fsanitize=undefined) and seems to be indeed so
according to

Fix shifting signed values too far

Signed shift of 31 for int and 63 for long is flagged as undefined
behavior by UBSan (-fsanitize=undefined) and seems to be indeed so
according to the standard.

The patch converts such cases to use unsigned.

show more ...


Revision tags: php-7.1.27, php-7.3.3, php-7.2.16
# c896b3ea 01-Mar-2019 Dmitry Stogov

Unused parameter


# a1109b28 01-Mar-2019 Dmitry Stogov

Keep original debug info


Revision tags: php-7.3.3RC1, php-7.2.16RC1
# da3316ff 18-Feb-2019 Tyson Andre

Fix typos in code comments in Zend/ [skip ci]


# 928c4221 18-Feb-2019 Nikita Popov

Make MADV_HUGEPAGE conditional on USE_ZEND_ALLOC_HUGE_PAGES

There have been multiple reports of large slowdowns due to the
use of MADV_HUGEPAGE, so make it conditional on
USE_ZEND_AL

Make MADV_HUGEPAGE conditional on USE_ZEND_ALLOC_HUGE_PAGES

There have been multiple reports of large slowdowns due to the
use of MADV_HUGEPAGE, so make it conditional on
USE_ZEND_ALLOC_HUGE_PAGES, just like MAP_HUGETLB already is.

show more ...


12345678910>>...18