php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5186 Certain combinations of session actions lead to segfault
Submitted: 2000-06-22 06:36 UTC Modified: 2000-09-04 19:55 UTC
From: mnc at firmseek dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0.0 Release OS: RH Linux 6.1, HP-UX 10.20
Private report: No CVE-ID: None
 [2000-06-22 06:36 UTC] mnc at firmseek dot com
Here's code that reliably causes a segfault on all of our servers (as well as those of another user on the PHP-general mailing list). You may need to run it twice (so the session variable exists on disk) to generate the crash.

<?

function crash()
{
  global $x, $HTTP_SESSION_VARS;
  session_start();
  session_register('x');
  $x++;
}

crash();
print "value is $x";

?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-27 21:23 UTC] jalal@php.net
<?
function crash()
{
  global $x;
  global $HTTP_SESSION_VARS;
  session_start();
  session_register('x');
  $x++;
}
crash();
print "value is $x";
?> 

This causes a crash here, but by commenting out the 
$HTTP_SESSION_VARS, it no longer crashes.
Is this something that needs looking into?
Or does it come under the heading of wrong usage?

 [2000-07-27 22:23 UTC] waldschrott@php.net
doesn?t crash me on register_globals=off,tracking_vars=on
(win32), I assume, you?re both running on register_globals=on ?
 [2000-09-04 19:55 UTC] sniper@php.net
Can not reproduce this crash with latest CVS. 
Please reopen this bug report if problem still exists with php4.0.2 or 
latest CVS or snapshot from http://snaps.php.net/ 
and include a bactrace of the crash.

(Andr?: Why was this set to Suspended?)

--Jani
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 19:00:01 2026 UTC