Sammy Kaye Powers
9e29f841ce
Update copyright headers to 2017
2017-01-02 09:30:12 -06:00
Anatol Belski
afbb3b858a
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
use already exported symbol
Revert "export symbol missing by phpdbg"
2016-10-13 10:08:10 +02:00
Anatol Belski
3104882cf8
Revert "export symbol missing by phpdbg"
...
This reverts commit 611ab7fe5b
.
Overseen strpprintf is there
2016-10-13 09:50:32 +02:00
Anatol Belski
c762c8f3c0
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
export symbol missing by phpdbg
2016-10-12 22:21:19 +02:00
Anatol Belski
611ab7fe5b
export symbol missing by phpdbg
2016-10-12 22:18:41 +02:00
Anatol Belski
47e26cf9db
fix known interned strings init with TS per request
2016-06-02 17:55:48 +02:00
Dmitry Stogov
7b94b958cc
Intern some known (and offten used) strings.
2016-05-12 13:47:22 +03:00
Nikita Popov
af66ad2857
Remove use of register keyword in headers
...
Headers must be C++ compatible -- this throws warnings.
The register keyword is not used for optimization, at least not
in optimized builds.
2016-02-04 13:34:19 +01:00
Xinchen Hui
97a9470d97
bump year which is missed in rev 49493a2
2016-01-02 17:56:11 +08:00
Dmitry Stogov
89aa1b7392
Ensure proper data alignment
2015-08-31 13:56:42 +03:00
Dmitry Stogov
4a2e40bb86
Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).
2015-06-30 04:05:24 +03:00
Dmitry Stogov
4bd22cf1c1
Improved zend_string API (Francois Laupretre)
...
Squashed commit of the following:
commit d96eab8d79
Author: Francois Laupretre <francois@tekwire.net>
Date: Fri Jun 26 01:23:31 2015 +0200
Use the new 'ZSTR' macros in the rest of the code.
Does not change anything to the generated code (thanks to compat macros) but cleaner.
commit b352643910
Author: Francois Laupretre <francois@tekwire.net>
Date: Thu Jun 25 13:45:06 2015 +0200
Improve zend_string API
Add missing methods
2015-06-29 16:44:54 +03:00
Dmitry Stogov
a0c07c90f2
Fixed zend_string related inconsistencies
2015-04-21 23:26:34 +03:00
Dmitry Stogov
bdf7fc67d8
We can't stay zend_string->h to be zero, because it may lead to hash value recalculation and update.
...
But in general zend_string may be put and read-only memory, that would lead to crash.
Always set the high bit of hash_value to prevent recaclulation.
2015-03-24 16:28:26 +03:00
Dmitry Stogov
d146d15003
Optimize zend_string_realloc() add more specialized versions zend_string_extend() and zend_string_truncate()
2015-03-20 02:02:42 +03:00
Bob Weinand
dac2b060e4
Remove bogus ZEND_ASSERT(hash != 0)
...
There's always a possibility that the has will end up as equal to zero due to overflowing.
See the tests for strings whose hash overflow.
Yes, there's a check for whether the hash already was calculated... and strings with a hash equal to zero always need the hash recalculated, in one of 2^32 respectively 2^64 cases - which should not be a major issue.
2015-03-18 22:25:55 +01:00
Xinchen Hui
63c923e3e1
Forget this change
2015-02-11 16:06:47 +08:00
Xinchen Hui
4f1fc31e16
Expose zend_string_equals_str_ci
2015-02-11 16:05:20 +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
Anatol Belski
4acc56d5b2
Merge remote-tracking branch 'origin/master' into native-tls
...
* origin/master:
fix unserializer patch
move this entry to the correct version
add missing NEWS entry
add missing NEWS entry
Updated or skipped certain 32-bit tests
add NEWS entry for #68594
5.4.37
add more BC breaks
update news
add CVE
add missing test file
Fix bug #68594 - Use after free vulnerability in unserialize()
Fix typo
Hash value must not zero?
2014-12-17 05:29:36 +01:00
Anatol Belski
bdeb220f48
first shot remove TSRMLS_* things
2014-12-13 23:06:14 +01:00
Xinchen Hui
3753e6d978
Hash value must not zero?
2014-12-13 11:42:53 +08:00
Anatol Belski
741bf0ee96
fix the empty_strings SAPI shutdown leak in TS build
...
still the NTS variant is somewhat different as it needs
zend_new_interned_string_int because the normal callbacks might
be not initialized, but at least no leaks anymore and some more
structure
2014-10-06 15:48:55 +02:00
Dmitry Stogov
3bc8a958c5
Fixed useless or duplicated IS_INTERNED() checks
2014-09-19 15:41:01 +04:00
Dmitry Stogov
5185baab3e
Changed "inline" into "zend_always_inline"
2014-09-18 04:59:01 +04:00
Xinchen Hui
0763d6b98d
use zend_string_equals_ci
2014-08-29 13:19:14 +08:00
Nikita Popov
46b53e815c
Add zend_string_equals and zend_string_equals_literal
2014-08-25 22:40:58 +02:00
Anatol Belski
455741fce3
master renames phase 4
2014-08-25 20:57:25 +02:00
Anatol Belski
6f9f0bf205
master renames phase 2
2014-08-25 19:28:33 +02:00
Anatol Belski
c3e3c98ec6
master renames phase 1
2014-08-25 19:24:55 +02:00
Anatol Belski
8ee2a4a9b5
first shot on merging the core fro the int64 branch
2014-08-16 11:16:11 +02:00
Dmitry Stogov
8217e20ddb
Fixed compilation warnings
2014-07-15 15:51:40 +04:00
Xinchen Hui
b7ff8f28b2
Temporary fixed the invalid read warning
2014-07-14 14:01:53 +08:00
Dmitry Stogov
9d6e45a0ee
Changed zend_make_printable_zval() to return "use_copy" instead of additional reference argument.
...
Improved branch prediction.
2014-07-09 16:05:55 +04:00
Xinchen Hui
7614fe810e
C++ doesn't allow implicitly convert void * to other pointer type
2014-06-28 11:19:38 +08:00
Xinchen Hui
f609d8c1c6
C++ compiler doesn't allow cast a void * to other pointer type
2014-06-27 12:35:34 +08:00
Nikita Popov
65f488ece3
Add STR_ALLOCA_* API, use in get_method and verify_arg
...
This avoid unnecessary allocations when using dynamic method
dispatch and class typehints.
Probably there are other places where this should be done as well,
those just stood out for my usage.
2014-05-03 10:43:45 +02:00
Nikita Popov
08ae88157b
Allocate zend_strings with correct size
...
For me (32bit) sizeof(zend_string) is 20, which means that the
char[1] array at the end is padded with three bytes. Thus allocating
based on sizeof(zend_string)-1 overallocates by those 3 padding bytes.
This commit fixes the allocation size, by using XtOffsetOf.
2014-04-23 19:34:51 +02:00
Dmitry Stogov
f9b26bc39a
Cleanup (2-nd round)
2014-04-15 21:56:30 +04:00
Nikita Popov
a6be32f59a
IS_INTERNED is not always 0 in ZTS
...
The current implementation chooses to intern "" in ZTS. Either that
should be removed or IS_INTERNED needs to actually check the flag.
2014-04-09 23:54:03 +02:00
Dmitry Stogov
76cc99fe60
Refactored ZVAL flags usage to simplify various checks (e.g. Z_REFCOUNTED(), candidate for GC, etc)
2014-04-03 15:26:23 +04:00
Dmitry Stogov
d8099d0468
Changed data layout to allow more efficient operations
2014-04-02 14:34:44 +04:00
Dmitry Stogov
a25a1ba0ef
STR_DUP() doesn't duplicate interned strings anymore. In case new string is required STR_INIT() or STR_ALLOC() should be used.
2014-04-01 16:31:03 +04:00
Dmitry Stogov
b7938ab1bd
Refactored GC (incomplete)
2014-03-19 17:00:28 +04:00
Dmitry Stogov
51494f252f
Don't include trailing zero into hash caclculation
2014-03-14 15:35:57 +04:00
Dmitry Stogov
557994d50d
Use better data structures (incomplete)
2014-02-19 01:12:05 +04:00
Dmitry Stogov
a0fe8e5a91
Use better data structures (incomplete)
2014-02-18 01:41:23 +04:00
Dmitry Stogov
2b9b9afa7a
Use better data structures (incomplete)
2014-02-17 17:59:18 +04:00
Dmitry Stogov
e2ea9a7319
Use better data structures (incomplete)
2014-02-12 11:42:27 +04:00