Commit Graph

425 Commits

Author SHA1 Message Date
Dmitry Stogov
45b4368d5c Fixed incorrect behavior of internal memory debugger 2020-02-27 12:27:22 +03:00
Christoph M. Becker
cf183a5e2c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78620: Out of memory error
2019-10-04 09:09:39 +02:00
Christoph M. Becker
abaf9a76dc Fix #78620: Out of memory error
The integer addition in `ZEND_MM_ALIGNED_SIZE_EX` can overflow, what we
have to catch early.
2019-10-04 09:08:01 +02:00
Christoph M. Becker
d295e1dce2 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Revert "Fix #78620: Out of memory error"
2019-10-02 19:02:28 +02:00
Christoph M. Becker
f2fb37a772 Revert "Fix #78620: Out of memory error"
This reverts commit 8ce04df7e0.

Cf. <https://github.com/php/php-src/pull/4766#discussion_r330658679>.
2019-10-02 19:01:35 +02:00
Christoph M. Becker
752a34fb2c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78620: Out of memory error
2019-10-02 18:20:09 +02:00
Christoph M. Becker
8ce04df7e0 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.
2019-10-02 18:18:52 +02:00
Nikita Popov
a26f63213d Merge branch 'PHP-7.2' into PHP-7.3 2019-08-26 10:26:49 +02:00
Nikita Popov
16d35eb643 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.
2019-08-26 10:25:30 +02:00
Nikita Popov
3b3fafa637 Merge branch 'PHP-7.2' into PHP-7.3 2019-02-18 14:04:15 +01:00
Nikita Popov
928c42211f 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.
2019-02-18 14:03:07 +01:00
Zeev Suraski
9afce019e0 Future-proof email addresses 2018-11-01 18:35:32 +02:00
Dmitry Stogov
b25bc917ec Allow switching back to Zend MM heap. 2018-09-17 20:20:13 +03:00
David Carlier
f7b573b4e9 Support fixed address mmap without replacement
Reapply changes for Zend fixed mapping but only for FreeBSD.
Other BSD might expose some day a similar flag (private
for OpenBSD for the moment for example).
The Linux's part could be brought back but not before 7.4,
at this time, distributions with kernel > 4.17 will be
more widely available.
2018-09-07 12:10:05 +02:00
Remi Collet
a55bcaa14d Revert "Support fixed address mmap without replacement"
This reverts commit 0f68ff5c92.
2018-08-29 14:41:04 +02:00
Remi Collet
8cc7e2a2df Revert "Don't report mmap failure if it is expected"
This reverts commit 446b5b15d3.
2018-08-29 14:40:59 +02:00
David Carlier
446b5b15d3 Don't report mmap failure if it is expected
When using mmap with MAP_FIXED_NOREPLACE or MAP_FIXED|MAP_EXCL
an mmap failure is not an error condition, so do not print an
error message in this case.
2018-08-22 11:19:52 +02:00
David Carlier
0f68ff5c92 Support fixed address mmap without replacement
We did not use MAP_FIXED here, because it may replace an existing
mapping. This commit adds support for MAP_FIXED_NOREPLACE (available
on newer Linux kernels) and MAP_FIXED|MAP_EXCL (available on FreeBSD),
which avoid this issue.
2018-08-21 08:31:31 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Dmitry Stogov
18bc3afdcb Micro-optimizations 2018-06-06 01:57:19 +03:00
Dmitry Stogov
4ad9cf4605 Bit test optimization 2018-05-08 11:58:17 +03:00
Dmitry Stogov
880694952f micro optimisation 2018-05-07 22:29:16 +03:00
Dmitry Stogov
d5238b95a3 Added missing #if to allow compilation withput ZEND_MM_CUSTOM 2018-01-15 17:37:15 +03:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Dmitry Stogov
abd2120c4f Fixed inaccurate condition 2017-11-07 10:29:17 +03:00
Xinchen Hui
4da0bfc7d7 Unused var 2017-11-06 14:10:27 +08:00
Dmitry Stogov
522cc6926b erealloc() optimization 2017-11-03 18:35:03 +03:00
Dmitry Stogov
7045362ce7 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75368 (mmap/munmap trashing on unlucky allocations)
2017-10-13 14:00:21 +03:00
Dmitry Stogov
bf1c1d07db Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75368 (mmap/munmap trashing on unlucky allocations)
2017-10-13 13:56:23 +03:00
Dmitry Stogov
397f5cb687 Fixed bug #75368 (mmap/munmap trashing on unlucky allocations) 2017-10-13 13:56:06 +03:00
Sara Golemon
a93fe32c1a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix word alignment on ILP64.
2017-09-28 10:48:43 -04:00
Sara Golemon
b5bc88c64e Fix word alignment on ILP64. 2017-09-28 10:45:51 -04:00
Anatol Belski
bc5811f361 further sync for vim mode lines 2017-07-04 18:12:45 +02:00
Tom Van Looy
04fb3f28ff Remove superfluous semicolons 2017-06-26 00:23:25 +02:00
ZiMuyang
5c9d6e89fe Delete extra semicolon 2017-06-12 23:14:11 +02:00
Nikita Popov
edcabf6d07 Drop unnecessary allocator return value checks 2017-03-13 22:07:15 +01:00
Nikita Popov
8a34b33c59 Merge branch 'PHP-7.1' 2017-03-09 20:48:32 +01:00
Nikita Popov
305f3c2b76 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-09 20:48:24 +01:00
Nikita Popov
177f87cf05 Fixed bug #73370
If len=0 malloc() is allowed to return NULL.
2017-03-09 20:47:06 +01:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Nikita Popov
ef1ed6ab8e Merge branch 'PHP-7.1' 2016-12-14 18:11:51 +01:00
Nikita Popov
33e96c9d63 Merge branch 'PHP-7.0' into PHP-7.1 2016-12-14 18:11:43 +01:00
Nikita Popov
f99bf70360 Partially fix bug #70492
The libmagic portion is missing.
2016-12-14 18:11:27 +01:00
Anatol Belski
b204b3abd1 further normalizations, uint vs uint32_t
fix merge mistake

yet one more replacement run
2016-11-26 17:29:01 +01:00
Dmitry Stogov
4616441980 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixded bug #72736 (Slow performance when fetching large dataset with mysqli / PDO)
2016-10-26 15:22:51 +03:00
Dmitry Stogov
3fb0a1a4e7 Fixded bug #72736 (Slow performance when fetching large dataset with mysqli / PDO) 2016-10-26 15:17:09 +03:00
Anatol Belski
d35d9d1d0e missed piece for renaming
(cherry picked from commit 5ba9eab436)
2016-10-14 02:08:28 +02:00