#41101 [NEW]: segfault when setcookie deletes session cookie with path information
| From: | tokul at users dot sourceforge dot net | Date: | Mon, 16 Apr 2007 12:02:56 +0000 |
| Subject: | #41101 [NEW]: segfault when setcookie deletes session cookie with path information | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-111537@lists.php.net to get a copy of this message | ||
From: tokul at users dot sourceforge dot net
Operating system: Linux Debian Etch
PHP version: 6CVS-2007-04-16 (snap)
PHP Bug Type: Reproducible crash
Bug description: segfault when setcookie deletes session cookie with path information
Description:
------------
PHP6-200704160630 snapshot compiled with --prefix, --with-apxs2 and
--config-path options. Apache 2.2.4. If setcookie() tries to delete session
cookie, it causes 'zend_mm_heap corrupted' error or segfault in apache
logs.
I have found other bug reports about 'zend_mm_heap corrupted' error, but
they are closed in February or March. I can reproduce crash in current PHP6
snapshot. Code does not crash if fourth argument is set to '/'. Script is
called from /path/ directory.
Reproduce code:
---------------
session_start();
setcookie(session_name(), '', 0, '/path');
die('test');
Expected result:
----------------
test
Actual result:
--------------
Browser tries to download php script and I get 'zend_mm_heap corrupted'
message in error_log.
Real code generated 'child pid #### exit signal Segmentation fault (11)'.
I wanted to simplify code and got zend_mm_heap error instead of segfault.
--
Edit bug report at http://bugs.php.net/?id=41101&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41101&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41101&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41101&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41101&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41101&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41101&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41101&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41101&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41101&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41101&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41101&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41101&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41101&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41101&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41101&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41101&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41101&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41101&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41101&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41101&r=mysqlcfg