Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80917 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11542 invoked from network); 20 Jan 2015 23:22:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2015 23:22:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain lerdorf.com designates 209.85.192.42 as permitted sender) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.192.42 mail-qg0-f42.google.com Received: from [209.85.192.42] ([209.85.192.42:40084] helo=mail-qg0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/6C-49046-123EEB45 for ; Tue, 20 Jan 2015 18:22:10 -0500 Received: by mail-qg0-f42.google.com with SMTP id q107so18837532qgd.1 for ; Tue, 20 Jan 2015 15:22:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type; bh=i+nnVNyaU3KPlYjkdmQuOfB9A7Es3M1fpvVq4F6NUJ4=; b=ZF/jrmShjfc/YbSBxnYcIF6h/jaIJQXSHAa9DzHJHurgyHI3eoHUn0otPtbzWLs4eV 5gG/veiELoxLj2MGxp31xM8oismpWvsGRDGbC6F7/w7iSb+sAL+PccIP/O5fjwFJfq6B LQwwjyTc7lR8cA6ZKrDtbGfTAFnstbDDvYRYO1G5do7oVkAblEqA3leLVF1tWo0cVop/ CENJXxaYb6WBej2AHYYYHebpicv5WbyW9DM+M/sHV3Mayo8++MDfM26mpcEiwtA41kGX wk6dnHlo1TNJx57V7/PHmX8Jf08pq9VJRQhqPDY1mkmK+M5UnAlQhdTb24s8Hg5YI0rJ tNcw== X-Gm-Message-State: ALoCoQmblkBazl1zpdfc8+VT0g9M0OKMby4SlcO8Oxb9MwIz/cQ17+kN4D04InjAd8gvXLhKYzZW X-Received: by 10.224.45.195 with SMTP id g3mr3001032qaf.59.1421796126824; Tue, 20 Jan 2015 15:22:06 -0800 (PST) Received: from [192.168.200.14] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPSA id l3sm149374qaf.36.2015.01.20.15.22.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jan 2015 15:22:05 -0800 (PST) Message-ID: <54BEE31B.3020403@lerdorf.com> Date: Tue, 20 Jan 2015 15:22:03 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Stanislav Malyshev , PHP internals References: <54BECE9E.5050502@lerdorf.com> <54BED307.5010606@lerdorf.com> <54BEDABB.2040406@gmail.com> In-Reply-To: <54BEDABB.2040406@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Tcu7Grwc6EJ5rb32Dd6N1OioU08PewTns" Subject: Re: [PHP-DEV] Re: Help - gcc mystery in ext/imap From: rasmus@lerdorf.com (Rasmus Lerdorf) --Tcu7Grwc6EJ5rb32Dd6N1OioU08PewTns Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/20/2015 02:46 PM, Stanislav Malyshev wrote: > Hi! >=20 >> 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 para= ms >> 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. >=20 > 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. Yeah, I was quite surprised by the weirdness it caused. I don't think I have ever seen something that breaks under -O2 start working again compiled with -O3. That's what had me chasing my tail into assembly world for a bit there. I have fixed up ext/imap now. Hopefully I caught them all. -Rasmus --Tcu7Grwc6EJ5rb32Dd6N1OioU08PewTns Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlS+4xsACgkQlxayKTuqOuATOQCfSO4td7lx3c39i8Xjj5B+bgUK 1WAAnRgRs25fSXqIxdUxO+YKdyBjJ1hX =XWgE -----END PGP SIGNATURE----- --Tcu7Grwc6EJ5rb32Dd6N1OioU08PewTns--