Hi Ilia,

After this fix 39 PDO rleated test are failed for me :(

SIGSEGV

#0  0x083430e9 in _zend_is_inconsistent (ht=0x0,
    file=0x849721c "/home/dmitry/php/php5.3/Zend/zend_hash.c", line=1015)
    at /home/dmitry/php/php5.3/Zend/zend_hash.c:53
#1  0x08345d73 in zend_hash_num_elements (ht=0x0)
    at /home/dmitry/php/php5.3/Zend/zend_hash.c:1015
#2  0x081541b7 in dispatch_param_event (stmt=0x8780354,
    event_type=PDO_PARAM_EVT_EXEC_PRE)
    at /home/dmitry/php/php5.3/ext/pdo/pdo_stmt.c:171
#3  0x08155122 in zim_PDOStatement_execute (ht=0, return_value=0x8788f04,
    return_value_ptr=0x0, this_ptr=0x877c6bc, return_value_used=0)
    at /home/dmitry/php/php5.3/ext/pdo/pdo_stmt.c:499
#4  0x0835f37c in zend_do_fcall_common_helper_SPEC (execute_data=0xbfbfe9ac)
    at /home/dmitry/php/php5.3/Zend/zend_vm_execute.h:190
#5  0x08360097 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(execute_data=0xbfbfe9ac)
    at /home/dmitry/php/php5.3/Zend/zend_vm_execute.h:308
#6  0x0835ee82 in execute (op_array=0x877c164)
    at /home/dmitry/php/php5.3/Zend/zend_vm_execute.h:86
#7  0x08337dee in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /home/dmitry/php/php5.3/Zend/zend.c:1139
#8  0x082dff29 in php_execute_script (primary_file=0xbfc00d30)
    at /home/dmitry/php/php5.3/main/main.c:2007
#9  0x083bf974 in main (argc=2, argv=0xbfc00e84)
    at /home/dmitry/php/php5.3/sapi/cli/php_cli.c:1140

Dmitry.

> -----Original Message-----
> From: Ilia Alshanetsky [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, November 20, 2007 5:22 PM
> To: php-cvs@lists.php.net
> Subject: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c 
> 
> 
> iliaa         Tue Nov 20 14:22:27 2007 UTC
> 
>   Modified files:              (Branch: PHP_5_3)
>     /php-src/ext/pdo  pdo_stmt.c 
>   Log:
>   Fixed bug #42978 (mismatch between number of bound params 
> and values causes
>   a crash in pdo_pgsql)
>   
>   
> http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.
118.2.38.2.24.2.5&r2=1.118.2.38.2.24.2.6&diff_format=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.5
php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.6
--- php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.5      Wed Oct 31 12:57:51
2007
+++ php-src/ext/pdo/pdo_stmt.c  Tue Nov 20 14:22:27 2007
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: pdo_stmt.c,v 1.118.2.38.2.24.2.5 2007/10/31 12:57:51 iliaa Exp $ */
+/* $Id: pdo_stmt.c,v 1.118.2.38.2.24.2.6 2007/11/20 14:22:27 iliaa Exp 
+$ */
 
 /* The PDO Statement Handle Class */
 
@@ -168,6 +168,11 @@
 
 iterate:
        if (ht) {
+               if (zend_hash_num_elements(stmt->bound_param_map) !=
zend_hash_num_elements(ht)) {
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number
of bound paramters %d does not match number of bound values %d",
zend_hash_num_elements(stmt->bound_param_map), zend_hash_num_elements(ht));
+                       return 0;       
+               }
+
                zend_hash_internal_pointer_reset(ht);
                while (SUCCESS == zend_hash_get_current_data(ht,
(void**)&param)) {
                        if (!stmt->methods->param_hook(stmt, param,
event_type TSRMLS_CC)) {

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

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

Reply via email to