ID:               46444
 User updated by:  hostmaster at uuism dot net
 Reported By:      hostmaster at uuism dot net
-Status:           Feedback
+Status:           Open
 Bug Type:         Session related
 Operating System: Fedora Core 4
 PHP Version:      5.2CVS-2008-10-31
 New Comment:

I've never done this.  Is this what you need?

First, I ran the test and got a core dump.

#gdb sapi/cli/php core.29958
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1

Reading symbols from xxxxx...done.
Loaded symbols for xxxxx
[repeated many times]
Core was generated by `sapi/cli/php -d output_handler= -d open_basedir=
-d safe_mode=0 -d disable_func'.
Program terminated with signal 11, Segmentation fault.
#0  php_session_start () at
/usr/local/src/php5.2-200810312330/ext/session/session.c:621
621             if (PG(register_long_arrays)) {

(gdb) bt
#0  php_session_start () at
/usr/local/src/php5.2-200810312330/ext/session/session.c:621
#1  0x08190520 in zif_session_start (ht=0, return_value=0xb7c361ec,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
    at /usr/local/src/php5.2-200810312330/ext/session/session.c:1824
#2  0x082b8f5a in zend_do_fcall_common_helper_SPEC
(execute_data=0xbffb612c)
    at /usr/local/src/php5.2-200810312330/Zend/zend_vm_execute.h:200
#3  0x082a894f in execute (op_array=0xb7c366b4) at
/usr/local/src/php5.2-200810312330/Zend/zend_vm_execute.h:92
#4  0x08287eb0 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
    at /usr/local/src/php5.2-200810312330/Zend/zend.c:1134
#5  0x08240d23 in php_execute_script (primary_file=0xbffb8528) at
/usr/local/src/php5.2-200810312330/main/main.c:2011
#6  0x0831013b in main (argc=59, argv=0xbffb8644) at
/usr/local/src/php5.2-200810312330/sapi/cli/php_cli.c:1134


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

[2008-11-01 12:51:16] [EMAIL PROTECTED]

Since it does not crash for me, can you provide a GDB backtrace of 
the crash?

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

[2008-11-01 04:14:29] hostmaster at uuism dot net

This test still produces a crash with php5.2-200810312330.

Thanks for looking into this problem.

Jim

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

[2008-10-31 23:12:49] hostmaster at uuism dot net

Description:
------------
when I run test ext/session/tests/016.phpt, I still get a core dump
with PHP 5.2.6 and FC4 and Linux Kernel 2.6.20.1.  The script run-tests
puts FAIL in front of the description.  

This same problem was reported in Bug #43361 invalid session.save_path
test cause php crash 

Here are the results:

# TEST_PHP_EXECUTABLE=sapi/cli/php sapi/cli/php run-tests.php
ext/session/tests/016.phpt

=====================================================================
PHP         : sapi/cli/php
PHP_SAPI    : cli
PHP_VERSION : 5.2.6
ZEND_VERSION: 2.2.0
PHP_OS      : Linux - Linux host.uuserver.net 2.6.20.1 #16 SMP Thu Nov
8 14:19:44 EST 2007 i686
INI actual  : /usr/local/src/php-5.2.6/sapi/cli/php.ini
More .INIs  : /etc/php.d/mysql.ini,/etc/php.d/mysqli.ini
CWD         : /usr/local/src/php-5.2.6
Extra dirs  :
=====================================================================
Running selected tests.
FAIL invalid session.save_path should not cause a segfault
[ext/session/tests/016.phpt]
=====================================================================
Number of tests :    1                 1
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    1 (100.0%) (100.0%)
Tests passed    :    0 (  0.0%) (  0.0%)
---------------------------------------------------------------------
Time taken      :    1 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
invalid session.save_path should not cause a segfault
[ext/session/tests/016.phpt]
=====================================================================


Reproduce code:
---------------
--INI--
session.save_path="123;:/really\\completely:::/invalid;;,23123;213"
session.use_cookies=0
session.cache_limiter=
session.save_handler=files
session.serialize_handler=php
--FILE--
<?php
error_reporting(E_ALL);

@session_start();
$HTTP_SESSION_VARS["test"] = 1;
@session_write_close();
print "I live\n";
?>


Expected result:
----------------
no core dump

Actual result:
--------------
core dump




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


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

Reply via email to