Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24920 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69422 invoked by uid 1010); 24 Jul 2006 07:52:57 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 69407 invoked from network); 24 Jul 2006 07:52:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2006 07:52:57 -0000 X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 209.142.136.132 msa2-mx.centurytel.net Linux 2.4/2.6 Received: from ([209.142.136.132:40188] helo=msa2-mx.centurytel.net) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 79/C5-04178-85C74C44 for ; Mon, 24 Jul 2006 03:52:57 -0400 Received: from pc1 (dsl-193-1.jax.centurytel.net [69.179.193.1]) by msa2-mx.centurytel.net (8.13.6/8.13.6) with SMTP id k6O7qqJ5021277; Mon, 24 Jul 2006 02:52:52 -0500 Message-ID: <00ac01c6aef6$2adc0d10$0201a8c0@pc1> To: , "Andrei Zmievski" Cc: References: <014e01c6acbe$680b1bc0$0201a8c0@pc1> <10845a340607210543lfe173abq2221a1c833c5d9e1@mail.gmail.com> <017701c6acc6$3a526be0$0201a8c0@pc1> <00d401c6ad61$9d235810$0201a8c0@pc1> <44C4626D.5030108@php.net> Date: Mon, 24 Jul 2006 02:52:52 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Subject: Re: [PHP-DEV] [PATCH] array_combine is not binary-key safe From: php_lists@realplain.com ("Matt W") Hi, ----- Original Message ----- From: "bertrand Gugger" Sent: Monday, July 24, 2006 > Matt W wrote: > > Hi Andrei, > > > > I see you applied my patch. > Testing with a php5.2-200607222030 snaps having > /* $Id: array.c,v 1.308.2.21.2.7 2006/07/22 16:58:39 andrei Exp $ */ > > Looks by me as the ext/standard/tests/array/array_combine.phpt fails > Is it by me ? > > $ diff -W 60 -y --suppress-common-lines > ext/standard/tests/array/array_combine.exp > ext/standard/tests/array/array_combine.out > [green] => green | [gree] => green > [red] => red | [re] => red > [yellow] => yellow | [yello] => yellow > [green] => 1 | [gree] => 1 > [red] => 2 | [re] => 2 > [yellow] => 3 | [yello] => 3 > [green] => 0 | [gree] => 0 > [red] => 1 | [re] => 1 > [yellow] => 2 | [yello] => 2 > [green] => 1 | [gree] => 1 > [red] => | [re] => > [yellow] => | [yello] => > [1] => green | [] => green > [2] => red | [] => red > [3] => yellow | [] => yellow > [1] => 1 | [] => 1 > [2] => 2 | [] => 2 > [3] => 3 | [] => 3 > [1] => 0 | [] => 0 > [2] => 1 | [] => 1 > [3] => 2 | [] => 2 > [1] => 1 | [] => 1 > [2] => | [] => > [3] => | [] => > > PHP : /home/bertrand/php/php5.2-200607222030/sapi/cli/php > PHP_SAPI : cli > PHP_VERSION : 5.2.0-dev > ZEND_VERSION: 2.2.0 > PHP_OS : Linux - Linux ancilla.toggg.net 2.6.12-1.1381_FC3 #1 Fri > Oct 21 03 :46:55 EDT 2005 i686 > > Configure Command => './configure' > > Sorry for the noise , case I did something wrong , but what ? > (or case it is repaired in the mean time) Nope, it's broken. :-) I was confused as to why Andrei only fully applied my patch for HEAD, and seemed to manually "take part of" the 5.2 patch (I thought the binary key change was unwanted in 5.2, but he did update it then). Now it needs a 4th update... *shrug* :-) Andrei, in the first add_assoc_zval_ex(), after Z_STRLEN_PP(entry_keys), you forgot the +1. > -- > toggg It wasn't your fault, good catch. ;-) Matt