Skip to content

Commit 6563269

Browse files
committed
Fix
1 parent 12eefe4 commit 6563269

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Zend/tests/new_oom.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ $php = PHP_BINARY;
1313

1414
foreach (get_declared_classes() as $class) {
1515
$output = shell_exec("$php --no-php-ini $file $class 2>&1");
16+
var_dump($output);
1617
if ($output && preg_match('(^\nFatal error: Allowed memory size of [0-9]+ bytes exhausted[^\r\n]* \(tried to allocate [0-9]+ bytes\) in [^\r\n]+ on line [0-9]+\nStack trace:\n(#[0-9]+ [^\r\n]+\n)+$)', $output) !== 1) {
1718
echo "Class $class failed\n";
1819
echo $output, "\n";

Zend/zend_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3031,7 +3031,7 @@ ZEND_API void* ZEND_FASTCALL _emalloc_huge(size_t size)
30313031
{ \
30323032
size_t page_offset = ZEND_MM_ALIGNED_OFFSET(ptr, ZEND_MM_CHUNK_SIZE); \
30333033
zend_mm_chunk *chunk = (zend_mm_chunk*)ZEND_MM_ALIGNED_BASE(ptr, ZEND_MM_CHUNK_SIZE); \
3034-
int page_num = page_offset / ZEND_MM_PAGE_SIZE; \chunk->
3034+
int page_num = page_offset / ZEND_MM_PAGE_SIZE; \
30353035
ZEND_MM_UNPOISON_CHUNK_HDR(chunk); \
30363036
ZEND_MM_CHECK(chunk->heap == AG(mm_heap), "zend_mm_heap corrupted"); \
30373037
ZEND_ASSERT(chunk->map[page_num] & ZEND_MM_IS_SRUN); \

0 commit comments

Comments
 (0)