Commit Graph

29 Commits

Author SHA1 Message Date
Christoph M. Becker
2f4973fd88
Revert GH-10279
Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>.

This reverts commit 45a128c9de.
This reverts commit 1eb71c3f15.
This reverts commit 492523a779.
This reverts commit c7a4633891.
This reverts commit 308adb915c.
This reverts commit cd27d5e07f.
This reverts commit c5933409b4.
This reverts commit 46371f4eb3.
This reverts commit 623e2e9fc6.
This reverts commit e7434c1247.
This reverts commit d28d323ca2.
This reverts commit 1a067b84ee.
This reverts commit a55c0c5fc3.
This reverts commit b5aeb3a4d4.
This reverts commit f061a035e4.
This reverts commit b088575119.
This reverts commit b1d48774a7.
This reverts commit 94f9a20ce6.
This reverts commit 4831e48708.
This reverts commit cd985de190.
This reverts commit 9521d21681.
This reverts commit d6136151e9.
2023-01-16 12:25:59 +01:00
Max Kellermann
94f9a20ce6 Zend/zend_arena: include cleanup 2023-01-12 15:12:45 +00:00
Nikita Popov
3e01f5afb1 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.
2021-01-15 12:33:06 +01:00
George Peter Banyard
fa8d9b1183 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
2020-08-28 15:41:27 +02:00
Nikita Popov
7632a411e3 Add tracked arena allocator
Available under -DZEND_TRACK_ARENA_ALLOC. This will use the system
allocator combined with arena checkpointing & release semantics
and allows analyzing arena usage under asan/valgrind.

I've sacrificed the duplicate arena implementation in mysqlnd, as
the integration with mysqlnd alloc is not worth the code duplication
to me.
2019-06-28 12:44:18 +02:00
Nikita Popov
71ce7d32ea Merge branch 'PHP-7.3' into PHP-7.4 2019-05-23 13:41:17 +02:00
Nikita Popov
6f9dfd9473 Fix bug #77955
Free metadata before freeing the arena. I don't have a repro script,
but the added assertion fails for many existing tests prior to this
change.
2019-05-23 13:40:52 +02:00
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
Zeev Suraski
9afce019e0 Future-proof email addresses 2018-11-01 18:35:32 +02:00
Zeev Suraski
54dc07f3dc Update email addresses. We're still @Zend, but future proofing it... 2018-11-01 17:20:07 +02:00
Peter Kokot
be49d61b19 Remove old SVN keywords substitutions
When the PHP source code was versioned in Subversion, there was
possible to substitute certain keywords such as $Id$ with revision
number, last change time and author name. Such approach is not used
in Git so this patch removes these outdated artifacts from source
code files.
2018-06-16 13:04:30 +02:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Anatol Belski
bc5811f361 further sync for vim mode lines 2017-07-04 18:12:45 +02:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Xinchen Hui
a219fc1753 Fixed bug (Low probability segfault in zend_arena) 2016-02-09 12:20:11 +08:00
Xinchen Hui
97a9470d97 bump year which is missed in rev 49493a2 2016-01-02 17:56:11 +08:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Dmitry Stogov
e439349e58 Expose zend_safe_address() and use it in zend_arena_calloc() 2014-09-18 13:31:25 +04:00
Dmitry Stogov
e646c6d5b5 Fixed compilation warnings 2014-09-18 04:02:43 +04:00
Nikita Popov
f4f9b54983 Revert "Move safe_address into zend_multiply.h"
This reverts commit 43b02e169c.

I'm getting symbol resolution issues for zend_error_noreturn in the
opcache.so, so reverting this for now.
2014-09-06 22:12:37 +02:00
Nikita Popov
43b02e169c Move safe_address into zend_multiply.h
This allows reuse in zend_arena_calloc.

Also renamed the function to zend_safe_address as it's no longer
private to the allocator.
2014-09-06 14:03:59 +02:00
Dmitry Stogov
7d0416f401 Fixed overflow check 2014-09-05 16:13:06 +04:00
Dmitry Stogov
92164f6b7b Fixed compilation warnings 2014-09-04 14:06:22 +04:00
Dmitry Stogov
8217e20ddb Fixed compilation warnings 2014-07-15 15:51:40 +04:00
Dmitry Stogov
c85c795e46 Imporoved EXPECTED/UNEXPECTED macros to support not boolean expressions.
Fixed invalid EXPECTED() usage.
2014-07-09 19:32:09 +04:00
Dmitry Stogov
a4f38192ec Use arena allocator for optimizer temporary data structures 2014-06-18 17:09:37 +04:00
Dmitry Stogov
e1b18e59f7 Use arena allocator for zend_class_entry, zend_op_array and zend_property_info that live till the end of request 2014-06-18 02:47:01 +04:00