[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2008-02-20 Thread changelog
changelog   Thu Feb 21 01:31:36 2008 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2964r2=1.2965diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2964 php-src/ChangeLog:1.2965
--- php-src/ChangeLog:1.2964Wed Feb 20 01:31:28 2008
+++ php-src/ChangeLog   Thu Feb 21 01:31:36 2008
@@ -1,3 +1,135 @@
+2008-02-20  Felipe Pena  [EMAIL PROTECTED]
+
+* ext/pcre/php_pcre.c
+  ext/pcre/php_pcre.c:
+  MFB: Fixed Bug #44191 (preg_grep messes up array index)
+
+* (PHP_5_2)
+  NEWS
+  ext/pcre/php_pcre.c:
+  Fixed Bug #44191 (preg_grep messes up array index)
+
+* ext/pcre/tests/bug44191.phpt
+  ext/pcre/tests/bug44191.phpt:
+  New test
+
+* ext/pcre/tests/bug44191.phpt
+  ext/pcre/tests/bug44191.phpt
+  ext/pcre/tests/bug44191.phpt:
+1.1.4;
+  file bug44191.phpt was initially added on branch PHP_5_2.
+
+2008-02-20  Andrey Hristov  [EMAIL PROTECTED]
+
+* ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt
+  ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt:
+  Fix test. Now passes.
+
+2008-02-20  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  ext/standard/syslog.c:
+  
+  MFB: Fixed bug #44152 (Possible crash with syslog logging on ZTS builds).
+
+* ext/standard/syslog.c:
+  
+  MFB: Fixed a possible crash with syslog logging on ZTS builds
+
+* (PHP_5_3)
+  ext/standard/syslog.c:
+  Fixed a possible crash with syslog logging on ZTS builds
+
+2008-02-20  Andrey Hristov  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/mysqlnd/mysqlnd_debug.c
+  ext/mysqlnd/mysqlnd_result.c
+  ext/mysqlnd/mysqlnd_result.c
+  ext/mysqlnd/mysqlnd_wireprotocol.c
+  ext/mysqlnd/mysqlnd_wireprotocol.c
+  ext/mysqlnd/mysqlnd_wireprotocol.h
+  ext/mysqlnd/mysqlnd_wireprotocol.h:
+  Fix memory leak
+
+2008-02-20  Josie Messa  [EMAIL PROTECTED]
+
+* ext/standard/tests/array/current_basic.phpt
+  ext/standard/tests/array/current_basic.phpt
+  ext/standard/tests/array/current_error.phpt
+  ext/standard/tests/array/current_error.phpt
+  ext/standard/tests/array/current_variation1.phpt
+  ext/standard/tests/array/current_variation1.phpt
+  ext/standard/tests/array/current_variation2.phpt
+  ext/standard/tests/array/current_variation2.phpt
+  ext/standard/tests/array/current_variation3.phpt
+  ext/standard/tests/array/current_variation3.phpt
+  ext/standard/tests/array/current_variation4.phpt
+  ext/standard/tests/array/current_variation4.phpt:
+  - New tests for current() function
+
+* ext/standard/tests/array/current_basic.phpt
+  ext/standard/tests/array/current_basic.phpt
+  ext/standard/tests/array/current_basic.phpt
+  ext/standard/tests/array/current_error.phpt
+  ext/standard/tests/array/current_error.phpt
+  ext/standard/tests/array/current_error.phpt
+  ext/standard/tests/array/current_variation1.phpt
+  ext/standard/tests/array/current_variation1.phpt
+  ext/standard/tests/array/current_variation1.phpt
+  ext/standard/tests/array/current_variation2.phpt
+  ext/standard/tests/array/current_variation2.phpt
+  ext/standard/tests/array/current_variation2.phpt
+  ext/standard/tests/array/current_variation3.phpt
+  ext/standard/tests/array/current_variation3.phpt
+  ext/standard/tests/array/current_variation3.phpt
+  ext/standard/tests/array/current_variation4.phpt
+  ext/standard/tests/array/current_variation4.phpt
+  ext/standard/tests/array/current_variation4.phpt:
+1.1.4;
+  file current_basic.phpt was initially added on branch PHP_5_2.
+
+2008-02-20  Dmitry Stogov  [EMAIL PROTECTED]
+
+* ZendEngine2/tests/bug44184.phpt
+  ZendEngine2/tests/bug44184.phpt
+  ZendEngine2/tests/bug44184.phpt:
+1.1.4;
+  file bug44184.phpt was initially added on branch PHP_5_2.
+
+* (PHP_5_2)
+  NEWS
+  ZendEngine2/zend_compile.c
+  ZendEngine2/zend_compile.c
+  ZendEngine2/zend_compile.c
+  ZendEngine2/zend_vm_def.h
+  ZendEngine2/zend_vm_def.h
+  ZendEngine2/zend_vm_def.h
+  ZendEngine2/zend_vm_execute.h
+  ZendEngine2/zend_vm_execute.h
+  ZendEngine2/zend_vm_execute.h
+  ZendEngine2/tests/bug44184.phpt
+  ZendEngine2/tests/bug44184.phpt:
+  Fixed bug #44184 (Double free of loop-variable on exception)
+
+* ZendEngine2/zend_gc.c
+  ZendEngine2/zend_gc.c:
+  Added checks for destoied objects
+
+2008-02-20  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  ext/pdo/pdo_stmt.c
+  ext/pdo/pdo_stmt.c:
+  
+  MFB: Fixed bug #44171 (Invalid FETCH_COLUMN index does not raise an 
error)
+
+* (PHP_5_3)
+  ext/pdo/pdo_stmt.c:
+  Fixed bug #44171 (Invalid FETCH_COLUMN index does not raise an error)
+
 

