Commit graph

428 commits

Author SHA1 Message Date
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
a81202ac49 Adios, yearly copyright ranges 2019-01-30 11:48:28 +01:00
Dmitry Stogov
662243cb30 Don't hide real peak usage. 2019-01-25 13:36:32 +03:00
Dmitry Stogov
bf774d4d75 Reduce amount of updated memory 2019-01-24 18:01:24 +03:00
Dmitry Stogov
4d0a2f68a9 Provide is_zend_ptr() function to check if a pointer lays in Zend MM heap. 2018-12-12 13:02:28 +03:00
David Carlier
5d4938956a Support huge pages on FreeBSD
FreeBSD provides MAP_ALIGNED_SUPER for a similar purpose as
MAP_HUGETLB on Linux, so add it as an alias.

Huge pages still have to be explicitly enabled through the
USE_ZEND_ALLOC_HUGE_PAGES environment variable.
2018-11-27 19:48:24 +01:00
Zeev Suraski
54dc07f3dc Update email addresses. We're still @Zend, but future proofing it... 2018-11-01 17:20:07 +02:00
Dmitry Stogov
1154f6f70a Merge branch 'PHP-7.3'
* PHP-7.3:
  Allow switching back to Zend MM heap.
2018-09-17 20:21:05 +03:00
Dmitry Stogov
b25bc917ec Allow switching back to Zend MM heap. 2018-09-17 20:20:13 +03:00
Nikita Popov
ac03b15e3c Remove __USE_GNU defines
This is an internal glibc macro, it should not be necessary to use
it if we already define _GNU_SOURCE (we do through
AC_USE_SYSTEM_EXTENSIONS). Needing to use __USE_GNU generally
indicates an inclusion order problem (libc header included before
config.h).
2018-09-17 17:51:00 +02:00
Nikita Popov
5776b4453d Remove unused MREMAP_MAYMOVE compatibility define 2018-09-17 13:48:39 +02:00
Anatol Belski
321c0cc349 Fix localized error messages and memory leaks
The FormatMessage API needs to LocalFree the delivered error messages.
In cases where messages are delivered in non ASCII compatible encoding,
the messages might be unreadable. This aligns the error message encoding
with the encoding settings in PHP, the focus is UTF-8 as default.

Initialize error buffer

Avoid code duplication
2018-09-17 10:56:50 +02:00
Nikita Popov
100733f86b Merge branch 'PHP-7.3' 2018-09-07 12:10:15 +02: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
404a97dd57 Merge branch 'PHP-7.3'
* PHP-7.3:
  Revert "Support fixed address mmap without replacement"
  Revert "Don't report mmap failure if it is expected"
2018-08-29 14:41:27 +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
Nikita Popov
406b57ed01 Merge branch 'PHP-7.3' 2018-08-22 11:22:23 +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
Nikita Popov
09b4b83753 Merge branch 'PHP-7.3' 2018-08-21 08:34:15 +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
Gabriel Caruso
84b195d9fc Fix some misspellings 2018-08-12 16:15:45 +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
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