ID: 24592 Updated by: [EMAIL PROTECTED] Reported By: jhuston at cs dot umn dot edu -Status: Verified +Status: Closed Bug Type: Session related Operating System: Sparc Solaris 9 PHP Version: 4.3.3RC2-dev, 5.0.0b2-dev New Comment:
This bug has been fixed in CVS. In case this was a PHP problem, 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/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2003-07-21 02:09:12] [EMAIL PROTECTED] Only happens when register_globals=Off Simplest script: <?php session_start(); $foo = $_SESSION['foo']; $bar = $_SESSION['bar']; $_SESSION['foo'] = $foo; $_SESSION['bar'] = $bar; ?> And run with e.g. "sapi/cli/php -n test.php" ------------------------------------------------------------------------ [2003-07-20 23:28:25] jullrich at euclidian dot com add on to my prior comment: I get a partial page, not an empty page. configure: '--with-apxs=/usr/local/apache/bin/apxs' \ '--sysconfdir=/etc' \ '--with-config-file-path=/etc' \ '--with-openssl' \ '--with-zlib' \ '--with-curl=../curl-7.10.2' \ '--with-gd' \ '--with-ttf' \ '--with-gettext' \ '--with-mysql' \ '--enable-trans-sid' \ '--enable-sockets' \ '--enable-wddx' \ '--with-pspell' \ I am not using the RedHat supplied apache/php rpms but compile them myself with MySQL 4.0 rpms. ------------------------------------------------------------------------ [2003-07-20 23:26:30] jullrich at euclidian dot com Interestingly, I am getting the same (similar?) bug on a Linux system (RedHat 7.3) with apache 1.3 and php 4.3.2. My stack trace from gdb: #0 0x403271a1 in _efree (ptr=0x403d01e4) at /usr/local/src/php-4.3.2/Zend/zend_alloc.c:259 #1 0x40294b7a in migrate_global (ht=0x81cbe5c, pos=0xbffff028) at /usr/local/src/php-4.3.2/ext/session/session.c:640 #2 0x40294c69 in php_session_save_current_state () at /usr/local/src/php-4.3.2/ext/session/session.c:670 #3 0x40297192 in php_session_flush () at /usr/local/src/php-4.3.2/ext/session/session.c:1591 #4 0x402971b7 in zm_deactivate_session (type=1, module_number=26) at /usr/local/src/php-4.3.2/ext/session/session.c:1605 #5 0x40338681 in module_registry_cleanup (module=0x80bb0a0) at /usr/local/src/php-4.3.2/Zend/zend_API.c:1167 #6 0x4033a410 in zend_hash_apply (ht=0x403d0560, apply_func=0x40338654 <module_registry_cleanup>) at /usr/local/src/php-4.3.2/Zend/zend_hash.c:688 #7 0x403358d6 in zend_deactivate_modules () at /usr/local/src/php-4.3.2/Zend/zend.c:634 #8 0x4030da19 in php_request_shutdown (dummy=0x0) at /usr/local/src/php-4.3.2/main/main.c:971 #9 0x4034fa91 in apache_php_module_main (r=0x811365c, display_source_mode=0) at /usr/local/src/php-4.3.2/sapi/apache/sapi_apache.c:60 #10 0x4035060e in send_php (r=0x811365c, display_source_mode=0, filename=0x0) at /usr/local/src/php-4.3.2/sapi/apache/mod_php4.c:617 #11 0x40350662 in send_parsed_php (r=0x811365c) at /usr/local/src/php-4.3.2/sapi/apache/mod_php4.c:632 #12 0x08054813 in ap_invoke_handler () #13 0x08069c6b in process_request_internal () #14 0x08069ccc in ap_process_request () #15 0x08060a69 in child_main () #16 0x08060c38 in make_child () #17 0x08060dac in startup_children () #18 0x08061424 in standalone_main () #19 0x08061ca3 in main () #20 0x400ab657 in __libc_start_main (main=0x80618e0 <main>, argc=2, ubp_av=0xbffffb64, init=0x804ec74 <_init>, fini=0x80814e0 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xbffffb5c) at ../sysdeps/generic/libc-start.c:129 (gdb) quit ------------------------------------------------------------------------ [2003-07-15 12:49:17] jhuston at cs dot umn dot edu I did the following configure line with fresh snapshot with debug enabled. Hopefully, this will pinpoint the problem even better. ./configure --disable-all --disable-cgi --enable-debug --enable-session Running php on test.php: [EMAIL PROTECTED] php4-STABLE-200307151730]# sapi/cli/php -n test.php It didn't crash at all yet. [Tue Jul 15 12:45:46 2003] Script: 'test.php' --------------------------------------- /home/src/php4-STABLE-200307151730/ext/session/session.c(640) : Block 0x0018A5E8 status: Beginning: Overrun (magic=0x000000B4, expected=0x7312F8DC) Segmentation fault backtrace on gdb: (gdb) run -n test.php Starting program: /home/src/php4-STABLE-200307151730/sapi/cli/php -n test.php It didn't crash at all yet. [Tue Jul 15 12:46:47 2003] Script: 'test.php' --------------------------------------- /home/src/php4-STABLE-200307151730/ext/session/session.c(640) : Block 0x0018A5E8 status: Beginning: Overrun (magic=0x000000B4, expected=0x7312F8DC) Program received signal SIGSEGV, Segmentation fault. 0xff1f04f8 in memcpy () from /usr/platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1 (gdb) bt #0 0xff1f04f8 in memcpy () from /usr/platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1 #1 0x10813c in _mem_block_check (ptr=0x18a610, silent=0, __zend_filename=0x144410 "/home/src/php4-STABLE-200307151730/ext/session/session.c", __zend_lineno=640, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /home/src/php4-STABLE-200307151730/Zend/zend_alloc.c:675 #2 0x1080f4 in _mem_block_check (ptr=0x18a610, silent=1, __zend_filename=0x144410 "/home/src/php4-STABLE-200307151730/ext/session/session.c", __zend_lineno=640, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /home/src/php4-STABLE-200307151730/Zend/zend_alloc.c:667 #3 0x106c88 in _efree (ptr=0x18a610, __zend_filename=0x144410 "/home/src/php4-STABLE-200307151730/ext/session/session.c", __zend_lineno=640, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /home/src/php4-STABLE-200307151730/Zend/zend_alloc.c:243 #4 0x243f8 in migrate_global (ht=0x1bce50, pos=0xffbfefe4) at /home/src/php4-STABLE-200307151730/ext/session/session.c:640 #5 0x245bc in php_session_save_current_state () at /home/src/php4-STABLE-200307151730/ext/session/session.c:670 #6 0x28494 in php_session_flush () at /home/src/php4-STABLE-200307151730/ext/session/session.c:1593 #7 0x284e4 in zm_deactivate_session (type=1, module_number=2) at /home/src/php4-STABLE-200307151730/ext/session/session.c:1607 #8 0x12660c in module_registry_cleanup (module=0x1ad328) at /home/src/php4-STABLE-200307151730/Zend/zend_API.c:1167 #9 0x12a928 in zend_hash_apply (ht=0x18ba78, apply_func=0x12659c <module_registry_cleanup>) at /home/src/php4-STABLE-200307151730/Zend/zend_hash.c:688 #10 0x1214b8 in zend_deactivate_modules () at /home/src/php4-STABLE-200307151730/Zend/zend.c:651 #11 0xccaf4 in php_request_shutdown (dummy=0x0) at /home/src/php4-STABLE-200307151730/main/main.c:981 #12 0x142f48 in main (argc=3, argv=0xffbff5d4) at /home/src/php4-STABLE-200307151730/sapi/cli/php_cli.c:874 ------------------------------------------------------------------------ [2003-07-15 10:56:14] jhuston at cs dot umn dot edu I've also tried GCC 3.2 on Sun Solaris 5.8 and got the same results. [EMAIL PROTECTED] (~/php4-STABLE-200307151530) % sapi/cli/php -n ../test.php It didn't crash at all yet. Bus error [EMAIL PROTECTED] (~/php4-STABLE-200307151530) % gcc -v Reading specs from /soft/gcc-3.2/SunOS5.8/lib/gcc-lib/sparc-sun-solaris2.8/3.2/specs Configured with: ./configure --prefix=/soft/gcc-3.2 --exec-prefix=/soft/gcc-3.2/SunOS5.8 Thread model: posix gcc version 3.2 [EMAIL PROTECTED] (~/php4-STABLE-200307151530) % uname -a SunOS thufir 5.8 Generic_108528-11 sun4u sparc ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/24592 -- Edit this bug report at http://bugs.php.net/?id=24592&edit=1