[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2008-02-20 Thread changelog
changelog   Thu Feb 21 01:31:39 2008 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1245r2=1.1246diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1245 ZendEngine2/ChangeLog:1.1246
--- ZendEngine2/ChangeLog:1.1245Wed Feb 20 01:31:31 2008
+++ ZendEngine2/ChangeLog   Thu Feb 21 01:31:39 2008
@@ -1,3 +1,28 @@
+2008-02-20  Dmitry Stogov  [EMAIL PROTECTED]
+
+* zend_compile.c
+  zend_compile.c
+  zend_compile.c
+  zend_vm_def.h
+  zend_vm_def.h
+  zend_vm_def.h
+  zend_vm_execute.h
+  zend_vm_execute.h
+  zend_vm_execute.h
+  tests/bug44184.phpt
+  tests/bug44184.phpt:
+  Fixed bug #44184 (Double free of loop-variable on exception)
+
+* tests/bug44184.phpt
+  tests/bug44184.phpt
+  tests/bug44184.phpt:
+1.1.4;
+  file bug44184.phpt was initially added on branch PHP_5_2.
+
+* zend_gc.c
+  zend_gc.c:
+  Added checks for destoied objects
+
 2008-02-19  Dmitry Stogov  [EMAIL PROTECTED]
 
 * (PHP_5_3)
@@ -21511,7 +21536,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1245 2008/02/20 01:31:31 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1246 2008/02/21 01:31:39 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -23235,7 +23260,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1245 2008/02/20 01:31:31 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1246 2008/02/21 01:31:39 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/array current_basic.phpt current_error.phpt current_variation1.phpt current_variation2.phpt current_variation3.phpt current_variation4.phpt

2008-02-20 Thread Josie Messa
jmessa  Wed Feb 20 14:19:43 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/array   current_variation3.phpt 
current_variation4.phpt 
current_basic.phpt 
current_error.phpt 
current_variation1.phpt 
current_variation2.phpt 
  Log:
  - New tests for current() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/current_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/array/current_variation3.phpt
+++ php-src/ext/standard/tests/array/current_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/current_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/array/current_variation4.phpt
+++ php-src/ext/standard/tests/array/current_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/current_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/array/current_basic.phpt
+++ php-src/ext/standard/tests/array/current_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/current_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/array/current_error.phpt
+++ php-src/ext/standard/tests/array/current_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/current_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/array/current_variation1.phpt
+++ php-src/ext/standard/tests/array/current_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/current_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/array/current_variation2.phpt
+++ php-src/ext/standard/tests/array/current_variation2.phpt

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array current_basic.phpt current_error.phpt current_variation1.phpt current_variation2.phpt current_variation3.phpt current_variation4.phpt

2008-02-20 Thread Josie Messa
jmessa  Wed Feb 20 14:20:31 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/array   current_variation3.phpt 
current_basic.phpt 
current_variation2.phpt 
current_error.phpt 
current_variation1.phpt 
current_variation4.phpt 
  Log:
  - New tests for current() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/current_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/array/current_variation3.phpt
+++ php-src/ext/standard/tests/array/current_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/current_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/array/current_basic.phpt
+++ php-src/ext/standard/tests/array/current_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/current_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/array/current_variation2.phpt
+++ php-src/ext/standard/tests/array/current_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/current_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/array/current_error.phpt
+++ php-src/ext/standard/tests/array/current_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/current_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/array/current_variation1.phpt
+++ php-src/ext/standard/tests/array/current_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/current_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/array/current_variation4.phpt
+++ php-src/ext/standard/tests/array/current_variation4.phpt

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard/tests/array current_basic.phpt current_error.phpt current_variation1.phpt current_variation2.phpt current_variation3.phpt current_variation4.phpt

2008-02-20 Thread Josie Messa
jmessa  Wed Feb 20 14:21:36 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/array   current_error.phpt 
current_variation1.phpt 
current_variation4.phpt 
current_variation2.phpt 
current_basic.phpt 
current_variation3.phpt 
  Log:
  - New tests for current() function
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/current_error.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/array/current_error.phpt
diff -u /dev/null php-src/ext/standard/tests/array/current_error.phpt:1.2
--- /dev/null   Wed Feb 20 14:21:36 2008
+++ php-src/ext/standard/tests/array/current_error.phpt Wed Feb 20 14:21:36 2008
@@ -0,0 +1,53 @@
+--TEST--
+Test current() function : error conditions - Pass incorrect number of args
+--FILE--
+?php
+/* Prototype  : mixed current(array $array_arg)
+ * Description: Return the element currently pointed to by the internal array 
pointer
+ * Source code: ext/standard/array.c
+ * Alias to functions: pos
+ */
+
+/*
+ * Pass incorrect number of arguments to current() to test behaviour
+ */
+
+echo *** Testing current() : error conditions ***\n;
+
+// Zero arguments
+echo \n-- Testing current() function with Zero arguments --\n;
+var_dump( current() );
+
+//Test current with one more than the expected number of arguments
+echo \n-- Testing current() function with more than expected no. of arguments 
--\n;
+$array_arg = array(1, 2);
+$extra_arg = 10;
+var_dump( current($array_arg, $extra_arg) );
+?
+===DONE===
+--EXPECTF--
+*** Testing current() : error conditions ***
+
+-- Testing current() function with Zero arguments --
+
+Warning: current() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing current() function with more than expected no. of arguments --
+
+Warning: current() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+===DONE===
+--UEXPECTF--
+*** Testing current() : error conditions ***
+
+-- Testing current() function with Zero arguments --
+
+Warning: current() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+-- Testing current() function with more than expected no. of arguments --
+
+Warning: current() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/current_variation1.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/array/current_variation1.phpt
diff -u /dev/null php-src/ext/standard/tests/array/current_variation1.phpt:1.2
--- /dev/null   Wed Feb 20 14:21:36 2008
+++ php-src/ext/standard/tests/array/current_variation1.phptWed Feb 20 
14:21:36 2008
@@ -0,0 +1,342 @@
+--TEST--
+Test current() function : usage variations - Pass different data types as 
$array_arg arg
+--FILE--
+?php
+/* Prototype  : mixed current(array $array_arg)
+ * Description: Return the element currently pointed to by the internal array 
pointer
+ * Source code: ext/standard/array.c
+ * Alias to functions: pos
+ */
+
+/*
+ * Pass different data types as $array_arg argument to current() to test 
behaviour
+ */
+
+echo *** Testing current() : usage variations ***\n;
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+// get a class
+class classA
+{
+   var $var1;
+  public function __toString() {
+return Class A object;
+  }
+}
+
+// heredoc string
+$heredoc = EOT
+hello world
+EOT;
+
+// get a resource variable
+$fp = fopen(__FILE__, r);
+
+// unexpected values to be passed to $array_arg argument
+$inputs = array(
+
+   // int data
+/*1*/  0,
+   1,
+   12345,
+   -2345,
+
+   // float data
+/*5*/  10.5,
+   -10.5,
+   12.3456789000e10,
+   12.3456789000E-10,
+   .5,
+
+   // null data
+/*10*/ NULL,
+   null,
+
+   // boolean data
+/*12*/ true,
+   false,
+   TRUE,
+   FALSE,
+   
+   // empty data
+/*16*/ ,
+   '',
+
+   // string data
+/*18*/ string,
+   'string',
+   $heredoc,
+   
+   // object data
+/*21*/ new classA(),
+
+   // undefined data
+/*22*/ @$undefined_var,
+
+   // unset data
+/*23*/ @$unset_var,
+
+   // resource variable
+/*24*/ $fp
+);
+
+// loop through each element of $inputs to check the behavior of current()
+$iterator = 1;
+foreach($inputs as $input) {
+  echo \n-- Iteration $iterator --\n;
+  var_dump( current($input) );
+  $iterator++;
+};
+
+fclose($fp);
+?
+===DONE===
+--EXPECTF--
+*** Testing current() : usage variations ***
+
+-- Iteration 1 --
+
+Warning: current() expects parameter 1 to be array, integer given in %s on 
line %d
+NULL
+
+-- Iteration 2 --
+
+Warning: current() expects parameter 1 to be array, integer given in %s on 
line %d
+NULL
+
+-- Iteration 3 --
+
+Warning: current() expects parameter 1 to be array, integer given in %s on 
line %d

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd_debug.c mysqlnd_result.c mysqlnd_wireprotocol.c mysqlnd_wireprotocol.h

2008-02-20 Thread Andrey Hristov
andrey  Wed Feb 20 15:18:18 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd_debug.c mysqlnd_result.c 
mysqlnd_wireprotocol.c mysqlnd_wireprotocol.h 
  Log:
  Fix memory leak
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_debug.c?r1=1.1.2.7r2=1.1.2.8diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_debug.c
diff -u php-src/ext/mysqlnd/mysqlnd_debug.c:1.1.2.7 
php-src/ext/mysqlnd/mysqlnd_debug.c:1.1.2.8
--- php-src/ext/mysqlnd/mysqlnd_debug.c:1.1.2.7 Thu Feb 14 15:20:49 2008
+++ php-src/ext/mysqlnd/mysqlnd_debug.c Wed Feb 20 15:18:17 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_debug.c,v 1.1.2.7 2008/02/14 15:20:49 andrey Exp $ */
+/* $Id: mysqlnd_debug.c,v 1.1.2.8 2008/02/20 15:18:17 andrey Exp $ */
 
 #include php.h
 #include mysqlnd.h
@@ -303,7 +303,9 @@

  unsigned int line, const char * const file,

  char * func_name, uint func_name_len)
 {
+#ifdef MYSQLND_THREADED
MYSQLND_ZTS(self);
+#endif
if ((self-flags  MYSQLND_DEBUG_DUMP_TRACE) == 0 || self-file_name == 
NULL) {
return FALSE;
}
@@ -349,8 +351,9 @@

  const char * const file)
 {
char *func_name;
+#ifdef MYSQLND_THREADED
MYSQLND_ZTS(self);
-
+#endif
if ((self-flags  MYSQLND_DEBUG_DUMP_TRACE) == 0 || self-file_name == 
NULL) {
return PASS;
}
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_result.c?r1=1.4.2.15r2=1.4.2.16diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_result.c
diff -u php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.15 
php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.16
--- php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.15   Thu Feb 14 12:49:30 2008
+++ php-src/ext/mysqlnd/mysqlnd_result.cWed Feb 20 15:18:17 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_result.c,v 1.4.2.15 2008/02/14 12:49:30 andrey Exp $ */
+/* $Id: mysqlnd_result.c,v 1.4.2.16 2008/02/20 15:18:17 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -336,6 +336,12 @@
result-lengths = NULL;
}
 
+   if (result-row_packet) {
+   DBG_INF(Freeing packet);
+   PACKET_FREE(result-row_packet);
+   result-row_packet = NULL;
+   }
+
DBG_VOID_RETURN;
 }
 /* }}} */
@@ -349,12 +355,6 @@
 
result-m.free_result_buffers(result TSRMLS_CC);
 
-   if (result-row_packet) {
-   DBG_INF(Freeing packet);
-   PACKET_FREE(result-row_packet);
-   result-row_packet = NULL;
-   }
-
if (result-meta) {
result-meta-m-free_metadata(result-meta, FALSE TSRMLS_CC);
result-meta = NULL;
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_wireprotocol.c?r1=1.4.2.10r2=1.4.2.11diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_wireprotocol.c
diff -u php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.4.2.10 
php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.4.2.11
--- php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.4.2.10 Thu Feb 14 14:50:21 2008
+++ php-src/ext/mysqlnd/mysqlnd_wireprotocol.c  Wed Feb 20 15:18:17 2008
@@ -1672,11 +1672,13 @@
 static
 void php_mysqlnd_rowp_free_mem(void *_packet, zend_bool alloca TSRMLS_DC)
 {
+   DBG_ENTER(php_mysqlnd_rowp_free_mem);
php_mysql_packet_row *p= (php_mysql_packet_row *) _packet;
if (p-row_buffer) {
p-row_buffer-free_chunk(p-row_buffer, TRUE TSRMLS_CC);
p-row_buffer = NULL;
}
+   DBG_INF_FMT(alloca=%d persistent=%d, (int)alloca, 
(int)p-header.persistent);
/*
  Don't free packet-fields :
  - normal queries - store_result() | fetch_row_unbuffered() will 
transfer
@@ -1687,6 +1689,7 @@
if (!alloca) {
mnd_pefree(p, p-header.persistent);
}
+   DBG_VOID_RETURN;
 }
 /* }}} */
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_wireprotocol.h?r1=1.4.2.8r2=1.4.2.9diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_wireprotocol.h
diff -u php-src/ext/mysqlnd/mysqlnd_wireprotocol.h:1.4.2.8 
php-src/ext/mysqlnd/mysqlnd_wireprotocol.h:1.4.2.9
--- php-src/ext/mysqlnd/mysqlnd_wireprotocol.h:1.4.2.8  Thu Feb 14 12:49:30 2008
+++ php-src/ext/mysqlnd/mysqlnd_wireprotocol.h  Wed Feb 20 15:18:17 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_wireprotocol.h,v 1.4.2.8 2008/02/14 12:49:30 andrey Exp $ */
+/* $Id: mysqlnd_wireprotocol.h,v 1.4.2.9 2008/02/20 15:18:17 andrey Exp $ */
 
 #ifndef 

[PHP-CVS] cvs: php-src /ext/mysqlnd mysqlnd_result.c mysqlnd_wireprotocol.c mysqlnd_wireprotocol.h

2008-02-20 Thread Andrey Hristov
andrey  Wed Feb 20 15:20:14 2008 UTC

  Modified files:  
/php-src/ext/mysqlndmysqlnd_result.c mysqlnd_wireprotocol.c 
mysqlnd_wireprotocol.h 
  Log:
  Fix memory leak
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_result.c?r1=1.18r2=1.19diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_result.c
diff -u php-src/ext/mysqlnd/mysqlnd_result.c:1.18 
php-src/ext/mysqlnd/mysqlnd_result.c:1.19
--- php-src/ext/mysqlnd/mysqlnd_result.c:1.18   Thu Feb 14 12:51:00 2008
+++ php-src/ext/mysqlnd/mysqlnd_result.cWed Feb 20 15:20:14 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_result.c,v 1.18 2008/02/14 12:51:00 andrey Exp $ */
+/* $Id: mysqlnd_result.c,v 1.19 2008/02/20 15:20:14 andrey Exp $ */
 #include php.h
 #include mysqlnd.h
 #include mysqlnd_wireprotocol.h
@@ -336,6 +336,12 @@
result-lengths = NULL;
}
 
+   if (result-row_packet) {
+   DBG_INF(Freeing packet);
+   PACKET_FREE(result-row_packet);
+   result-row_packet = NULL;
+   }
+
DBG_VOID_RETURN;
 }
 /* }}} */
@@ -349,12 +355,6 @@
 
result-m.free_result_buffers(result TSRMLS_CC);
 
-   if (result-row_packet) {
-   DBG_INF(Freeing packet);
-   PACKET_FREE(result-row_packet);
-   result-row_packet = NULL;
-   }
-
if (result-meta) {
result-meta-m-free_metadata(result-meta, FALSE TSRMLS_CC);
result-meta = NULL;
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_wireprotocol.c?r1=1.12r2=1.13diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_wireprotocol.c
diff -u php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.12 
php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.13
--- php-src/ext/mysqlnd/mysqlnd_wireprotocol.c:1.12 Thu Feb 14 14:48:57 2008
+++ php-src/ext/mysqlnd/mysqlnd_wireprotocol.c  Wed Feb 20 15:20:14 2008
@@ -1672,11 +1672,13 @@
 static
 void php_mysqlnd_rowp_free_mem(void *_packet, zend_bool alloca TSRMLS_DC)
 {
+   DBG_ENTER(php_mysqlnd_rowp_free_mem);
php_mysql_packet_row *p= (php_mysql_packet_row *) _packet;
if (p-row_buffer) {
p-row_buffer-free_chunk(p-row_buffer, TRUE TSRMLS_CC);
p-row_buffer = NULL;
}
+   DBG_INF_FMT(alloca=%d persistent=%d, (int)alloca, 
(int)p-header.persistent);
/*
  Don't free packet-fields :
  - normal queries - store_result() | fetch_row_unbuffered() will 
transfer
@@ -1687,6 +1689,7 @@
if (!alloca) {
mnd_pefree(p, p-header.persistent);
}
+   DBG_VOID_RETURN;
 }
 /* }}} */
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_wireprotocol.h?r1=1.9r2=1.10diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_wireprotocol.h
diff -u php-src/ext/mysqlnd/mysqlnd_wireprotocol.h:1.9 
php-src/ext/mysqlnd/mysqlnd_wireprotocol.h:1.10
--- php-src/ext/mysqlnd/mysqlnd_wireprotocol.h:1.9  Thu Feb 14 12:51:00 2008
+++ php-src/ext/mysqlnd/mysqlnd_wireprotocol.h  Wed Feb 20 15:20:14 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_wireprotocol.h,v 1.9 2008/02/14 12:51:00 andrey Exp $ */
+/* $Id: mysqlnd_wireprotocol.h,v 1.10 2008/02/20 15:20:14 andrey Exp $ */
 
 #ifndef MYSQLND_WIREPROTOCOL_H
 #define MYSQLND_WIREPROTOCOL_H
@@ -42,11 +42,13 @@
packet = (c_type) pecalloc(1, 
packet_methods[(enum_type)].struct_size, (pers)); \
((c_type) (packet))-header.m = packet_methods[(enum_type)]; \
((c_type) (packet))-header.persistent = (pers); \
+   DBG_INF_FMT(PACKET_INIT(%p, %d, %d), packet, (int) enum_type, 
(int) pers); \
}
 #define PACKET_WRITE(packet, conn) 
((packet)-header.m-write_to_net((packet), (conn) TSRMLS_CC))
 #define PACKET_READ(packet, conn)  
((packet)-header.m-read_from_net((packet), (conn) TSRMLS_CC))
 #define PACKET_FREE(packet) \
do { \
+   DBG_INF_FMT(PACKET_FREE(%p), packet); \
((packet)-header.m-free_mem((packet), FALSE TSRMLS_CC)); \
} while (0);
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard syslog.c

2008-02-20 Thread Ilia Alshanetsky
iliaa   Wed Feb 20 15:27:30 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   syslog.c 
  Log:
  Fixed a possible crash with syslog logging on ZTS builds
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/syslog.c?r1=1.49.2.3.2.2.2.1r2=1.49.2.3.2.2.2.2diff_format=u
Index: php-src/ext/standard/syslog.c
diff -u php-src/ext/standard/syslog.c:1.49.2.3.2.2.2.1 
php-src/ext/standard/syslog.c:1.49.2.3.2.2.2.2
--- php-src/ext/standard/syslog.c:1.49.2.3.2.2.2.1  Mon Dec 31 07:17:15 2007
+++ php-src/ext/standard/syslog.c   Wed Feb 20 15:27:30 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: syslog.c,v 1.49.2.3.2.2.2.1 2007/12/31 07:17:15 sebastian Exp $ */
+/* $Id: syslog.c,v 1.49.2.3.2.2.2.2 2008/02/20 15:27:30 iliaa Exp $ */
 
 #include php.h
 
@@ -110,6 +110,7 @@
} else {
BG(syslog_started)=0;
}
+   BG(syslog_device) = NULL;
return SUCCESS;
 }
 
