From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id D87C93858D32 for ; Mon, 13 Mar 2023 13:04:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D87C93858D32 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ibm.com Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32DCrX9X012687; Mon, 13 Mar 2023 13:04:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : date : message-id : references : in-reply-to : content-type : mime-version : subject; s=pp1; bh=LHUBczhKkaKKh+3Pquq5cv/Q7rwe8hve0FS4gETb0+c=; b=A5KfrkYaV1jvGeXPwM1y5djEM9yjTCZXb51Y/65nQf6q6J9vAau0sW8MdYwvXRkSIHJ5 TGNQLWhUbfxfvhEsYXg3OHCiS3W+5FBQQFS4BDSARoffrrfYFCuPafB7ir40CtxfaFGz r8w1Oh0NUPQ625p0AEyA8DqK9hjdCdvQ+701DKxpowhX0imc51NFn6m58HLzoSJZRy4Y AfHwP+IfdPQQI+nDpBWTrbXeslIr4UjsYQcTlOW+dabD2vdYlZiR7qTPG4usEgXAZ5Mo xaInD1xMuyFDJTDVaYdMe99S7bGbRV7S1pP83uEg2SKRT4wyYfpM0nrvdKBZBE7tY2+l KQ== Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2042.outbound.protection.outlook.com [104.47.56.42]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pa47s0ae1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Mar 2023 13:04:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kDzo4ud38jOq8oRD5SJkN4EDsgGk58szp1+F8dUvU+xHrPwgSGTHnkqb8Sg9tpi99ku+WvLYprAUu2ulubqmhrLLCT7lEuls8AmAbZrT7ERaedzNn100mDqRUjcewR4e/6rdfYos+qxOULZJGExh5TobXc437mpEfT3MhHkga9C4MNz01lQkvI2RkyvfJKZMfh47F/NEdhMzPgtrJEzhWkFjL9xtaOSbhuwC+Vd7xCZG1CYi8btIHv2PEUT3IrhcCLXunqTyXPL1CPXe29bazzJAdRvdChSJICygoSky27MM0EGHvdpuBBjXTCOHv8xs3NGfjVv2U3Cyd5TPlR4W6Q== 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=LHUBczhKkaKKh+3Pquq5cv/Q7rwe8hve0FS4gETb0+c=; b=Z7vKKDh42bnI2V2teHPJj0SZT6YJKMqlZlmJfx1tOV8t8fEXb+/vZo/WA6VVhSwTHN96dbwf3rWQpyeLMyDLzjO96rNP06HdzXa31YNokv2BQBpfwGz1pKqFkOsE3PsMrLig6cMHfDOKvbYRFEqjlk4ZdcBSbLGeRPE1PExwZZ+K6mkMAosTMFYFG2Hfoe9sHXQdtcrhCKWMToBN9qLIukIcyKkJd/jz6unOLhXmiykT+g24QTdWB6b/w90ZQYKkSu5HQZb/Ta8PMn3ipoWthnHdvRe5dEbfCELaYqBNomGhuUwxTImG4wjBAVaF/n1W7XmtyrDjC8UyL+5NvOD/mw== 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 IA0PR15MB5522.namprd15.prod.outlook.com (2603:10b6:208:442::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.24; Mon, 13 Mar 2023 13:04:45 +0000 Received: from CH2PR15MB3544.namprd15.prod.outlook.com ([fe80::cb98:8c4d:b2e2:c281]) by CH2PR15MB3544.namprd15.prod.outlook.com ([fe80::cb98:8c4d:b2e2:c281%7]) with mapi id 15.20.6178.024; Mon, 13 Mar 2023 13:04:45 +0000 From: Aditya Kamath1 To: Tom Tromey , Aditya Kamath1 via Gdb-patches CC: Ulrich Weigand , Sangamesh Mallayya Thread-Topic: [EXTERNAL] Re: [PATCH] Modify align-c/align-c++ test case for AIX Thread-Index: AQHZUy5Xo/Uygz9kLUCbeW/Sh+yLcK70GEzygASVxgU= Date: Mon, 13 Mar 2023 13:04:45 +0000 Message-ID: References: <87edpwmzpz.fsf@tromey.com> In-Reply-To: <87edpwmzpz.fsf@tromey.com> Accept-Language: en-IN, en-US Content-Language: en-IN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CH2PR15MB3544:EE_|IA0PR15MB5522:EE_ x-ms-office365-filtering-correlation-id: 2ae42aa8-3eaa-416f-8cbf-08db23c38483 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: T9tFFPlv2xNyyPsnvsUiMerUre3MlE60S1HggUOHmuT9t/XwbpPoLPIeYqTivjQ2+Jb/Jtul7j5RSj8LcRm80Hpsbx5XN7o1WEL9wqWXUDsWdxPlY3HTLRDdoflEBu20vi+Hc7mca3yQrgk/AyZzZfKRpjbQ/DxZR4OvG6lD43HCDCCvUmiV9RZZ1Xd9L/YrSJPt+w79WvPvzBlvVO19qHDq81H4LWoKvGQkQj2no96g7NrMUpu2eZUZs+Az5qhEU9SuJ3zTwVkTgzeoEvKw9lyehmwqna+DpfPfaH4bgs3QBrOs9TD6YYAQXeDawQWoMUzNTL/brnKpnj1XgIwuKGsWYEFX6dMjdE1SJQuZgq/IhSNttO4BRq74Ebs99vEzzaS6z5/Yx4/diMNad7ErQlcqDG0dOrlYmrWglFBBLHVtFBHJK990+R3q5REhw9H1qTuJZuPQbJd+3KpCA9jetjuh3zACYsBaYOC2SawSawAvcaFqaa1WBAKu8DUMRhDtasIscnvYZX9km0zQDbeAlRIhXvBJtU/nHWsygGv77PILkA0Qc3bE8vzieg8IAC7V+OSFZjau7z5axsX64E9yXIskcxfcjod0fsdUgG65POgnRt4cLxBdjT5Iz6Vd9zwumDA0ZqyIjwseKvj4wpWM6xx4hflXUN4SWJojY12GSEwBoHDkTxOyJ41QOBoCc6+m9ed9HAoKFgT1osjJHCnjqQ== 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:(13230025)(396003)(366004)(376002)(39860400002)(346002)(136003)(451199018)(38100700002)(7696005)(76116006)(71200400001)(2906002)(41300700001)(8676002)(91956017)(66556008)(66446008)(33656002)(66476007)(64756008)(55016003)(4326008)(478600001)(316002)(66946007)(86362001)(54906003)(110136005)(122000001)(5660300002)(38070700005)(53546011)(6506007)(186003)(9686003)(8936002)(52536014)(83380400001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?vdMFmFmsh7JUIrn7C7q8YGLqP65VNtBsJmL4/yoWBWvk78Ycse3yVKLF?= =?Windows-1252?Q?qYcPGLP03Sm3Ye8/VnCEUJEm3FqHJ+PdruJC3UZKmFPcy5fSWt5KP38A?= =?Windows-1252?Q?1zEgs3b7aTXuNOc+7e+XCjmZva45b1jE1w29Kn73OSXe7duRnqg6emoZ?= =?Windows-1252?Q?RFH8Wi/US57S8MtRSZmq8pPut7oqmspywIf8DdSoa9iq+U8Wj2SiAFH0?= =?Windows-1252?Q?VUal3disMZkTdZXZ0epwiH7EF0a30mTDN33jmceERqL/WPjFClEUpbI4?= =?Windows-1252?Q?ETEm3Y1Ao8821E+YdGDIzXa0ibudbNG3GKaP1esW17jTpvuEX3pvuRcx?= =?Windows-1252?Q?FbWer20iep56H/NQgj++OKE1W6bFgq8LNTQcQF675wJAKQY3ZgayeT9x?= =?Windows-1252?Q?BKKZ3BzjOl2a0jxKxUI6FqB+JpPLGvKcwaNcT/Ws1ViYcKDUqfjOtYn8?= =?Windows-1252?Q?Jzc4gY8yNrfchmr6TDN+Nyf/Hat35Z+rq6V5OjMgS+pM5W47ApbAwLBZ?= =?Windows-1252?Q?iofNSf+GhTEMiFt92RTgL31kNbHTOxd9qe+5Tw7cDqIhZndBphP2GhCS?= =?Windows-1252?Q?E9oMLAff6MLgkAAVks2TvcX3lpIlZSslAJEVweNuVXEwa933h9TljFG/?= =?Windows-1252?Q?K58s9qiyO1+REnv2IL/JLRCYMK7/sdHk7lYyuKYud72L/+1eOLT5BexV?= =?Windows-1252?Q?ITquzSeLWTKUI6d4G77YRPFD+OTbkw9OSobdgHbb5CibQwYCWYSkhVX6?= =?Windows-1252?Q?HtK2e/AL+/MVxrAKRER8LXJE88XAfkyxBF2ILo84q8ZBZ1j/SlYV3mgg?= =?Windows-1252?Q?3A+fIWrHUn9pVBOOYYCQ8iM8KdWkrKWnKlbDSd+fojsGrJM60wHNBRSL?= =?Windows-1252?Q?LS8niiPLvZdWK+l6HRsL4+q8rlwx0Y7RJx1VXSevxhrD975J/nhFMCW0?= =?Windows-1252?Q?ntcuUeAlo9NdliyMozR7vV22B8vPZ33wTq6oLW9iZJhtmf3Dg5xWUnrs?= =?Windows-1252?Q?f0igu8xXauzXU/1tc3unOWkGcfgvG992IdE3Y1Id4ZWWxb+P+qR5/YTA?= =?Windows-1252?Q?mKJKTlDq/uIX3ulCXn61mJvpjRefMOOUrx3W8tfDFWoTxboviahwgNGh?= =?Windows-1252?Q?FbxhhjH4te0fHTnAinRgDoW2o0E8q+t1GGfkq42Cksd4/RY7rIKMWVBf?= =?Windows-1252?Q?g9nSQtO8YkdxbNDY7jxMwJJnxPZmffNfyFu1J/zIIT6C7d7jsvOeTqcD?= =?Windows-1252?Q?zYwbeNmyeAwPOTQKLNvRXJBqPWMOklcHdBAN2DKu2Skpm6yFpmKGkfGg?= =?Windows-1252?Q?sej6pH29ugviYdUwZfsnUreT2Jr/b8kP5TbChQoluqvadZFpbt+dKv24?= =?Windows-1252?Q?Em5VBP8docRrwX1ohYHJUyWxs9XCIXxwOPJrngjA+zg8FRhh+APzZsGe?= =?Windows-1252?Q?mvDyp2Zppm1klMr7GTdGfBzBIJk2hhQDRBywxkk97x1O80XzeQjRyaMl?= =?Windows-1252?Q?e87lQkMsAHt2BhFQVGt7+6xOurvy02IKuReb0nrFUvmeS1UxBzWZ+/zS?= =?Windows-1252?Q?ppCMATln9QKVDRxUKlsCsupdl9bCM3QeNPLgzegUJGhHnz5Ffr6dqea/?= =?Windows-1252?Q?aEmHr74gQGaJ9Wv16mV9khjfN8bEY8qz/Y58rWGcHvIYX5vEN9HyqWP/?= =?Windows-1252?Q?wewmPA4lQE12sAuR/u+CdJocnvsith3lHnSP/fD9NImMA/wj/LzhhFX3?= =?Windows-1252?Q?b/IFxepZeklt615n/sO/Ng6b5zH69csrE/q/7k/vGGMO2J/jRcoeFyR+?= =?Windows-1252?Q?IM4Z8kt+5cpWKKKFV8odzGFWBIY=3D?= Content-Type: multipart/alternative; boundary="_000_CH2PR15MB35446440EE3483060CF8A2C8D6B99CH2PR15MB3544namp_" MIME-Version: 1.0 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: 2ae42aa8-3eaa-416f-8cbf-08db23c38483 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Mar 2023 13:04:45.1397 (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: 8HJTgNhwY9nyQINY4C9DBPF8qDwvzbAoJdxz+zhl91r3jC0aPuZMBMP5sy8p76AzzS1Im2Bv7UcjpnGhnKXmHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR15MB5522 X-Proofpoint-GUID: DCPQcSyyH-p-W-WZVbbU2f3LZIqfvLLv X-Proofpoint-ORIG-GUID: DCPQcSyyH-p-W-WZVbbU2f3LZIqfvLLv Subject: RE: [PATCH] Modify align-c/align-c++ test case for AIX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-13_05,2023-03-13_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 adultscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 bulkscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303130102 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --_000_CH2PR15MB35446440EE3483060CF8A2C8D6B99CH2PR15MB3544namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi Tom, Ulrich and community, >> In AIX, we have observed around 1500 failures in align-c/align-c++ >> testcase. The reason being this testcase shows the alignment outputs >> of global variables that are unused in the main (). In AIX we need to >> use atleast one global variable to access the same. > Could you say why this is needed? Consider the code:- #include int global_variable =3D 1; int main(){ int local_variable =3D 1; printf ("Simple print statement \n"); return 0; } When we debug with gdb and try to print global_variable this is what happen= s:- (gdb) b main Breakpoint 1 at 0x1000052c: file /home/aditya/gdb_tests/simple_test.c, line= 4. (gdb) r Starting program: /home/aditya/gdb_tests/simple_test Breakpoint 1, main () at /home/aditya/gdb_tests/simple_test.c:4 4 int local_variable =3D 1; (gdb) p global_variable ret =3D -1 ret =3D -1 Cannot access memory at address 0xffffffff This ret =3D -1 is a printf(=93ret =3D %d\n=94, ret) statement I have used = within my rs6000-aix-nat.c code to check what my ptrace call returns.. So what happens is ptrace call in AIX is not allowed to access any variable= or rather say memory or a segment which is not used in the user/debuggee = code. Hence ptrace returned -1 and therefore the address 0xffffffff is used= which we will not be able to access anyway. Now Consider the code where we use it:- #include int global_variable =3D 1; int main(){ int local_variable =3D 1; global_variable++; printf ("Simple print statement \n"); return 0; } (gdb) b main Breakpoint 1 at 0x1000052c: file /home/aditya/gdb_tests/simple_test.c, line= 4. (gdb) r Starting program: /home/aditya/gdb_tests/simple_test Breakpoint 1, main () at /home/aditya/gdb_tests/simple_test.c:4 4 int local_variable =3D 1; (gdb) p global_variable ret =3D 1 $1 =3D 1 (gdb) This is because now we have the main () using the global_variable and hence= ptrace got the access for the same and could return the correct memory add= ress. The key thing is user functions need to use global variables to get access.= Otherwise the ptrace calls will return -1 and hence in our align-c/align-c= ++ all the testcases failed without the patch and the moment I used one glo= bal variable ptrace calls got access and the test cases passed. Kindly let me know if you and the community think the patch in the previous= email was therefore the right thing to do. Have a nice day ahead. Thanks and regards, Aditya. From: Tom Tromey Date: Friday, 10 March 2023 at 8:18 PM To: Aditya Kamath1 via Gdb-patches Cc: Ulrich Weigand , Aditya Kamath1 , Sangamesh Mallayya Subject: [EXTERNAL] Re: [PATCH] Modify align-c/align-c++ test case for AIX >>>>> Aditya Kamath1 via Gdb-patches writes: > In AIX, we have observed around 1500 failures in align-c/align-c++ > testcase. The reason being this testcase shows the alignment outputs > of global variables that are unused in the main (). In AIX we need to > use atleast one global variable to access the same. Could you say why this is needed? Tom --_000_CH2PR15MB35446440EE3483060CF8A2C8D6B99CH2PR15MB3544namp_--