php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40632 setcookie() causes segfault or "zend_mm_heap corrupted"
Submitted: 2007-02-25 23:46 UTC Modified: 2007-02-26 02:13 UTC
From: phpbugs at thequod dot de Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 5CVS-2007-02-25 (CVS) OS: Ubuntu Linux
Private report: No CVE-ID: None
 [2007-02-25 23:46 UTC] phpbugs at thequod dot de
Description:
------------
We use a quite huge cookie lifetime in our application 
(b2evolution) which causes a segmentation fault with 
current CVS.

When I rename the cookie name and value, it 
becomes "zend_mm_heap corrupted" instead.

Reproduce code:
---------------
# "zend_mm_heap corrupted":
setcookie( 'foo', 'bar', 1487806696, '/blogs/', '.b2cvs18.local' );

# "Segmentation fault":
setcookie( 'cookieb2evosession', '33_9Bm6MWngjfF745MSCgoqREt3umW7ttC6', 1487806696, '/blogs/', '.b2cvs18.local' );


Expected result:
----------------
Nothing.

Actual result:
--------------
zend_mm_heap corrupted

or

Segmentation fault

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-25 23:57 UTC] phpbugs at thequod dot de
This does not seem to be related to the lifetime alone 
(which is time()+10 years), but I can reproduce it with:
setcookie( 'foo', '33_9Bm6MWngjfF745MSCgoqREt3umW7ttC6', 
time() )
, too.

OTOH
setcookie( 'foo', 'bar', time() );
or
setcookie( 'foo', '33_9Bm6MWngjfF745MSCgoqREt3umW7ttC6' );
do not segfault.
 [2007-02-25 23:59 UTC] phpbugs at thequod dot de
changed "Summary"
 [2007-02-26 02:13 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 05 22:01:35 2025 UTC