@@ -126,6 +127,7 @@
 {
if (BG(syslog_device)) {
free(BG(syslog_device));
+   BG(syslog_device) = NULL;
}
return SUCCESS;
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard syslog.c

2008-02-20 Thread Ilia Alshanetsky
iliaa   Wed Feb 20 15:27:47 2008 UTC

  Modified files:  
/php-src/ext/standard   syslog.c 
  Log:
  
  MFB: Fixed a possible crash with syslog logging on ZTS builds
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/syslog.c?r1=1.57r2=1.58diff_format=u
Index: php-src/ext/standard/syslog.c
diff -u php-src/ext/standard/syslog.c:1.57 php-src/ext/standard/syslog.c:1.58
--- php-src/ext/standard/syslog.c:1.57  Mon Dec 31 07:12:16 2007
+++ php-src/ext/standard/syslog.c   Wed Feb 20 15:27:47 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: syslog.c,v 1.57 2007/12/31 07:12:16 sebastian Exp $ */
+/* $Id: syslog.c,v 1.58 2008/02/20 15:27:47 iliaa Exp $ */
 
 #include php.h
 
@@ -110,6 +110,7 @@
} else {
BG(syslog_started)=0;
}
+   BG(syslog_device) = NULL;
return SUCCESS;
 }
 /* }}} */
