php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8243 session_decode() causes SIGSEGV
Submitted: 2000-12-13 19:04 UTC Modified: 2000-12-14 06:46 UTC
From: martin at netconfigs dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.1pl2 OS: Linux2.2.16(SuSE7)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: martin at netconfigs dot com
New email:
PHP Version: OS:

 

 [2000-12-13 19:04 UTC] martin at netconfigs dot com
.htaccess:
php_flag register_globals off
php_value session.save_path _sessions

php-script:
<script language=php>
        session_start();
        session_decode('selfas|s:4:"5089";');
</script>

backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x401b2817 in _efree () at zend_alloc.c:281
281     zend_alloc.c: No such file or directory.
(gdb) bt
#0  0x401b2817 in _efree () at zend_alloc.c:281
#1  0x4020ca1a in php_rshutdown_session_globals () at session.c:1282
#2  0x4020cafc in php_rshutdown_session () at session.c:1287
#3  0x401cb2cd in module_registry_cleanup () at zend_API.c:758
#4  0x401ce7fa in zend_hash_apply () at zend_hash.c:639
#5  0x401ca6e9 in zend_deactivate_modules () at zend.c:253
#6  0x401da611 in php_request_shutdown () at main.c:581
#7  0x401d7f4b in php_apache_request_shutdown (dummy=0x0) at mod_php4.c:301
#8  0x80513f1 in run_cleanups ()
#9  0x804f963 in ap_clear_pool ()
#10 0x804f9e7 in ap_destroy_pool ()
#11 0x8060a83 in child_main ()
#12 0x8060be5 in make_child ()
#13 0x8060d66 in startup_children ()
#14 0x80613dd in standalone_main ()
#15 0x8061c0c in main ()
#16 0x400c5a8e in __libc_start_main () at ../sysdeps/generic/libc-start.c:93


Also tried:
1) giving session_decode() an empty string;
2) not calling session_start()

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-14 03:53 UTC] stas@php.net
Doesn't happen on latest version. Please try a snapshot from
snaps.php.net and report if it still crashes.
 [2000-12-14 06:43 UTC] martin at netconfigs dot com
okay - tested it against 'PHP Version 4.0.5-dev' and it nolonger crashes

I have also tested the other bug (#8226) which I submitted a few hours earlier and it also seems to work fine now without the use of a workaround. - Well done.

Question: Since the pages that I am developing will be loaded onto a public server which is not under my control, I will need to ask them to upgrade.  When will these fixes find their way into a proper release ?
 [2000-12-14 06:46 UTC] stas@php.net
User reposrts as fixed.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 23:01:27 2025 UTC