From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=Qa3uOseh; spf=pass (domain: apple.com, ip: 17.151.62.68, mailfrom: afish@apple.com) Received: from nwk-aaemail-lapp03.apple.com (nwk-aaemail-lapp03.apple.com [17.151.62.68]) by groups.io with SMTP; Mon, 22 Apr 2019 16:14:13 -0700 Received: from pps.filterd (nwk-aaemail-lapp03.apple.com [127.0.0.1]) by nwk-aaemail-lapp03.apple.com (8.16.0.27/8.16.0.27) with SMTP id x3MN2W97042552; Mon, 22 Apr 2019 16:14:13 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=email.apple.com; h=mime-version : content-transfer-encoding : content-type : sender : subject : from : in-reply-to : date : cc : message-id : references : to; s=20190418; bh=Nvc/iUZ1QlKpqL2elQCZaxR1xOl8TFtu5hGWiSt/AsI=; b=bTLGgQ1xlhs6TPoYJkJoZaVUNhjTHroBFAxj5rzVX0yIiuWU2WhZUIJ7BNUrOMiePgH4 ZN8OCub17EZt8dTAEX5Xd9G+OwvDKlQf0wdrL3CFk9plGslH3VjsrQHfa1OLMxM85wsH VO1RrLZ4308AlRgDpYYxg5hKrupsCfQ01nnH2lqir2JY5BPyn6EvIIJIHSX2oUKEtt/I 7lD63YLqKId7i33MPDoQscJwFhlGYGLp/ctcg84WH88iy84myh7ev/+cmInhfXxR1YCV 91vOdhUizLikrHHglT4qsdbV5hqpA4wQgDHX3R44zhhHpo2YOBxC4pc01FI8aoi7X+VC iw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=mime-version : content-transfer-encoding : content-type : sender : subject : from : in-reply-to : date : cc : message-id : references : to; s=20180706; bh=Nvc/iUZ1QlKpqL2elQCZaxR1xOl8TFtu5hGWiSt/AsI=; b=Qa3uOseh+1d0MIUZbIO717cldpJ6wLsTlRPY/6zLCDRhC3T5OK+ugvQBgNgP2LmJXIzZ wtRCIH6iughgqtfAZyu9tx5eyuMaJB6+n6PTpEbdQumFaOZCI+21+2NrkvxwpdahJQjT BMbvlDZyqCG+9Ou0msm86aKbc1jiqCmeYa0hEglMF4MSvfmGPptOS10+LBDOYxff7F9U 5zrgfG1iN32eQqBhuxgWf4t4dmJyRSItp4JmMCx85vQAFGwTvouW9kJ5ByotRopW9pnI hvoMsrtIBEaXJQ8U2ADEFG6YbseIwl7xMYacrC9QhuG2XX52tGrLC4OlAxWCylmvoitC Kg== Received: from ma1-mtap-s03.corp.apple.com (ma1-mtap-s03.corp.apple.com [17.40.76.7]) by nwk-aaemail-lapp03.apple.com with ESMTP id 2ryyy6q8x5-8 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 22 Apr 2019 16:14:13 -0700 MIME-version: 1.0 Received: from nwk-mmpp-sz10.apple.com (nwk-mmpp-sz10.apple.com [17.128.115.122]) by ma1-mtap-s03.corp.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPS id <0PQD00GQNXVNYEK0@ma1-mtap-s03.corp.apple.com>; Mon, 22 Apr 2019 16:14:12 -0700 (PDT) Received: from process_milters-daemon.nwk-mmpp-sz10.apple.com by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) id <0PQD00200XVFIZ00@nwk-mmpp-sz10.apple.com>; Mon, 22 Apr 2019 16:14:11 -0700 (PDT) X-Va-A: X-Va-T-CD: 832470fda1aae564ffca551094bf39ec X-Va-E-CD: 2cde9b63fcf59ab2abd893ed5282af88 X-Va-R-CD: 93399d61b609b11d687df968e4b7b27c X-Va-CD: 0 X-Va-ID: d01563d4-3bef-4f1d-b666-62b6d6daea2e X-V-A: X-V-T-CD: 832470fda1aae564ffca551094bf39ec X-V-E-CD: 2cde9b63fcf59ab2abd893ed5282af88 X-V-R-CD: 93399d61b609b11d687df968e4b7b27c X-V-CD: 0 X-V-ID: e8e51256-26ae-49b1-98d5-d2c291f51bc9 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-22_01:,, signatures=0 Received: from [17.226.41.80] (unknown [17.226.41.80]) by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPSA id <0PQD00MXSXVN2A50@nwk-mmpp-sz10.apple.com>; Mon, 22 Apr 2019 16:14:11 -0700 (PDT) Sender: afish@apple.com Subject: Re: [edk2-devel] [PATCH v1] MdeModulePkg/DxeCore: Please static checker for false report From: "Andrew Fish" In-reply-to: Date: Mon, 22 Apr 2019 16:14:10 -0700 Cc: Mike Kinney , "Wu, Hao A" , "Gao, Liming" , "Wang, Jian J" Message-id: <1E074AE0-9C30-4BD4-BC0B-1D4DB042623E@apple.com> References: <20190422072447.10548-1-hao.a.wu@intel.com> To: devel@edk2.groups.io, Ard Biesheuvel X-Mailer: Apple Mail (2.3445.6.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-22_01:,, signatures=0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII > On Apr 22, 2019, at 3:02 PM, Ard Biesheuvel wrote: > > On Mon, 22 Apr 2019 at 23:53, Michael D Kinney > wrote: >> >> Ard, >> >> This seems to be a common limitation seen in some >> static analyzers. We have not found a workaround >> that does not involve code changes to quiet the >> false positives. >> >> For this specific case, I think the code change I >> suggest is correct. >> > > I agree that the change is correct, and isn't that intrusive in this > particular case, so I don't have any objections to it. > > I was just thinking aloud whether the IN vs OUT modifiers could be put > to use here. There are some examples in Linux of the patten > > #ifdef __CHECKER__ > #define ... > #else > #define ... > #endif > > where __CHECKER__ is only set by the 'sparse' tool, which is basically > a combination of a static checker with a more pedantic coding style > checker. > > I guess in our case, we'dl have to cater for multiple build > environments and more than one static checker, so this is probably not > as easy to achieve, unfortunately. > Ard, This would be a really good item to put on our longer term list of enhancements. Thanks, Andrew Fish > >