History log of /PHP-8.4/Zend/zend_alloc.c (Results 51 – 75 of 496)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: 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
# 7d4ae7fa 01-Aug-2020 tangl163

Drop the unneeded pointer casting

The standard says that "A pointer to void may be converted to or from a
pointer to any object type". So the casting is unneeded.

REF:
*

Drop the unneeded pointer casting

The standard says that "A pointer to void may be converted to or from a
pointer to any object type". So the casting is unneeded.

REF:
* c11: http://port70.net/~nsz/c/c11/n1570.html#6.3.2.3p1
* c99: http://port70.net/~nsz/c/c99/n1256.html

Closes GH-5916

show more ...


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, 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, php-7.4.3, php-7.2.28, php-7.3.15RC1, php-7.4.3RC1
# 370c00e9 28-Jan-2020 Nikita Popov

Add crude memory limit to tracked alloc

Check whether the requested allocation size exceeds limit (rather
than the cumulative size).

This is useful to prevent allocations trigge

Add crude memory limit to tracked alloc

Check whether the requested allocation size exceeds limit (rather
than the cumulative size).

This is useful to prevent allocations triggering OOM during fuzzing.

show more ...


# 45b4368d 27-Feb-2020 Dmitry Stogov

Fixed incorrect behavior of internal memory debugger


Revision tags: 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, php-7.4.0RC5
# 9d48bf51 27-Oct-2019 Tyson Andre

Fix miscellaneous typos in docs and error messages

Closes GH-4863.


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


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


12345678910>>...20