php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45579 Fatal error: memory exhausted for e-mail with numeric user-part
Submitted: 2008-07-21 10:41 UTC Modified: 2008-07-28 21:40 UTC
From: f dot zwegers at scouting dot nl Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 5.2.6 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: f dot zwegers at scouting dot nl
New email:
PHP Version: OS:

 

 [2008-07-21 10:41 UTC] f dot zwegers at scouting dot nl
Description:
------------
I want to add the e-mailaddress 987654321@scouting.nl to an array like

$result['987654321@scouting.nl'] = 'foo';

PHP exits with the message

Fatal error: Allowed memory size of 57671680 bytes exhausted (tried to allocate 987654323 bytes) in /usr/local/raksha-dev2/lib/php/sol/as/as_form/model/as_form.php on line 734

Note that the memory that PHP tries to allocate is almost exactly the numeric part of the address! This also works when permutating the numbers.

Reproduce code:
---------------
$result['987654321@scouting.nl'] = 'foo';

Expected result:
----------------
array (
['987654321@scouting.nl'] => 'foo
)

Actual result:
--------------
Fatal error: Allowed memory size of 57671680 bytes exhausted (tried to allocate 987654323 bytes) in /usr/local/raksha-dev2/lib/php/sol/as/as_form/model/as_form.php on line 734

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-21 16:05 UTC] jani@php.net
$ php -r '$result["987654321@scouting.nl"] = "foo"; var_dump($result);'
array(1) {
  ["987654321@scouting.nl"]=>
  string(3) "foo"
}

Works fine. Now you should propably provide the short but complete reproduce script..
 [2008-07-28 09:38 UTC] f dot zwegers at scouting dot nl
I can only reproduce it using the entire PHP script... however on my local test environment (PHP 5.2.5) the error doesn't occur.
 [2008-07-28 21:40 UTC] jani@php.net
Come back when you can provide a short reproducing script.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 07 09:01:33 2025 UTC