Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80915 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7062 invoked from network); 20 Jan 2015 22:46:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2015 22:46:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.174 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.214.174 mail-ob0-f174.google.com Received: from [209.85.214.174] ([209.85.214.174:41729] helo=mail-ob0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 53/AB-49046-CCADEB45 for ; Tue, 20 Jan 2015 17:46:37 -0500 Received: by mail-ob0-f174.google.com with SMTP id wo20so27040378obc.5 for ; Tue, 20 Jan 2015 14:46:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=YXT8inDYPXS9cg3T00oWNlnN7KaRs2Zft8YZGoO2Vl0=; b=xyzo7AxsN0jeX2e03EzyGOxJSHltgmmo73UYtfFe/1B0+oFfjR9VsWtOFeYQOMRMHd ozBuOvW8BkSzguD6rYK5DD+/1cr9tMKTPk6NxBsDe6UEsxbld4E0Aetm/Dx9ydJkOxVp eInHvNPu9wt+1Z4F3Lo/6idcXMteGTcoY1Th5I0UubhRR8W1y1iSl4KV6wdfkukRWef/ 4GKp1d/uDrf9qm1cQiG3CUfkJC2vQm4921ok0DwChcObU2JEw048lHYvfeO4Scjkwvrp buemN0m2ffVLoZQMQvrSScMojq0dT4qRLsn1JIVE79GGMGXIau8uKf46d/dFEaCm3/Cc AZvg== X-Received: by 10.182.76.2 with SMTP id g2mr5904097obw.76.1421793993022; Tue, 20 Jan 2015 14:46:33 -0800 (PST) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id t8sm4133999obv.22.2015.01.20.14.46.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jan 2015 14:46:32 -0800 (PST) Message-ID: <54BEDABB.2040406@gmail.com> Date: Tue, 20 Jan 2015 14:46:19 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Rasmus Lerdorf , PHP internals References: <54BECE9E.5050502@lerdorf.com> <54BED307.5010606@lerdorf.com> In-Reply-To: <54BED307.5010606@lerdorf.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Help - gcc mystery in ext/imap From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > So, I guess the lesson is that we need to be careful when we migrate > extensions to PHP 7. Passing ints instead of size_t string length params > to zpp can cause extreme weirdness and we should go through all our > bundled extensions and make sure things that are still using "s" have > all been changed to size_t. Definitely so. I've recently went through intl and fixed a bunch of int/size_t issues, but judging from how many there were, I assume other non-trivial extensions would have such things too. We have lots of places where size_t and int are intermixed - e.g., random try, go to mysqli extension, do grep int *.c | grep len and see that results of spprintf - which returns size_t - are put into int. Now, in this case it's almost 100% not a problem, but illustrates bigger issue of mixing the types, and in some cases it may be a real problem. -- Stas Malyshev smalyshev@gmail.com