@@ -127,6 +128,7 @@
 {
if (BG(syslog_device)) {
free(BG(syslog_device));
+   BG(syslog_device) = NULL;
}
return SUCCESS;
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard syslog.c

2008-02-20 Thread Ilia Alshanetsky
iliaa   Wed Feb 20 15:28:38 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   syslog.c 
/php-srcNEWS 
  Log:
  
  MFB: Fixed bug #44152 (Possible crash with syslog logging on ZTS builds). 
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/syslog.c?r1=1.49.2.3.2.3r2=1.49.2.3.2.4diff_format=u
Index: php-src/ext/standard/syslog.c
diff -u php-src/ext/standard/syslog.c:1.49.2.3.2.3 
php-src/ext/standard/syslog.c:1.49.2.3.2.4
--- php-src/ext/standard/syslog.c:1.49.2.3.2.3  Mon Dec 31 07:20:13 2007
+++ php-src/ext/standard/syslog.c   Wed Feb 20 15:28:37 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: syslog.c,v 1.49.2.3.2.3 2007/12/31 07:20:13 sebastian Exp $ */
+/* $Id: syslog.c,v 1.49.2.3.2.4 2008/02/20 15:28:37 iliaa Exp $ */
 
 #include php.h
 
@@ -110,6 +110,7 @@
} else {
BG(syslog_started)=0;
}
+   BG(syslog_device) = NULL;
return SUCCESS;
 }
 
