PHP 4.0 Bug #2945: sessions segfault ever since Dec.4th (CVS rev.1.70)

From: Date: Thu, 09 Dec 1999 18:15:33 +0000
Subject: PHP 4.0 Bug #2945: sessions segfault ever since Dec.4th (CVS rev.1.70)
Groups: php.dev 
Request: Send a blank email to php-dev+get-13525@lists.php.net to get a copy of this message
From: hholzgra@media-engineering.de Operating system: RedHat Linux 6.x PHP version: 4.0 Latest CVS (09/12/1999) PHP Bug Type: Reproduceable crash Bug description: sessions segfault ever since Dec.4th (CVS rev.1.70) <? session_start(); session_register("session_global"); print "hallo"; ?> i have tracked it down to line 174 in ext/session/session.c 173 if (PG(gpc_globals)) { 174 zend_set_hash_symbol(state_val_copy, name, namelen, 0, 1, PS(http_state_vars)->value.ht); 175 } problem is that PS(http_state_vars) ( really: ps_globals.http_state_vars ) is a NULL pointer (gdb) bt produces the following: #0 0x80b59b9 in php_set_session_var (name=0x8243090 "session_global", namelen=14, state_val=0x8243050) at session.c:174 #1 0x80b5d1e in _ps_srlzr_decode_php (val=0x8242fe8 "session_global|a:1:{s:14:\"folder_refresh\";i:600;}", vallen=49) at session.c:238 #2 0x80b5f1d in _php_session_decode (val=0x8242fe8 "session_global|a:1:{s:14:\"folder_refresh\";i:600;}", vallen=49) at session.c:350 #3 0x80b6110 in _php_session_initialize () at session.c:405 #4 0x80b66a0 in _php_session_start () at session.c:607 #5 0x80b6fa5 in php3_session_register (ht=1, return_value=0xbffff5e4, list=0x8203810, plist=0x820383c, this_ptr=0x0, return_value_used=0) at session.c:816 #6 0x80e7f62 in execute (op_array=0x823c8f8) at zend_execute.c:1476 #7 0x808b95d in php_execute_script (primary_file=0xbffff7c4) at main.c:1274 #8 0x80a1780 in apache_php_module_main (r=0x82397d4, fd=24, display_source_mode=0) at sapi_apache.c:88 #9 0x808a1d8 in send_php (r=0x82397d4, display_source_mode=0, filename=0x823a2ac "/home/hholzgra/public_html/session.php") at mod_php4.c:355 #10 0x808a20b in send_parsed_php (r=0x82397d4) at mod_php4.c:367 #11 0x80eea83 in ap_invoke_handler () #12 0x8101db9 in process_request_internal () #13 0x8101e1c in ap_process_request () #14 0x80f979e in child_main () #15 0x80f992c in make_child () #16 0x80f9a89 in startup_children () #17 0x80fa0b6 in standalone_main () #18 0x80fa833 in main () #19 0x40120cb3 in __libc_start_main (main=0x80fa4fc <main>, argc=2, argv=0xbffff984, init=0x8066a1c <_init>, fini=0x817587c <_fini>, rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffff97c) at ../sysdeps/generic/libc-start.c:78 it seems that any combination of --enable-/--disable-track-vars and track_vars = On/Off makes no difference configured with ./configure --with-apache=../../apache_1.3.9_php4cvs --with-mysql --with-imap --disable-inline php.ini looks like: [PHP] engine = On short_open_tag = On asp_tags = Off precision = 14 y2k_compliance = Off safe_mode = Off highlight.string = #DD0000 highlight.comment = #FF8000 highlight.keyword = #007700 highlight.bg = #FFFFFF highlight.default = #0000BB highlight.html = #000000 allow_builtin_links = Off max_execution_time = 30 memory_limit = 8388608 error_reporting = 7 display_errors = On log_errors = Off track_errors = On warn_plus_overloading = Off magic_quotes_gpc = Off magic_quotes_runtime = Off magic_quotes_sybase = Off track_vars = Off [Syslog] define_syslog_variables = Off [mail function] SMTP = localhost sendmail_from = me@localhost.com sendmail_path = /usr/lib/sendmail -t [Debugger] debugger.host = localhost debugger.port = 7869 debugger.enabled = False [SQL] sql.safe_mode = Off [MySQL] mysql.allow_persistent = On mysql.max_persistent = -1 mysql.max_links = -1 [Session] session.save_handler = files session.save_path = /tmp session.name = PHPSESSID session.auto_start = 0 session.lifetime = 0 session.serialize_handler = php session.gc_probability = 10 session.gc_maxlifetime = 1800

« previous php.dev (#13525) next »