From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail04.groups.io (mail04.groups.io [45.79.224.9]) by spool.mail.gandi.net (Postfix) with ESMTPS id 29D1C740041 for ; Wed, 17 Apr 2024 06:34:22 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=mGWbg3n7lm6iqP/c+4bPZ6swv30N0GrxsLfE3MxIIrs=; c=relaxed/simple; d=groups.io; h=From:To:Cc:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Thread-Index:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding:Content-Language; s=20240206; t=1713335661; v=1; b=kNwBWzVuWYAucRNsQveM0A7hHICJV9dfIgahfElGJnx638H1TPC5mtK5OsDNf21CqKVAIqkc bxW4LfTE/7O1Gquz9aCGkts6dF8h/b4BWPglgOfbfzGZvAN9hFt1naI44LmNU61QNrV1tP1e+YC Y2XKH3B7v5ZyqfIC7Wyj1VgMu41Ck2Ew2/xo8O7r0TIntna4eQZmtcZy/chUjew0lzZwJEvwDPD THp29TFyFADZlOdnV7weG/UKFB4VS00Bk7MQJRUo+URBFJ8RW+4Wc2xT75buRYabZt8mV0u7Jd3 dbXPRcFhIQYQpmZs9sAD9jGT+n2g6oUJR7t8fV/xlRruQ== X-Received: by 127.0.0.2 with SMTP id gOWAYY7687511xXgbfqST8Yh; Tue, 16 Apr 2024 23:34:21 -0700 X-Received: from cxsh.intel-email.com (cxsh.intel-email.com [121.46.250.151]) by mx.groups.io with SMTP id smtpd.web11.6574.1713335655005713963 for ; Tue, 16 Apr 2024 23:34:15 -0700 X-Received: from cxsh.intel-email.com (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id A1C66DDA788 for ; Wed, 17 Apr 2024 14:34:09 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id 9DC0CDDA79E for ; Wed, 17 Apr 2024 14:34:09 +0800 (CST) X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by cxsh.intel-email.com (Postfix) with SMTP id D92A2DDA79A for ; Wed, 17 Apr 2024 14:34:02 +0800 (CST) X-Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP(SSL) for ; Wed, 17 Apr 2024 14:33:45 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming via groups.io" To: , , , , Cc: "'Yeo Reum Yun'" , "'Pierre Gondois'" , "'nd'" References: <20240415185947.160172-1-yeoreum.yun@arm.com> <71B634F4-1F95-4488-811B-43064B7F000A@arm.com> In-Reply-To: <71B634F4-1F95-4488-811B-43064B7F000A@arm.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIDEvMV0gQmFzZVRvb2wvRWNjOiBGaXggaW5jb3JyZWN0IHBhcnNpbmcgb2YgdmFyaWFibGUgaW5pdGlhbGlzYXRpb24=?= Date: Wed, 17 Apr 2024 14:33:48 +0800 Message-ID: <025e01da9091$34e39a40$9eaacec0$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AQI45z8+5HhQUggmPZ9rcxDvW3O/JwHtM2i4sJ47aOA= Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Tue, 16 Apr 2024 23:34:15 -0700 Resent-From: gaoliming@byosoft.com.cn Reply-To: devel@edk2.groups.io,gaoliming@byosoft.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ZbYhlm5a1v9AIQCT1bEOYHccx7686176AA= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=kNwBWzVu; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.9 as permitted sender) smtp.mailfrom=bounce@groups.io Sami: I have no comments for this change. Acked-by: Liming Gao Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Sami > Mujawar > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2024=E5=B9=B44=E6=9C=8816=E6=97=A5 = 11:51 > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; rebecca@bsdio.com; > gaoliming@byosoft.com.cn; bob.c.feng@intel.com; yuwei.chen@intel.com > =E6=8A=84=E9=80=81: Yeo Reum Yun ; Pierre Gondois > ; nd > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH 1/1] BaseTool/Ecc: Fix incorr= ect parsing of > variable initialisation >=20 > Dear Maintainers, >=20 > This patch fixes an ECC tool issue that is preventing the Arm CCA patch s= eries > from passing the edk2-CI tests, see > https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=3D122726&v= ie > w=3Dlogs&j=3Dec42d809-3c3b-54a9-276c-e54a8b9aaee9&t=3Dbd91c6c3-6d75-5ed > e-7b63-5767cf827334&l=3D74 >=20 > Regards, >=20 > Sami Mujawar >=20 > =EF=BB=BFOn 16/04/2024, 00:30, "devel@edk2.groups.io > on behalf of levi.yun via groups.io" on behalf of > yeoreum.yun=3Darm.com@groups.io > wrote: >=20 >=20 > If a global variable is initialised using a macro with multiple > arguments, ECC incorrectly parses the statement and reports the > macro arguments as variable declarations. >=20 >=20 > Example: In the following statement: > STATIC INT WrongVariable =3D MACRO_VERSION(1, 0), NextVariable; > The logic in the ECC function GetIdentifierList() interprets the > above statement as declaration of three variables: > 1. 'WrongVariable =3D MACRO_VERSION(1,' > 2. '0)' > 3. 'NextVariable' > Following which NamingConventionCheckVariableName() reports an > error for "0)" stating an incorrect variable declaration as > below: > "ERROR - *The variable name [0)] does not follow the rules" >=20 >=20 > This patch fixes the parsing logic so that scenarios with macro > initialisations are handled correctly. >=20 >=20 > Cc: Rebecca Cran > > Cc: Liming Gao > > Cc: Bob Feng > > Cc: Yuwei Chen > > Cc: Sami Mujawar > > Cc: Pierre Gondois > > Signed-off-by: levi.yun > > --- >=20 >=20 > The changes can be seen at > https://github.com/LeviYeoReum/edk2/tree/levi/3057_fix_false_on_ecc_v2 > > >=20 >=20 > BaseTools/Source/Python/Ecc/c.py | 23 ++++++++++++++++++-- > 1 file changed, 21 insertions(+), 2 deletions(-) >=20 >=20 > diff --git a/BaseTools/Source/Python/Ecc/c.py > b/BaseTools/Source/Python/Ecc/c.py > index > 61ad084fcc5b85b5a2194afd8bb1a4b4b65fdaee..71dc0fcf884ee3d45a527f20 > 844b697958df366c 100644 > --- a/BaseTools/Source/Python/Ecc/c.py > +++ b/BaseTools/Source/Python/Ecc/c.py > @@ -182,8 +182,27 @@ def GetIdentifierList(): > continue >=20 >=20 > if var.Declarator.find('{') =3D=3D -1: > - for decl in var.Declarator.split(','): > - DeclList =3D decl.split('=3D') > + DeclText =3D var.Declarator > + while (len(DeclText) > 0): > + AllocatorPos =3D DeclText.find('=3D') > + SplitPos =3D DeclText.find(',') > + > + if (SplitPos =3D=3D -1): > + SplitPos =3D len(DeclText) > + elif (SplitPos > AllocatorPos): > + NextAllcatorPos =3D DeclText.find('=3D', AllocatorPos + 1) > + if (NextAllcatorPos =3D=3D -1): > + NextAllcatorPos =3D len(DeclText) > + ParPos =3D DeclText.rfind(')', SplitPos, NextAllcatorPos) > + if (ParPos !=3D -1): > + SplitPos =3D DeclText.find(',', ParPos) > + if (SplitPos =3D=3D -1): > + SplitPos =3D ParPos + 1 > + > + SubDeclText =3D DeclText[:SplitPos] > + DeclText =3D DeclText[SplitPos + 1:] > + > + DeclList =3D SubDeclText.split('=3D') > Name =3D DeclList[0].strip() > if ArrayPattern.match(Name): > LSBPos =3D var.Declarator.find('[') > -- > Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") >=20 >=20 >=20 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#117802): > https://edk2.groups.io/g/devel/message/117802 > > Mute This Topic: https://groups.io/mt/105542888/1779659 > > Group Owner: devel+owner@edk2.groups.io > > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [sami.mujawar@arm.com > ] > -=3D-=3D-=3D-=3D-=3D-=3D >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117894): https://edk2.groups.io/g/devel/message/117894 Mute This Topic: https://groups.io/mt/105572420/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-