@@ -126,6 +127,7 @@
 {
if (BG(syslog_device)) {
free(BG(syslog_device));
+   BG(syslog_device) = NULL;
}
return SUCCESS;
 }
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1085r2=1.2027.2.547.2.1086diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1085 php-src/NEWS:1.2027.2.547.2.1086
--- php-src/NEWS:1.2027.2.547.2.1085Wed Feb 20 12:04:48 2008
+++ php-src/NEWSWed Feb 20 15:28:37 2008
@@ -10,10 +10,12 @@
   which to group by data is specified. (Ilia)
 - Upgraded PCRE to version 7.6 (Nuno)
 
+
 - Fixed bug #44184 (Double free of loop-variable on exception). (Dmitry)
 - Fixed bug #44171 (Invalid FETCH_COLUMN index does not raise an error). (Ilia)
 - Fixed Bug #44159 (Crash: $pdo-setAttribute(PDO::STATEMENT_ATTR_CLASS, 
NULL)).
   (Felipe)
+- Fixed bug #44152 (Possible crash with syslog logging on ZTS builds). (Ilia)
 - Fixed bug #44069 (Huge memory usage with concatenation using . instead of
   .=). (Dmitry)
 - Fixed bug #44046 (crash inside array_slice() function with an invalid

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqli/tests mysqli_stmt_bind_result_references.phpt

2008-02-20 Thread Andrey Hristov
andrey  Wed Feb 20 18:27:53 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqli/tests   mysqli_stmt_bind_result_references.phpt 
  Log:
  Fix test. Now passes.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u
