#
28110f8d |
| 05-Nov-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix unspecified behaviour in zend_alloc in heap->limit computation Right-shifting a negative number is unspecified (i.e. implementation-defined) behaviour [1]. If we take a look at the
Fix unspecified behaviour in zend_alloc in heap->limit computation Right-shifting a negative number is unspecified (i.e. implementation-defined) behaviour [1]. If we take a look at the generated assembly [2], we see that the wrong value is computed. Fix it by using Z_UL instead of Z_L. While we're at it, just change every occurrence of this pattern to use Z_UL instead of casting. [1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf §6.5.7.5 [2] https://godbolt.org/z/4Y1qKKjsh Closes GH-12613.
show more ...
|
#
4553258d |
| 01-Aug-2023 |
Dmitry Stogov |
Fixed incorrect tracked malloc deallocation Fixes ext/ffi/tests/list.phpt failure
|
#
8d65c2fe |
| 14-Nov-2022 |
Michael Voříšek |
Fix GH-9650: Can't initialize heap: [0x000001e7] Closes GH-9721.
|
Revision tags: php-8.1.7RC1, php-8.1.4RC1, php-8.1.3 |
|
#
c7558e2f |
| 08-Feb-2022 |
Dmitry Stogov |
Merge branch 'PHP-8.0' into PHP-8.1 * PHP-8.0: Free cached chunks when the requested memory limit is above real usage
|
#
c035298e |
| 08-Feb-2022 |
Dmitry Stogov |
Free cached chunks when the requested memory limit is above real usage |
Revision tags: php-8.1.2RC1 |
|
#
2362722d |
| 10-Dec-2021 |
Christoph M. Becker |
Merge branch 'PHP-8.0' into PHP-8.1 * PHP-8.0: Fix #81585: cached_chunks are not counted to real_size on shutdown
|
#
5675ebe6 |
| 09-Dec-2021 |
Christoph M. Becker |
Fix #81585: cached_chunks are not counted to real_size on shutdown The amount of allocated system memory is kept in `real_size`, including the allocated `cached_chunks`. Thus, we need t
Fix #81585: cached_chunks are not counted to real_size on shutdown The amount of allocated system memory is kept in `real_size`, including the allocated `cached_chunks`. Thus, we need to keep the proper count at the end of the shutdown. Closes GH-7745.
show more ...
|
Revision tags: php-8.1.0, php-7.3.33, php-7.3.32, php-7.3.31, php-7.3.30 |
|
#
cce31657 |
| 13-Jul-2021 |
Nikita Popov |
Fix typo Accidentially dropped the "!" here. |
#
989205e9 |
| 12-Jul-2021 |
Nikita Popov |
Remove incorrect uses of zend_atoi() zend_atoi() parses integers with size suffixes (like "128M"). These just want to use a plain number, so use ZEND_ATOL instead. |
Revision tags: php-7.3.29 |
|
#
aff36587 |
| 29-Jun-2021 |
Patrick Allaert |
Fixed some spaces used instead of tabs |
#
e9b00515 |
| 31-May-2021 |
Nikita Popov |
Fix output buffer discard on memory limit Move this code directly into the error handler, and check the heap->overflow flag. Discarding output here allows us to print the normal memo
Fix output buffer discard on memory limit Move this code directly into the error handler, and check the heap->overflow flag. Discarding output here allows us to print the normal memory limit message to standard output. Otherwise nothing would be printed unless a different log medium was used, which makes for a suboptimal debugging experience.
show more ...
|
#
3a4ea6cb |
| 30-May-2021 |
Peter van Dommelen |
Don't automatically adjust memory_limit to 2M As PHP has a minimum memory usage of 2M (size of allocator chunk), setting a limit below that value is not meaningful and will be automa
Don't automatically adjust memory_limit to 2M As PHP has a minimum memory usage of 2M (size of allocator chunk), setting a limit below that value is not meaningful and will be automatically rounded up to the chunk size. Rather than doing this silently, show the newly introduced error message. The memory limit had to be increased to 2M for a number of tests. tests/lang/bug45392 has been marked as XFAIL. This old bugfix is not working as intended. The memory limit in main's `PG(memory_limit)` differs from the one in zend_alloc. In zend_alloc the `AG(mm_heap)->limit` is defined as `max(passed_value, ZEND_MM_CHUNK_SIZE)`. The check made in an unclean shutdown will never be true unless the memory limit is lower than ZEND_MM_CHUNK_SIZE, which happened to be the case in the test. https://bugs.php.net/bug.php?id=45392 https://github.com/php/php-src/commit/fcc0fdd125fdb9e1713f91d027fe07d680a0cf36
show more ...
|
#
1aafed5e |
| 31-May-2021 |
Nikita Popov |
Remove zend_set_memory_limit_ex() API This was added temporarily for the PHP-8.0 branch to avoid an ABI break. |
#
b4559e7a |
| 31-May-2021 |
Nikita Popov |
Merge branch 'PHP-8.0' * PHP-8.0: Fixed bug #81070
|
#
324ad2f4 |
| 31-May-2021 |
Nikita Popov |
Merge branch 'PHP-7.4' into PHP-8.0 * PHP-7.4: Fixed bug #81070 This is a non-trivial merge. To avoid an ABI break, a new zend_set_memory_limit_ex() function is added.
|
#
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 ...
|
#
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. |
Revision tags: php-7.3.28 |
|
#
462da6e0 |
| 31-Mar-2021 |
Josh Soref |
Fix spelling and grammar mistakes This PR corrects misspellings identified by the check-spelling action. The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465
Fix spelling and grammar mistakes This PR corrects misspellings identified by the check-spelling action. The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465 The action reports that the changes in this PR would make it happy: jsoref@602417c Closes GH-6822.
show more ...
|
#
70bb12fe |
| 12-Apr-2021 |
Dmitry Stogov |
Merge branch 'PHP-8.0' * PHP-8.0: Update zend_alloc.c
|
#
9c6b926d |
| 12-Apr-2021 |
Dmitry Stogov |
Merge branch 'PHP-7.4' into PHP-8.0 * PHP-7.4: Update zend_alloc.c
|
#
600402d9 |
| 07-Apr-2021 |
fishmore <37470985+bigboysun@users.noreply.github.com> |
Update zend_alloc.c Don't free main thunk. It will crash. |
#
2b93ae60 |
| 13-Feb-2021 |
David CARLIER |
Use VM_MAKE_TAG for macos memory tag In case Apple changes the meaning of the macro in the future. Closes GH-6687. |
Revision tags: php-7.3.27 |
|
#
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-7.3.26 |
|
#
95a4e1ea |
| 17-Dec-2020 |
Levi Morrison |
Fix ubsan error on Mac Fixes this error: > Zend/zend_alloc.c:473:73: runtime error: left shift of 250 by 24 places cannot be represented in type 'int' |
Revision tags: php-7.3.26RC1, php-7.3.25, php-7.3.25RC1, php-7.3.24, php-7.3.24RC1, php-7.3.23, php-7.3.23RC1, php-7.3.22 |
|
#
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 ...
|