From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id NDS+LsRy6GTWxQoAWB0awg (envelope-from ) for ; Fri, 25 Aug 2023 05:22:12 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=kpyVAr4k; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B03F11E0C2; Fri, 25 Aug 2023 05:22:12 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 5868C1E092 for ; Fri, 25 Aug 2023 05:22:10 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A3A32385841F for ; Fri, 25 Aug 2023 09:22:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3A32385841F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692955329; bh=BJSCP1PFnbBsxLKw608wR6m0fhP5e5UppoCwynw2TtM=; h=To:CC:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=kpyVAr4kCGgPcNrAmL2TejMIn6k1DYOFip/2lenp5iWJnJQitF4sT9Jy5vf8f99X9 Td01ceBx+FuXYoQJ4RqTLGZi2c4b5ho0Qz1qpHM8SpBROqEORE6/myutAxAToRvxJj 3/b5EwAoKlR4VqYNRG7jxzqsFbyy7QkF+meBvSTA= Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id E573E3858C53 for ; Fri, 25 Aug 2023 09:21:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E573E3858C53 Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37P91uls014393 for ; Fri, 25 Aug 2023 09:21:33 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2045.outbound.protection.outlook.com [104.47.66.45]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3spsaarmf6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 25 Aug 2023 09:21:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NP4M6lDWo+iwlVe9d96Pr0QoPKykwBaqdarKy2WNS0hgwSNa9sS3C8/WvgRQASbY8dVjYq2somWsN72IBkNIuFesBSJbx0namY68c+H3NtFpT25S5wlVihibn82XY2xrAk79Lzykgl08vtCFpdE+hgqpDbyG/5HisIXHewoxmQUCCq4XfXa3LVpCkTftGJFrcq+t9rs1/tnOJ+PlbC9+4Cwk9OKIuvHoYa+4uWIwn1wh9XE16z2cH+3Ray9PwX5ICJoNwc3GHx5DxMZeZXoJny0Rne0O03UEgpgVy/tGEe0CvO/iANl1501a0ftxyGEtK19nQdRB2keRiPTmjIVU/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+HCQbnsllOdK2kOazsFBlXxdVN8MCEaXvpd99NGH020=; b=jcoWJETYgc8Xg1HWb+M/25r3uNmdw0t6fiWMA8ZrtxgAaQVDTPYgr0aI6BTlNYYKDxYLGIwb4/x6BwlR32KDSYULrnj7mSSh/Clenn8OoR0VmGsMXvw2Hn9+1tHakRuhgsLL8bSSIsyULMEHxD/3jmpAohQa439+8QtRP98w3+iPk1+fNnn83dCJVsmFQQDfuVKQ4Bmcfm0SogfDvRnhwfGL65mOib5PJbyV/tow9vyyFxNaTGPfau2ujTy2yU51GAMszq8Jpp8CgJsUmCiRqanRecHp+iseo0qFraE2EVR+SxrBvoFBk1M+mOYaqERkk0fzBwk8n3HPh1g7NfKAgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ibm.com; dmarc=pass action=none header.from=ibm.com; dkim=pass header.d=ibm.com; arc=none Received: from CH2PR15MB3544.namprd15.prod.outlook.com (2603:10b6:610:5::26) by CO6PR15MB4194.namprd15.prod.outlook.com (2603:10b6:5:352::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.27; Fri, 25 Aug 2023 09:21:30 +0000 Received: from CH2PR15MB3544.namprd15.prod.outlook.com ([fe80::530b:2bc9:5319:fefb]) by CH2PR15MB3544.namprd15.prod.outlook.com ([fe80::530b:2bc9:5319:fefb%6]) with mapi id 15.20.6699.028; Fri, 25 Aug 2023 09:21:30 +0000 To: Ulrich Weigand , Aditya Kamath1 via Gdb-patches CC: Sangamesh Mallayya Subject: [PATCH] Fix for call feature having nine parameters or more in AIX Thread-Topic: [PATCH] Fix for call feature having nine parameters or more in AIX Thread-Index: AQHZ1yv30H4J47aaDEK1rj/rWmykew== Date: Fri, 25 Aug 2023 09:21:30 +0000 Message-ID: Accept-Language: en-IN, en-US Content-Language: en-IN X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CH2PR15MB3544:EE_|CO6PR15MB4194:EE_ x-ms-office365-filtering-correlation-id: 594d4c0a-2553-430d-f70a-08dba54caab4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lFdmXZ+kADSbnoCaWq2Cgt1uJzthmfLzrdUpfrDpeg8benamKVWljCExGlnjgEgRfM0cCAaJ76+uwpdMEb6haPWyS4nfix6mWfEEbJKd58AwM2EbL0l5KD6eB/b89uHVMcyGbmQUHPXUM8YpbMO1ReDv/+38jg0o16E/MN+lqSQtbKmbXkFNrR2/Suc1NjiJAO7LkGC4LH9IiulFP6Li+cjm1MHY/QxRTS/aGnJnNg5NJVel+lWV42SdWO/UIAvV+9cHVz4midj5Ko+6g/HJ30XcNIrZRYcT7rKXyflCe/dWd32yvsETjl9TSH8gnMT5NtWHwwdI9GcdVIH0nBaJjRPEGHoXjE2C2VnGAg5YoYUBqeyDB8ODzGg9BxFiy+a67FxHhwME6PdDIzLtEhLbqa6GrXXnFuJ69Tftbvpp24+AxsMjOqRRTCFv4sSfgeaUoyIJBQsciNq4dNRIwkJWBUAx5WUfa2r1CB2GnsLB6DWcFBJKyvXA6h0Wkg65m6lYT6LvrQb2JR8uVD3AgiUJcTJ2JmbtQj5POHuIGLBtZ+0qsaEaPzpJQzD4Cut8ZEPLa4HFqDPg226VMV3v1s6RpQ8D2o+bUNsItW2/emAhM/OprpGIBDvFZtIqi18qRQhs x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR15MB3544.namprd15.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(346002)(39860400002)(396003)(136003)(366004)(1800799009)(186009)(451199024)(52536014)(66899024)(5660300002)(4326008)(8676002)(8936002)(83380400001)(21615005)(33656002)(55016003)(71200400001)(38100700002)(38070700005)(99936003)(122000001)(166002)(66556008)(66946007)(66476007)(7696005)(6506007)(66446008)(64756008)(76116006)(316002)(110136005)(478600001)(966005)(41300700001)(2906002)(9686003)(86362001)(2004002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?VqSCGrdpxrPA0cp/hNeE4qJ7oUzeJwB9LopzbUTP3cSlkr7jBsdpsk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aqnnSQn6AUd7yjLtv6UbDxfVg/9X/9WHI0o5Yy?= =?us-ascii?Q?ZWaoW9M9+4FDNunVNE6nDG/gdC8ZDuLlL7gpQ/D/23a9hPimpIavE9K6eloV?= =?us-ascii?Q?vzxmwFBSVLc2krUjveHVh+Zj3y3Pm84yjD2rlN1aanzaV4aOu+PhKSK+TC3p?= =?us-ascii?Q?lGFBf/hiAx6ZkGBN2sK9KHo8o+oPDhmPeEfOZVuVNGzIolbtb4SBxNHtiTgP?= =?us-ascii?Q?r+o/4CDLrl3Ys7TYxHWkZtEPtZZfgVLlEVLnianXzyNGay61yvIBVN6Xsj9G?= =?us-ascii?Q?BaHMZty3/S4bttEvnrXDrUlERqS3uPfNDvwF442XJ0UTB08nbo6/vmJ3Enn6?= =?us-ascii?Q?kkOMeduNKH8jC4J+b5tyf7EdP0Kf838xhnKsNVuJ8akd+0yE7cmfeq06DFyR?= =?us-ascii?Q?7ui4xUmmDRAKBW+tMyi37teDTvvWlpvBFIt7WdKHtoa9u3SeyZHQP+KWkMJH?= =?us-ascii?Q?YJgT2+Y2EKGMRD1IIQdWLfo0tgUy/nW2Ft/RRel70ASP/dKlzfkSMcdGMpBg?= =?us-ascii?Q?TosVHP41ncKgEdSA40j3ouYSxE1l9rLPpRSfXe4s8lfii0TUwEWFv1xV9SBV?= =?us-ascii?Q?gCcbhk8GegkIHLFt6opPRJbg2eUb/q2EJ6UjzYUtE95sGX3RA4anoefJeimt?= =?us-ascii?Q?sddEY1zBlms21Opz5kdPOPCAYmHxoAXfoWlzgjU+jBXAt9HryV8AEPffbpa6?= =?us-ascii?Q?+FtbDGKa6RC3a1iXyrR/EHbLFcr4iuXUmYzQYwqZartMP5T9s/srdljJFVMz?= =?us-ascii?Q?miBpCQ=3D=3D?= Content-Type: multipart/mixed; boundary="_004_CH2PR15MB3544C780BBEC26F108C0E6E4D6E3ACH2PR15MB3544namp_" X-OriginatorOrg: ibm.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH2PR15MB3544.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 594d4c0a-2553-430d-f70a-08dba54caab4 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Aug 2023 09:21:30.2801 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fcf67057-50c9-4ad4-98f3-ffca64add9e9 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: K6xk+CkU1Vpw6G8eXCh+uM2aj55m2a/lHHtRbh2WMJE9lGTWeVhcXs33i516YcGOiaamoMR5kBXd5eoKNf0AEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR15MB4194 X-Proofpoint-ORIG-GUID: 6YjOR6jkfI_QUhESnLOjTBjvLsrXpMGT X-Proofpoint-GUID: 6YjOR6jkfI_QUhESnLOjTBjvLsrXpMGT X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-25_07,2023-08-24_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 malwarescore=0 suspectscore=0 bulkscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 lowpriorityscore=0 priorityscore=1501 adultscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2308250078 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, KAM_SHORT, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SCC_10_SHORT_WORD_LINES, SCC_5_SHORT_WORD_LINES, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Aditya Kamath1 via Gdb-patches Reply-To: Aditya Kamath1 Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --_004_CH2PR15MB3544C780BBEC26F108C0E6E4D6E3ACH2PR15MB3544namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Respected Ulrich and GDB community members, Hi, Please find attached the patch. See:- 0001-Fix-for-call-feature-having-9th-= function-parameter-a.patch This is a patch which is a fix to a problem that has occurred due to non-ze= ro extension of a word in 64 bit mode. Consider the code named as Example 1 pasted below this email. The GDB output for the same without applying this patch with the code compi= led in 64 bit mode is as follows:- ./gdb ~/gdb_tests/nine_parameter_func_64 GNU gdb (GDB) 14.0.50.20230811-git Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "powerpc64-ibm-aix7.2.0.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /home/aditya/gdb_tests/nine_parameter_func_64... (gdb) b main Breakpoint 1 at 0x10000934: file /home/aditya/gdb_tests/nine_parameter_func= .c, line 27. (gdb) r Starting program: /home/aditya/gdb_tests/nine_parameter_func_64 Breakpoint 1, main () at /home/aditya/gdb_tests/nine_parameter_func.c:27 27 const float register f3 =3D 19.0; (gdb) list 22 printf ("j =3D %d \n", j); 23 return (int)(d); 24 } 25 int main () 26 { 27 const float register f3 =3D 19.0; 28 const int register i1 =3D 700; 29 printf("%f \n", f3 + i1); 30 b (); 31 a (1, 2, 3, 4, 5, 6, 7, 8, 9, 983, 19); (gdb) call a (1, 2, 3, 4, 5, 6, 7, 8, 9, 983, 19) 812.000000 9th para =3D -268435248 , 10th para =3D -268374976 j =3D -268435248 $1 =3D -1059136197 (gdb) >From the output kindly check what is going on with 9th parameter and beyond= . It is some garbage value. The reason is that in the 64-bit mode, ideally, I thought from the compiler= we should have got the zero extended and 8 word aligned number but we do n= ot. We ourselves must do it. This is like the issue we solved last year.{ h= ttps://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dcommit;h=3D7aae1a86b301= 85224554d450e233ca967359b75d} So, debugging further I realized that the parameters of function in AIX are= stored in registers 3 to 10. More about this fact can be read in this docu= ment {https://www.ibm.com/docs/en/aix/7.2?topic=3Doverview-register-usage-c= onventions}. If the function has more than 8 parameters then the 9th one on= wards, we store the function parameters in the stack. This can be seen in = the rs6000-aix-tdep.c file in the dummy_call function from line 700 and bey= ond. Over here we have this line below. write_memory (sp + 24 + (ii * 4), arg->contents ().data (), len); This the root cause of this issue. Since the arg->contents ().data () is no= t zero extended we are going to get something corrupt. This works in 32 bit= programs whose output I have pasted below Example 1 as 32 bit output witho= ut patch. In 64-bit mode we will need to add 6-word space which will be 6 * 8 =3D 48,= plus ii * wordsize =3D ii * 8 to the SP as well.. So, this I have done in = the below lines along with zero extending the output, +store_unsigned_integer (word, tdep->wordsize, byte_order, + unpack= _long (type, arg->contents ().data ())); + write_memory (sp + 48 + (ii * 8), word, PPC_MAX_REGIST= ER_SIZE); Where ii is the parameter number i.e. 9th or 10 th or 11 th and so on. After this in AIX, the output of 64 bit code of Example 1 in GDB is as foll= ows in 64 bit output with patch pasted below this email. So, the issue is fixed in this case. Since you all are experts, and I am a beginner and still learning a lot of = things in GDB there are chances I might have not thought of more scenarios = to this problem. Kindly let me know if my analysis and patch is not correct. Kindly give me = feedback for the same. If it the patch looks all right kindly push the same. Have a nice day ahead. Thanks and regards, Aditya. 64 bit output with patch:- ./gdb ~/gdb_tests/nine_parameter_func_64 GNU gdb (GDB) 14.0.50.20230811-git Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "powerpc64-ibm-aix7.2.0.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /home/aditya/gdb_tests/nine_parameter_func_64... (gdb) b main Breakpoint 1 at 0x10000934: file /home/aditya/gdb_tests/nine_parameter_func= .c, line 27. (gdb) r Starting program: /home/aditya/gdb_tests/nine_parameter_func_64 Breakpoint 1, main () at /home/aditya/gdb_tests/nine_parameter_func.c:27 27 const float register f3 =3D 19.0; (gdb) list 22 printf ("j =3D %d \n", j); 23 return (int)(d); 24 } 25 int main () 26 { 27 const float register f3 =3D 19.0; 28 const int register i1 =3D 700; 29 printf("%f \n", f3 + i1); 30 b (); 31 a (1, 2, 3, 4, 5, 6, 7, 8, 9, 983, 19); (gdb) call a (1, 2, 3, 4, 5, 6, 7, 8, 9, 983, 19); Invalid character ';' in expression. (gdb) call a (1, 2, 3, 4, 5, 6, 7, 8, 9, 983, 19) 812.000000 9th para =3D 9 , 10th para =3D 983 j =3D 9 $1 =3D 1041 (gdb) call a (1, 2, 3, 4, 5, 6, 7, 8, 9, 983, 20) 812.000000 9th para =3D 9 , 10th para =3D 983 j =3D 9 $2 =3D 1042 Example 1:- cat ~/gdb_tests/nine_parameter_func.c #include int b () { const float register f1 =3D 1.0; const float register f2 =3D 2.0; float register f3 =3D 2.0; int register i1 =3D 900; return printf("%f %f\n", f1 + i1, f2 + f3); } int a (int b, int c, int d, int e, int f, int g, int h, int i, int j, int k= , int l) { const float register f3 =3D 12.0; const int register i1 =3D 800; printf("%f \n", f3 + i1); static int var =3D 123; b++; c++; d =3D e + f + g + h + i + j + k + l; printf ("9th para =3D %d , 10th para =3D %d\n", j, k); printf ("j =3D %d \n", j); return (int)(d); } int main () { const float register f3 =3D 19.0; const int register i1 =3D 700; printf("%f \n", f3 + i1); b (); a (1, 2, 3, 4, 5, 6, 7, 8, 9, 983, 19); return 0; } 32 bit output without and with patch:- Breakpoint 1, main () at /home/aditya/gdb_tests/nine_parameter_func.c:27 27 const float register f3 =3D 19.0; (gdb) call a (1, 2, 3, 4, 5, 6, 7, 8, 9, 983, 19) 812.000000 9th para =3D 9 , 10th para =3D 983 j =3D 9 $1 =3D 1041 (gdb) --_004_CH2PR15MB3544C780BBEC26F108C0E6E4D6E3ACH2PR15MB3544namp_ Content-Type: application/octet-stream; name="0001-Fix-for-call-feature-having-9th-function-parameter-a.patch" Content-Description: 0001-Fix-for-call-feature-having-9th-function-parameter-a.patch Content-Disposition: attachment; filename="0001-Fix-for-call-feature-having-9th-function-parameter-a.patch"; size=1481; creation-date="Fri, 25 Aug 2023 08:25:04 GMT"; modification-date="Fri, 25 Aug 2023 08:25:04 GMT" Content-Transfer-Encoding: base64 RnJvbSA5ZTUxZjQ2MGI0M2JlMjJjYjk0MGMyZWJiMDliNGYwNGI0YjM3MjhkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBZGl0eWEgVmlkeWFkaGFyIEthbWF0aCA8QWRpdHlhLkthbWF0 aDFAaWJtLmNvbT4KRGF0ZTogRnJpLCAyNSBBdWcgMjAyMyAwMzoyMDowNyAtMDUwMApTdWJqZWN0 OiBbUEFUQ0hdIEZpeCBmb3IgY2FsbCBmZWF0dXJlIGhhdmluZyA5dGggZnVuY3Rpb24gcGFyYW1l dGVyIGFuZCBiZXlvbmQKIGNvcnJ1cHQgdmFsdWVzLgoKSW4gQUlYIHRoZSBmaXJzdCBla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