Index: php-src/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt
diff -u 
php-src/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt:1.2.2.2 
php-src/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt:1.2.2.3
--- php-src/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt:1.2.2.2
Wed Oct 10 10:18:50 2007
+++ php-src/ext/mysqli/tests/mysqli_stmt_bind_result_references.phptWed Feb 
20 18:27:53 2008
@@ -25,7 +25,7 @@
if (true !== ($tmp = mysqli_stmt_bind_result($stmt, $id, $label)))
printf([002] Expecting boolean/true, got %s/%s\n, 
gettype($tmp), $tmp);
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([003] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
 
var_dump($id);
@@ -42,7 +42,7 @@
if (true !== ($tmp = mysqli_stmt_bind_result($stmt, $id_ref, 
$label_ref)))
printf([004] Expecting boolean/true, got %s/%s\n, 
gettype($tmp), $tmp);
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([005] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
var_dump($id_ref);
var_dump($id);
@@ -62,7 +62,7 @@
if (true !== ($tmp = mysqli_stmt_bind_result($stmt, $id_ref_ref, 
$label_ref_ref)))
printf([006] Expecting boolean/true, got %s/%s\n, 
gettype($tmp), $tmp);
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([007] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
var_dump($id_ref_ref);
var_dump($id_ref);
@@ -81,7 +81,7 @@
if (true !== ($tmp = mysqli_stmt_bind_result($stmt, $id_ref, 
$label_ref)))
printf([008] Expecting boolean/true, got %s/%s\n, 
gettype($tmp), $tmp);
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([009] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
var_dump($id_ref);
var_dump($id);
@@ -95,7 +95,7 @@
if (true !== ($tmp = mysqli_stmt_bind_result($stmt, $id, $label)))
printf([010] Expecting boolean/true, got %s/%s\n, 
gettype($tmp), $tmp);
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([011] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
 
var_dump($id);
@@ -110,7 +110,7 @@
if (true !== ($tmp = mysqli_stmt_bind_result($stmt, $obj-id, 
$obj-label)))
printf([012] Expecting boolean/true, got %s/%s\n, 
gettype($tmp), $tmp);
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([013] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
 
var_dump($obj-id);
@@ -128,7 +128,7 @@
if (true !== ($tmp = mysqli_stmt_bind_result($stmt, $id, $label)))
printf([012] Expecting boolean/true, got %s/%s\n, 
gettype($tmp), $tmp);
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([013] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
 
var_dump($obj-id);
@@ -148,7 +148,7 @@
$label = $obj-id;
$id = null;
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([013] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
 
var_dump($obj-id);
@@ -169,7 +169,7 @@
$id_ref = 1;
$label_ref = 1;
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([015] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
var_dump($id_ref);
var_dump($id);
@@ -184,7 +184,7 @@
 
if (true !== ($tmp 

[PHP-CVS] cvs: php-src /ext/mysqli/tests mysqli_stmt_bind_result_references.phpt

2008-02-20 Thread Andrey Hristov
andrey  Wed Feb 20 18:28:37 2008 UTC

  Modified files:  
/php-src/ext/mysqli/tests   mysqli_stmt_bind_result_references.phpt 
  Log:
  Fix test. Now passes.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt
diff -u php-src/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt:1.2 
php-src/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt:1.3
--- php-src/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt:1.2
Thu Aug  9 10:01:20 2007
+++ php-src/ext/mysqli/tests/mysqli_stmt_bind_result_references.phptWed Feb 
20 18:28:37 2008
@@ -25,7 +25,7 @@
if (true !== ($tmp = mysqli_stmt_bind_result($stmt, $id, $label)))
printf([002] Expecting boolean/true, got %s/%s\n, 
gettype($tmp), $tmp);
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([003] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
 
var_dump($id);
@@ -42,7 +42,7 @@
if (true !== ($tmp = mysqli_stmt_bind_result($stmt, $id_ref, 
$label_ref)))
printf([004] Expecting boolean/true, got %s/%s\n, 
gettype($tmp), $tmp);
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([005] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
var_dump($id_ref);
var_dump($id);
@@ -62,7 +62,7 @@
if (true !== ($tmp = mysqli_stmt_bind_result($stmt, $id_ref_ref, 
$label_ref_ref)))
printf([006] Expecting boolean/true, got %s/%s\n, 
gettype($tmp), $tmp);
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([007] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
var_dump($id_ref_ref);
var_dump($id_ref);
@@ -81,7 +81,7 @@
if (true !== ($tmp = mysqli_stmt_bind_result($stmt, $id_ref, 
$label_ref)))
printf([008] Expecting boolean/true, got %s/%s\n, 
gettype($tmp), $tmp);
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([009] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
var_dump($id_ref);
var_dump($id);
@@ -95,7 +95,7 @@
if (true !== ($tmp = mysqli_stmt_bind_result($stmt, $id, $label)))
printf([010] Expecting boolean/true, got %s/%s\n, 
gettype($tmp), $tmp);
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([011] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
 
var_dump($id);
@@ -110,7 +110,7 @@
if (true !== ($tmp = mysqli_stmt_bind_result($stmt, $obj-id, 
$obj-label)))
printf([012] Expecting boolean/true, got %s/%s\n, 
gettype($tmp), $tmp);
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([013] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
 
var_dump($obj-id);
@@ -128,7 +128,7 @@
if (true !== ($tmp = mysqli_stmt_bind_result($stmt, $id, $label)))
printf([012] Expecting boolean/true, got %s/%s\n, 
gettype($tmp), $tmp);
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([013] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
 
var_dump($obj-id);
@@ -148,7 +148,7 @@
$label = $obj-id;
$id = null;
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([013] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
 
var_dump($obj-id);
@@ -169,7 +169,7 @@
$id_ref = 1;
$label_ref = 1;
 
-   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt))
+   if (!mysqli_stmt_execute($stmt) || !mysqli_stmt_fetch($stmt) || 
mysqli_stmt_fetch($stmt))
printf([015] [%d] %s\n, mysqli_stmt_errno($stmt), 
mysqli_stmt_error($stmt));
var_dump($id_ref);
var_dump($id);
@@ -184,7 +184,7 @@
 
if (true !== ($tmp = mysqli_stmt_bind_result($stmt, 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pcre/tests bug44191.phpt

2008-02-20 Thread Felipe Pena
felipe  Wed Feb 20 21:56:45 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/pcre/tests bug44191.phpt 
  Log:
  New test
  

http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug44191.phpt?view=markuprev=1.1
Index: php-src/ext/pcre/tests/bug44191.phpt
+++ php-src/ext/pcre/tests/bug44191.phpt

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pcre/tests bug44191.phpt

2008-02-20 Thread Felipe Pena
felipe  Wed Feb 20 21:57:05 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/pcre/tests bug44191.phpt 
  Log:
  New test
  

http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug44191.phpt?view=markuprev=1.1
Index: php-src/ext/pcre/tests/bug44191.phpt
+++ php-src/ext/pcre/tests/bug44191.phpt

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/pcre/tests bug44191.phpt

2008-02-20 Thread Felipe Pena
felipe  Wed Feb 20 21:59:43 2008 UTC

  Modified files:  
/php-src/ext/pcre/tests bug44191.phpt 
  Log:
  New test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug44191.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/pcre/tests/bug44191.phpt
diff -u /dev/null php-src/ext/pcre/tests/bug44191.phpt:1.2
--- /dev/null   Wed Feb 20 21:59:43 2008
+++ php-src/ext/pcre/tests/bug44191.phptWed Feb 20 21:59:43 2008
@@ -0,0 +1,14 @@
+--TEST--
+Bug #44191 (preg_grep messes up array index)
+--FILE--
+?php
+
+$array = range(1, 10);
+
+preg_grep('/asdf/', $array));
+
+var_dump($array);
+
+?
+--EXPECT--
+0123456789

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/pcre php_pcre.c

2008-02-20 Thread Felipe Pena
felipe  Wed Feb 20 22:08:19 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pcre   php_pcre.c 
/php-srcNEWS 
  Log:
  Fixed Bug #44191 (preg_grep messes up array index)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.24r2=1.168.2.9.2.25diff_format=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.24 
php-src/ext/pcre/php_pcre.c:1.168.2.9.2.25
--- php-src/ext/pcre/php_pcre.c:1.168.2.9.2.24  Mon Jan 14 09:46:54 2008
+++ php-src/ext/pcre/php_pcre.c Wed Feb 20 22:08:18 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.168.2.9.2.24 2008/01/14 09:46:54 nlopess Exp $ */
+/* $Id: php_pcre.c,v 1.168.2.9.2.25 2008/02/20 22:08:18 felipe Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -1744,7 +1744,7 @@

zend_hash_move_forward(Z_ARRVAL_P(input));
}
-   
+   zend_hash_internal_pointer_reset(Z_ARRVAL_P(input));
/* Clean up */
efree(offsets);
 }
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1086r2=1.2027.2.547.2.1087diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1086 php-src/NEWS:1.2027.2.547.2.1087
--- php-src/NEWS:1.2027.2.547.2.1086Wed Feb 20 15:28:37 2008
+++ php-src/NEWSWed Feb 20 22:08:18 2008
@@ -11,6 +11,7 @@
 - Upgraded PCRE to version 7.6 (Nuno)
 
 
+- Fixed Bug #44191 (preg_grep messes up array index). (Felipe)
 - Fixed bug #44184 (Double free of loop-variable on exception). (Dmitry)
 - Fixed bug #44171 (Invalid FETCH_COLUMN index does not raise an error). (Ilia)
 - Fixed Bug #44159 (Crash: $pdo-setAttribute(PDO::STATEMENT_ATTR_CLASS, 
NULL)).

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pcre php_pcre.c

2008-02-20 Thread Felipe Pena
felipe  Wed Feb 20 22:12:18 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/pcre   php_pcre.c 
  Log:
  MFB: Fixed Bug #44191 (preg_grep messes up array index)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.21.2.10r2=1.168.2.9.2.21.2.11diff_format=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.21.2.10 
php-src/ext/pcre/php_pcre.c:1.168.2.9.2.21.2.11
--- php-src/ext/pcre/php_pcre.c:1.168.2.9.2.21.2.10 Fri Jan 25 19:38:26 2008
+++ php-src/ext/pcre/php_pcre.c Wed Feb 20 22:12:17 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.168.2.9.2.21.2.10 2008/01/25 19:38:26 nlopess Exp $ */
+/* $Id: php_pcre.c,v 1.168.2.9.2.21.2.11 2008/02/20 22:12:17 felipe Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -1771,7 +1771,7 @@

zend_hash_move_forward(Z_ARRVAL_P(input));
}
-   
+   zend_hash_internal_pointer_reset(Z_ARRVAL_P(input));
/* Clean up */
efree(offsets);
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/pcre php_pcre.c

2008-02-20 Thread Felipe Pena
felipe  Wed Feb 20 22:15:53 2008 UTC

  Modified files:  
/php-src/ext/pcre   php_pcre.c 
  Log:
  MFB: Fixed Bug #44191 (preg_grep messes up array index)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.229r2=1.230diff_format=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.229 php-src/ext/pcre/php_pcre.c:1.230
--- php-src/ext/pcre/php_pcre.c:1.229   Fri Jan 25 19:39:45 2008
+++ php-src/ext/pcre/php_pcre.c Wed Feb 20 22:15:53 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.229 2008/01/25 19:39:45 nlopess Exp $ */
+/* $Id: php_pcre.c,v 1.230 2008/02/20 22:15:53 felipe Exp $ */
 
 /*  TODO
  *  php_pcre_replace_impl():
@@ -2013,7 +2013,7 @@
 
zend_hash_move_forward(Z_ARRVAL_P(input));
}
-   
+   zend_hash_internal_pointer_reset(Z_ARRVAL_P(input));
/* Clean up */
efree(offsets);
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/sockets sockets.c

2008-02-20 Thread Felipe Pena
felipe  Thu Feb 21 02:34:50 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/socketssockets.c 
/php-srcNEWS 
  Log:
  Fixed Bug #44197 (socket array keys lost on socket_select)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.171.2.9.2.15r2=1.171.2.9.2.16diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.171.2.9.2.15 
php-src/ext/sockets/sockets.c:1.171.2.9.2.16
--- php-src/ext/sockets/sockets.c:1.171.2.9.2.15Mon Dec 31 07:20:11 2007
+++ php-src/ext/sockets/sockets.c   Thu Feb 21 02:34:50 2008
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.171.2.9.2.15 2007/12/31 07:20:11 sebastian Exp $ */
+/* $Id: sockets.c,v 1.171.2.9.2.16 2008/02/21 02:34:50 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -584,7 +584,10 @@
zval**dest_element;
php_socket  *php_sock;
HashTable   *new_hash;
-   int num = 0;
+   char*key;
+   int num;
+   ulong   num_key;
+   uintkey_len;
 
if (Z_TYPE_P(sock_array) != IS_ARRAY) return 0;
 
@@ -599,7 +602,14 @@
 
if (PHP_SAFE_FD_ISSET(php_sock-bsd_socket, fds)) {
/* Add fd to new array */
-   zend_hash_next_index_insert(new_hash, (void *)element, 
sizeof(zval *), (void **)dest_element);
+   switch 
(zend_hash_get_current_key_ex(Z_ARRVAL_P(sock_array), key, key_len, num_key, 
0, NULL)) {
+   case HASH_KEY_IS_STRING:
+   zend_hash_add(new_hash, key, key_len, 
(void *)element, sizeof(zval *), (void **)dest_element);
+   break;
+   case HASH_KEY_IS_LONG:
+   zend_hash_index_update(new_hash, 
num_key, (void *)element, sizeof(zval *), (void **)dest_element);
+   break;
+   }
if (dest_element) zval_add_ref(dest_element);
}
num++;
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1087r2=1.2027.2.547.2.1088diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1087 php-src/NEWS:1.2027.2.547.2.1088
--- php-src/NEWS:1.2027.2.547.2.1087Wed Feb 20 22:08:18 2008
+++ php-src/NEWSThu Feb 21 02:34:50 2008
@@ -11,6 +11,7 @@
 - Upgraded PCRE to version 7.6 (Nuno)
 
 
+- Fixed Bug #44197 (socket array keys lost on socket_select). (Felipe)
 - Fixed Bug #44191 (preg_grep messes up array index). (Felipe)
 - Fixed bug #44184 (Double free of loop-variable on exception). (Dmitry)
 - Fixed bug #44171 (Invalid FETCH_COLUMN index does not raise an error). (Ilia)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/sockets sockets.c

2008-02-20 Thread Felipe Pena
felipe  Thu Feb 21 02:39:43 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/socketssockets.c 
  Log:
  Fix typo
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.171.2.9.2.16r2=1.171.2.9.2.17diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.171.2.9.2.16 
php-src/ext/sockets/sockets.c:1.171.2.9.2.17
--- php-src/ext/sockets/sockets.c:1.171.2.9.2.16Thu Feb 21 02:34:50 2008
+++ php-src/ext/sockets/sockets.c   Thu Feb 21 02:39:43 2008
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.171.2.9.2.16 2008/02/21 02:34:50 felipe Exp $ */
+/* $Id: sockets.c,v 1.171.2.9.2.17 2008/02/21 02:39:43 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -585,7 +585,7 @@
php_socket  *php_sock;
HashTable   *new_hash;
char*key;
-   int num;
+   int num = 0;
ulong   num_key;
uintkey_len;
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/sockets sockets.c

2008-02-20 Thread Felipe Pena
felipe  Thu Feb 21 02:56:57 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/socketssockets.c 
  Log:
  MFB: Fixed Bug #44197 (socket array keys lost on socket_select)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.171.2.9.2.14.2.2r2=1.171.2.9.2.14.2.3diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.171.2.9.2.14.2.2 
php-src/ext/sockets/sockets.c:1.171.2.9.2.14.2.3
--- php-src/ext/sockets/sockets.c:1.171.2.9.2.14.2.2Mon Dec 31 07:17:13 2007
+++ php-src/ext/sockets/sockets.c   Thu Feb 21 02:56:57 2008
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.171.2.9.2.14.2.2 2007/12/31 07:17:13 sebastian Exp $ */
+/* $Id: sockets.c,v 1.171.2.9.2.14.2.3 2008/02/21 02:56:57 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -584,7 +584,10 @@
zval**dest_element;
php_socket  *php_sock;
HashTable   *new_hash;
+   char*key;
int num = 0;
+   ulong   num_key;
+   uintkey_len;
 
if (Z_TYPE_P(sock_array) != IS_ARRAY) return 0;
 
@@ -599,7 +602,14 @@
 
if (PHP_SAFE_FD_ISSET(php_sock-bsd_socket, fds)) {
/* Add fd to new array */
-   zend_hash_next_index_insert(new_hash, (void *)element, 
sizeof(zval *), (void **)dest_element);
+   switch 
(zend_hash_get_current_key_ex(Z_ARRVAL_P(sock_array), key, key_len, num_key, 
0, NULL)) {
+   case HASH_KEY_IS_STRING:
+   zend_hash_add(new_hash, key, key_len, 
(void *)element, sizeof(zval *), (void **)dest_element);
+   break;
+   case HASH_KEY_IS_LONG:
+   zend_hash_index_update(new_hash, 
num_key, (void *)element, sizeof(zval *), (void **)dest_element);
+   break;
+   }
if (dest_element) zval_add_ref(dest_element);
}
num++;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php