ID:               28429
 Updated by:       php-bugs@lists.php.net
 Reported By:      mg at connection-net dot de
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         Unknown/Other Function
 Operating System: Gentoo Linux
 PHP Version:      5.0.0RC2
 Assigned To:      sas
 New Comment:

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


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

[2005-03-06 22:10:19] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



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

[2004-05-18 21:55:58] [EMAIL PROTECTED]

Assigning to the maintainer, sascha.

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

[2004-05-18 11:56:01] mg at connection-net dot de

it seems to be some problem with the fe.hostname in fam.c, when
commented out, it does not crash anymore. Fam version is  2.7.0.

--- fam.c~      2004-05-18 11:52:39.564138166 +0200
+++ fam.c       2004-05-18 11:52:39.581135676 +0200
@@ -424,8 +424,8 @@
                RETURN_FALSE;

        array_init(return_value);
-       if (fe.hostname)
-               add_assoc_string(return_value, "hostname", fe.hostname,
1);
+//     if (fe.hostname)
+//             add_assoc_string(return_value, "hostname", fe.hostname,
1);
        add_assoc_string(return_value, "filename", fe.filename, 1);
        add_assoc_long(return_value, "code", fe.code);
 }

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

[2004-05-18 11:49:47] mg at connection-net dot de

Description:
------------
php cli crashes when accessing the filenames of a FAM event.



Reproduce code:
---------------
        while (fam_pending($this->fam)) {
            $event = fam_next_event($this->fam);
            $code = $event["code"];
            $filename = $event["filename"];
            if (($code == FAMCreated) || ($code == 8) || ($code == 1))
{
               $tmp = "Test";
               if ($filename == $tmp) echo "1";
             }
         }

Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 28225)]
0x4061a37b in strlen () from /lib/libc.so.6
(gdb) bt
#0  0x4061a37b in strlen () from /lib/libc.so.6
#1  0x081e11f3 in add_assoc_string_ex (arg=0x40a8c863,
    key=0x40a8c863 <Address 0x40a8c863 out of bounds>,
key_len=1084803171,
    str=0x40a8c863 <Address 0x40a8c863 out of bounds>,
duplicate=1082028080)
    at /usr/src/php-5.0.0RC2/Zend/zend_API.c:794
#2  0x080a2a04 in zif_fam_next_event (ht=1084803171,
return_value=0x40a8c863, this_ptr=0x0,
    return_value_used=1) at /usr/src/php-5.0.0RC2/ext/fam/fam.c:428
#3  0x081fe81a in zend_do_fcall_common_helper (execute_data=0xbfffccb0,
opline=0x407e7014,
    op_array=0x407e5114) at
/usr/src/php-5.0.0RC2/Zend/zend_execute.c:2699
#4  0x081fb599 in execute (op_array=0x407e5114)
    at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:1391
#5  0x081fe60c in zend_do_fcall_common_helper (execute_data=0xbfffd030,
opline=0x407df938,
    op_array=0x407de9b4) at
/usr/src/php-5.0.0RC2/Zend/zend_execute.c:2728
#6  0x081fb599 in execute (op_array=0x407de9b4)
    at /usr/src/php-5.0.0RC2/Zend/zend_execute.c:1391
#7  0x081dfbe4 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
    at /usr/src/php-5.0.0RC2/Zend/zend.c:1058
#8  0x081accad in php_execute_script (primary_file=0xbffff3e0)
    at /usr/src/php-5.0.0RC2/main/main.c:1630
#9  0x08207106 in main (argc=2, argv=0xbffff464)
    at /usr/src/php-5.0.0RC2/sapi/cli/php_cli.c:943
#10 0x405b8dcc in __libc_start_main () from /lib/libc.so.6


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


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

Reply via email to