Skip to content

Core dumped when allocate a huge memory #16878

Open
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$values = [
2**50+1,
];
foreach ($values as $value) {
}
gmp_fact($value);

Resulted in this output:

GNU MP: Cannot allocate memory (size=140737488355376)
Aborted (core dumped)

PHP Version

nightly

Operating System

ubuntu 22.04

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions