Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72687 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3896 invoked from network); 18 Feb 2014 17:14:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2014 17:14:10 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.215.10 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.215.10 mail.experimentalworks.net Received: from [217.114.215.10] ([217.114.215.10:53201] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 35/B4-16937-ED493035 for ; Tue, 18 Feb 2014 12:14:08 -0500 Received: from [192.168.2.31] (ppp-93-104-31-240.dynamic.mnet-online.de [93.104.31.240]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: johannes@schlueters.de) by mail.experimentalworks.net (Postfix) with ESMTPSA id 8AE9242938; Tue, 18 Feb 2014 18:14:44 +0100 (CET) To: Terry Ellison Cc: Julien Pauli , PHP internals list In-Reply-To: <530383AD.8060701@gmail.com> References: <1392669755.3990.291.camel@guybrush> <530383AD.8060701@gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 18 Feb 2014 18:14:00 +0100 Message-ID: <1392743640.3990.593.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Usin ClangStatic Analyzer for zend_parse_parameters From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Tue, 2014-02-18 at 16:00 +0000, Terry Ellison wrote: > > Running this over one of my PHP builds I got those error reports: > > http://schlueters.de/zppcheck/ maybe somebody wants to go through them > > and fix at least the trivial ones. > By the way, your report seems to be listing entries twice -- at least > as the four PHPdbg SAPI ones. Interesting catch, have to investigate. > In this case these are all a case of the "s" parameter taking a > char**, int* but phpdbg.c is passing in a char**, uint*. I'll issue a > patch for Joe or Bob to review and push into PHP-5.6. Thanks. > Note that http://www.php.net/manual/en/internals2.funcs.php states > that the "s" parameter takes the addresses of char*, uint that is > char** uint* which is wrong. Indeed a bug, will fix that right after sending this mail. Thanks for noticing. > Though why the length field should be signed seems odd to me as a > negative length makes no sense at all. - since it was defined that way - since int is a simple choice - since signed int has enough space for all expected strings - since it can quite certainly passed to any library, it is unlikely a library will choose int4_t or such as length for strings and maxlength handling can now be in one place - since it is supposed to be fixed (see recent looong discussion) ;-) johannes