ID:               16995
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Analyzed
 Bug Type:         Session related
 Operating System: Linux
 PHP Version:      4.2.0
 New Comment:

Another form of $_SESSION related crash.


Previous Comments:
------------------------------------------------------------------------

[2002-05-03 11:59:12] [EMAIL PROTECTED]

This appeared first in 4.1.0, 4.0.6 is ok.

------------------------------------------------------------------------

[2002-05-03 11:57:47] [EMAIL PROTECTED]

<?php
    session_register( "_SESSION" );
    $_SESSION = "kk";
?>

backtrace:

#0  0x08189910 in zend_hash_get_current_key_ex (ht=0x82d5654, 
    str_index=0xbfffe984, str_length=0xbfffe980, num_index=0xbfffe97c,

    duplicate=0 '\000', pos=0xbfffe988) at zend_hash.c:1035

#1  0x080fed0e in php_session_save_current_state ()
#2  0x08101855 in php_session_flush ()
#3  0x08101895 in zm_deactivate_session ()
#4  0x08186aee in module_registry_cleanup (module=0x8285ed0) at
zend_API.c:1169
#5  0x08188f0a in zend_hash_apply (ht=0x82349a0, 
    apply_func=0x8186aa6 <module_registry_cleanup>) at zend_hash.c:669
#6  0x08183e14 in zend_deactivate_modules () at zend.c:581
#7  0x08077658 in php_request_shutdown ()
#8  0x08075997 in main ()
#9  0x4037a4f2 in __libc_start_main () from /lib/libc.so.6

The problem however appears earlier.
It seems that the zval structure ps_globals.http_session_vars points at
is freed and allocated elsewhere, but ps_globals.http_session_vars
points to the old location, so when it comes to
php_session_save_current_state (#1),
Z_ARRVAL_P(PS(http_session_vars)) holds some meaningless value.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=16995&edit=1

Reply via email to