Xinchen Hui
ce6ad9bdd9
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0: (48 commits)
Update NEWs
Unused label
Fixed bug #72853 (stream_set_blocking doesn't work)
fix test
Bug #72663 - part 3
Bug #72663 - part 2
Bug #72663 - part 1
Update NEWS
BLock test with memory leak
fix tests
Fix TSRM build
Fix bug #72850 - integer overflow in uuencode
Fixed bug #72849 - integer overflow in urlencode
Fix bug #72848 - integer overflow in quoted_printable_encode caused heap corruption
Fix bug #72838 - Integer overflow lead to heap corruption in sql_regcase
Fix bug #72837 - integer overflow in bzdecompress caused heap corruption
Fix bug #72836 - integer overflow in base64_decode caused heap corruption
Fix for bug #72807 - do not produce strings with negative length
Fix for bug #72790 and bug #72799
Fix bug #72730 - imagegammacorrect allows arbitrary write access
...
Conflicts:
ext/standard/var_unserializer.c
2016-08-17 17:14:30 +08:00
Stanislav Malyshev
c2a13ced42
Fix bug #72742 - memory allocator fails to realloc small block to large one
2016-08-14 19:08:59 -07:00
Dmitry Stogov
0cfb47651c
Fixed compilation warnings
2016-06-28 11:37:51 +03:00
Dmitry Stogov
ebb99a1a3a
Fixed compilation warnings
2016-06-21 16:55:17 +03:00
Dmitry Stogov
1616038698
Added ZEND_ATTRIBUTE_FORMAT to some middind functions.
...
"%p" replaced by ZEND_LONG_FMT to avoid compilation warnings.
Fixed most incorrect use cases of format specifiers.
2016-06-21 16:00:37 +03:00
Nikita Popov
14023d39c1
Move builtin_ctzl portability into zend_bitset.h
...
Use this function in both zend_mm_bitset_find_one and
zend_bitset_first.
Maybe zend_bitset.h is not quite the right place for it, but I did
not want to include this in a globally included header like
zend_long.h or zend_portability.h.
2016-05-17 22:23:43 +02:00
Dmitry Stogov
a8d4649097
Use unsigned shift to clear the bit.
2016-04-29 12:38:48 +03:00
Rasmus Lerdorf
1efcdaf092
Disable huge pages in the Zend allocator by default
...
As per the discussion on internals, this is an expert feature
that needs special system-level configuration and care.
2016-03-22 08:04:53 -07:00
Dmitry Stogov
945a661912
Added ability to disable huge pages in Zend Memeory Manager through the environment variable USE_ZEND_ALLOC_HUGE_PAGES=0.
2016-03-17 22:43:42 +03:00
Anatol Belski
741bfe3932
fix build with clang on Winodws
2016-03-10 15:30:20 +01:00
Dmitry Stogov
0b9c87a02b
Fixed bug #71535 (Integer overflow in zend_mm_alloc_heap())
2016-02-24 11:04:48 +03:00
Xinchen Hui
97a9470d97
bump year which is missed in rev 49493a2
2016-01-02 17:56:11 +08:00
Dmitry Stogov
59424bb7bd
Fixed bug #71006 (symbol referencing errors on Sparc/Solaris)
2015-12-03 13:28:41 +03:00
Xinchen Hui
83de5364b7
manually apply the typo fix in master
2015-11-07 23:03:25 -08:00
Dmitry Stogov
eb32da13cd
Fix frequent reallocations with many small strings
2015-10-27 17:07:58 +01:00
Dmitry Stogov
d949c3b6e5
Fixed incorrect "peak" memory consumption calculation.
2015-10-13 15:20:17 +03:00
Dmitry Stogov
04bcce3c15
Cleanup (we keep and reuse size from zend_mm_huge_list)
2015-09-22 15:51:02 +03:00
Dmitry Stogov
c61604b9a9
Fixed reporting about repeatable "huge" memory leaks.
2015-09-22 15:46:41 +03:00
Bob Weinand
08e253cdbc
Optimize zend_mm_small_size_to_bin()
...
It removes a cmov operation and has a much faster branch for small allocations (especially when handling strings) (<= 64 bytes)
2015-09-19 23:07:43 +02:00
Dmitry Stogov
1b8bf059c4
Don't keep dangling pointer.
2015-09-10 20:03:42 +03:00
Dmitry Stogov
ac83eaef10
Don't inline "slow" and rarely used functions.
2015-09-09 13:42:35 +03:00
Dmitry Stogov
aa3fd8c849
Fixed typo that might cause serious bugs in MM. May be it was the reason of bug #70392 (SIGSEGV during PHP shutdown).
2015-09-08 17:22:26 +03:00
Dmitry Stogov
6848cb3f63
Use regular huge pages instead of anonymous if available.
2015-09-02 15:55:41 +03:00
Dmitry Stogov
111bd5d8c4
Introduced additional check. Its miss might be the reason of bug #70392 (SIGSEGV during PHP shutdown)
2015-09-02 13:05:12 +03:00
Dmitry Stogov
89aa1b7392
Ensure proper data alignment
2015-08-31 13:56:42 +03:00
Dmitry Stogov
87f0f77105
Simplified integer overflow checks
2015-08-28 12:47:21 +03:00
Dmitry Stogov
5d15d2b26d
Removed useless signal protection
2015-08-28 12:39:18 +03:00
Bob Weinand
76e3e99dd6
Fix issues with phpdbg SIGINT handler
...
Also fix valgrind warnings in allocator when not using mmap()ed memory
2015-08-21 23:36:31 +01:00
Dmitry Stogov
71af54e5f6
Mark error and exception functions as "cold" (Matt's idea)
2015-08-19 14:40:56 +03:00
Dmitry Stogov
162bf9e802
Reimplemented ability to get debug info (C source file and line number) in phpdbg without hacks and ABI breaks.
2015-08-11 16:33:47 +03:00
Dmitry Stogov
668ecaa606
Fixed bug #70098 (Real memory usage doesn't decrease)
2015-08-04 18:21:05 +03:00
Dmitry Stogov
225bb70498
Added missing API functions
2015-07-09 12:19:30 +03:00
Kalle Sommer Nielsen
ce2cd89258
Replace references to PHP_WIN32 and TSRM_WIN32 with ZEND_WIN32 in Zend/, this also fixes 1 instance of where fflush(stderr) was misplaced (zend_extensions.c)
2015-07-04 18:55:22 +02:00
Bob Weinand
70e86b8766
Also try __has_builtin() where builtins are used
2015-06-22 13:24:39 +02:00
Dmitry Stogov
fb8891d9fc
Reset heap usage statistics on request shutdown
2015-05-18 23:06:23 +03:00
Dmitry Stogov
0604df8a82
Fixed phpdbg build
2015-05-14 16:47:22 +03:00
Dmitry Stogov
8e9b4b5aa7
Refactored custom storage API.
2015-05-14 14:56:13 +03:00
Stanislav Malyshev
5a1bef8eef
Merge branch 'PHP-5.6'
...
* PHP-5.6:
fix format
update NEWS
Add test for bug #69522
Update tests
Fix bug #69522 - do not allow int overflow
Forgot test file
Fix bug #69403 and other int overflows
Fixed bug #69418 - more s->p fixes for filenames
Fixed bug #69364 - use smart_str to assemble strings
Fix bug #69453 - don't try to cut empty string
Fix bug #69545 - avoid overflow when reading list
Conflicts:
Zend/zend_alloc.c
Zend/zend_operators.c
ext/ftp/ftp.c
ext/pcntl/pcntl.c
ext/standard/basic_functions.c
ext/standard/dir.c
ext/standard/file.c
ext/standard/pack.c
ext/standard/string.c
main/rfc1867.c
2015-05-12 15:00:24 -07:00
Stanislav Malyshev
c08f9c2c78
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
fix format
update NEWS
Add test for bug #69522
Update tests
Fix bug #69522 - do not allow int overflow
Forgot test file
Fix bug #69403 and other int overflows
Fixed bug #69418 - more s->p fixes for filenames
Fixed bug #69364 - use smart_str to assemble strings
Fix bug #69453 - don't try to cut empty string
Fix bug #69545 - avoid overflow when reading list
Conflicts:
ext/pcntl/pcntl.c
ext/standard/basic_functions.c
ext/standard/pack.c
ext/standard/tests/dir/opendir_variation1-win32.phpt
2015-05-12 14:24:15 -07:00
Stanislav Malyshev
c591f022f8
Fix bug #69403 and other int overflows
2015-05-10 02:20:08 -07:00
Dmitry Stogov
e38ed4c28f
Changed zend_smart_str allocation granularity to do the better job together with Zend MM and avoid useless calls to erealloc().
...
The actual reallocation routiones are seprated from inlined code to reduce code size.
2015-04-16 14:45:08 +03:00
Dmitry Stogov
05232cc810
Revert "Changed zend_smart_str allocation granularity to do the better job together with Zend MM and avoid useless calls to erealloc()." That commit significantly increased the code size because of intensive inlining and more expensive reallocation code.
...
This reverts commit 5275e5560b
.
2015-04-16 13:11:54 +03:00
Dmitry Stogov
5275e5560b
Changed zend_smart_str allocation granularity to do the better job together with Zend MM and avoid useless calls to erealloc().
2015-04-16 12:32:56 +03:00
Xinchen Hui
96f7a33df6
Temorary fix for phpdbg segfault while use zend_mm_set_custom_handlers
2015-03-09 11:19:05 +08:00
Xinchen Hui
4861e1bd6b
Revert "Fixed memleak while using custom mm"
...
This reverts commit 5eabd979ff
.
2015-03-09 00:41:19 +08:00
Xinchen Hui
5eabd979ff
Fixed memleak while using custom mm
2015-03-09 00:18:54 +08:00
Xinchen Hui
51b96086d7
Revert "Fixed memleak in alloc_globals_ctor"
...
This reverts commit 85316b4bf0
.
2015-03-09 00:17:52 +08:00
Dmitry Stogov
bb91bf83f9
Minimize copying of HashTable realocation
2015-03-05 17:22:10 +03:00
Reeze Xia
85316b4bf0
Fixed memleak in alloc_globals_ctor
...
This free operation is missed when new MM was introduced in master.
2015-02-28 13:14:39 +08:00
Anatol Belski
af3ca74501
made ZEND_TSRMLS_CACHE_* macros look like function calls
...
which also comply with the current semantics for such macros
2015-02-16 17:19:32 +01:00