summaryrefslogtreecommitdiff
path: root/Zend/zend_alloc.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-7.0' into PHP-7.1Nikita Popov2017-03-091-2/+2
|\
| * Fixed bug #73370Nikita Popov2017-03-091-2/+2
| | | | | | | | If len=0 malloc() is allowed to return NULL.
| * Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| |
* | Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| |
* | Merge branch 'PHP-7.0' into PHP-7.1Nikita Popov2016-12-141-1/+1
|\ \ | |/
| * Partially fix bug #70492Nikita Popov2016-12-141-1/+1
| | | | | | | | The libmagic portion is missing.
* | Merge branch 'PHP-7.0' into PHP-7.1Dmitry Stogov2016-10-261-0/+11
|\ \ | |/ | | | | | | * PHP-7.0: Fixded bug #72736 (Slow performance when fetching large dataset with mysqli / PDO)
| * Fixded bug #72736 (Slow performance when fetching large dataset with mysqli ↵Dmitry Stogov2016-10-261-0/+11
| | | | | | | | / PDO)
| * missed piece for renamingAnatol Belski2016-10-131-4/+4
| |
| * Fix potential overflows in php_pcre_replace_implStanislav Malyshev2016-10-121-15/+2
| |
* | missed piece for renamingAnatol Belski2016-10-141-4/+4
| | | | | | | | (cherry picked from commit 5ba9eab4361cf9d0d9085f969acc2e96b8af3241)
* | Fix potential overflows in php_pcre_replace_implStanislav Malyshev2016-10-141-15/+2
| | | | | | | | (cherry picked from commit 9c50ba42d6503a5fcfffad6c6823a9bee0e033c0)
* | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2016-09-241-2/+2
|\ \ | |/
| * Merge branch 'PHP-5.6' into PHP-7.0Christoph M. Becker2016-09-241-2/+2
| |\
| | * Merge branch 'pull-request/2120' into PHP-5.6Christoph M. Becker2016-09-241-2/+2
| | |\
| | | * Fix potential memory issue with USE_ZEND_ALLOC=0Christoph M. Becker2016-09-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PHP core and extensions are written with the assumption that memory allocation either succeeds, or the allocator bails out (i.e. the allocator is infallible). Therefore the result of emalloc() and friends are not checked for NULL values. However, with USE_ZEND_ALLOC=0, malloc() and friends are used as allocators, but these are fallible, i.e. they return NULL instead of bailing out if they fail. This easily leads to invalid memory accesses in the following, such as in <https://bugs.php.net/73032>. Some of these cases may constitute exploitable vulnerabilities. Therefore we make the infallible __zend_alloc() and friends the default for USE_ZEND_ALLOC=0.
| | * | Fix various int size overflows.Stanislav Malyshev2016-09-121-0/+9
| | |/ | | | | | | | | | | | | Add function for detection of string zvals with length that does not fit INT_MAX.
| | * bump year which is missed in rev 49493a2Xinchen Hui2016-01-021-1/+1
| | |
| | * Fixed bug #69703 (Use __builtin_clzl on PowerPC) -- Patch by dja at axtens ↵Kalle Sommer Nielsen2015-05-281-2/+2
| | | | | | | | | | | | | | | | | | dot net # Julien, even though 5.5 is still non security mode I don't think we should merge this patch but I leave the choice with you
* | | Merge branch 'PHP-7.0' into PHP-7.1Xinchen Hui2016-08-171-12/+12
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | Fix bug #72742 - memory allocator fails to realloc small block to large oneStanislav Malyshev2016-08-141-12/+12
| | |
* | | Fixed compilation warningsDmitry Stogov2016-06-281-1/+1
| | |
* | | Fixed compilation warningsDmitry Stogov2016-06-211-19/+21
| | |
* | | Added ZEND_ATTRIBUTE_FORMAT to some middind functions.Dmitry Stogov2016-06-211-11/+3
| | | | | | | | | | | | | | | "%p" replaced by ZEND_LONG_FMT to avoid compilation warnings. Fixed most incorrect use cases of format specifiers.
* | | Move builtin_ctzl portability into zend_bitset.hNikita Popov2016-05-171-42/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Use unsigned shift to clear the bit.Dmitry Stogov2016-04-291-1/+1
|/ /
* | Disable huge pages in the Zend allocator by defaultRasmus Lerdorf2016-03-221-3/+3
| | | | | | | | | | As per the discussion on internals, this is an expert feature that needs special system-level configuration and care.
* | Added ability to disable huge pages in Zend Memeory Manager through the ↵Dmitry Stogov2016-03-171-1/+11
| | | | | | | | environment variable USE_ZEND_ALLOC_HUGE_PAGES=0.
* | fix build with clang on WinodwsAnatol Belski2016-03-101-1/+1
| |
* | Fixed bug #71535 (Integer overflow in zend_mm_alloc_heap())Dmitry Stogov2016-02-241-0/+4
| |
* | bump year which is missed in rev 49493a2Xinchen Hui2016-01-021-1/+1
| |
* | Fixed bug #71006 (symbol referencing errors on Sparc/Solaris)Dmitry Stogov2015-12-031-5/+5
| |
* | manually apply the typo fix in masterXinchen Hui2015-11-071-6/+6
| |
* | Fix frequent reallocations with many small stringsDmitry Stogov2015-10-271-0/+16
| |
* | Fixed incorrect "peak" memory consumption calculation.Dmitry Stogov2015-10-131-0/+12
| |
* | Cleanup (we keep and reuse size from zend_mm_huge_list)Dmitry Stogov2015-09-221-1/+0
| |
* | Fixed reporting about repeatable "huge" memory leaks.Dmitry Stogov2015-09-221-4/+23
| |
* | Optimize zend_mm_small_size_to_bin()Bob Weinand2015-09-191-11/+13
| | | | | | | | It removes a cmov operation and has a much faster branch for small allocations (especially when handling strings) (<= 64 bytes)
* | Don't keep dangling pointer.Dmitry Stogov2015-09-101-0/+1
| |
* | Don't inline "slow" and rarely used functions.Dmitry Stogov2015-09-091-0/+31
| |
* | Fixed typo that might cause serious bugs in MM. May be it was the reason of ↵Dmitry Stogov2015-09-081-1/+1
| | | | | | | | bug #70392 (SIGSEGV during PHP shutdown).
* | Use regular huge pages instead of anonymous if available.Dmitry Stogov2015-09-021-1/+12
| |
* | Introduced additional check. Its miss might be the reason of bug #70392 ↵Dmitry Stogov2015-09-021-1/+1
| | | | | | | | (SIGSEGV during PHP shutdown)
* | Ensure proper data alignmentDmitry Stogov2015-08-311-2/+0
| |
* | Simplified integer overflow checksDmitry Stogov2015-08-281-3/+12
| |
* | Removed useless signal protectionDmitry Stogov2015-08-281-17/+1
| |
* | Fix issues with phpdbg SIGINT handlerBob Weinand2015-08-211-0/+1
| | | | | | | | Also fix valgrind warnings in allocator when not using mmap()ed memory
* | Mark error and exception functions as "cold" (Matt's idea)Dmitry Stogov2015-08-191-3/+3
| |
* | Reimplemented ability to get debug info (C source file and line number) in ↵Dmitry Stogov2015-08-111-22/+76
| | | | | | | | phpdbg without hacks and ABI breaks.
* | Fixed bug #70098 (Real memory usage doesn't decrease)Dmitry Stogov2015-08-041-39/+188
| |