From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690045.outbound.protection.outlook.com [40.107.69.45]) by sourceware.org (Postfix) with ESMTPS id D609839DA43B for ; Fri, 5 Feb 2021 06:09:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D609839DA43B ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FkyENGvRmbziPFvc9TGELhoHmbdAt2F3Q/RzcFboHu2uni7nyquFE4t0xNiLqEDRlVLLQHeOI8uPvLnR59bpA4URNGZTk54LAiE2hq1uklvW/5jDticrB9pG5J/E80z58guSCpJbgnYArFFMuq0tXP2MyyOsknzdZql1BVt1al4nKDCPemSURBQrYjnkEGPPDXLpl48O/dC+QPhh9G3ca4tiF6ZwZGq4+++5MNwC2BWi8EJb6nzF5WZJ00lLxVBnf5H5OHnBV8D0oQ2F0cAelTMLiQFtSzFxfcNIb5neNwwQDL9B3HhiUM8CTP69TE0Rvae/GGOAAXrhW0xHhnwqrA== 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-SenderADCheck; bh=XmloWm59A+60ORTEZtpHP73RNsxCFzGExZXNKCpumk8=; b=fjNn1Un/fE5bE7wB/7kxRJLTNNj49+wxP5af43LelW1FFyV420z0v85XibGZ7W0euNeairT4gWZFhersnAN2qS6rVJgsrWcTnkgXve+pVTHN/XiZf0rYkZYQD8dWL0k73kQxNdIIgQcn0p5SSNl3OU2gwMfvreVPib1OymbrgV0CtKi9QJd6VsFblipv4vOoVeHAgJrRqQGU59ZWv41k77GknBwqUIi0Xf7fN5L8dWqzAuJ0oDUWWPMZvL8CMfHIhINq77MHFr2s8QnXGGtlax60FxPfgkGbsxHynvkYGZFP827SKmzy8hQYUru9k6iwDrdtm6Te7pM5Zw0vgZN8Eg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none Received: from BYAPR12MB3223.namprd12.prod.outlook.com (2603:10b6:a03:138::31) by BYAPR12MB2645.namprd12.prod.outlook.com (2603:10b6:a03:61::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16; Fri, 5 Feb 2021 06:09:57 +0000 Received: from BYAPR12MB3223.namprd12.prod.outlook.com ([fe80::4083:d25f:e855:79e7]) by BYAPR12MB3223.namprd12.prod.outlook.com ([fe80::4083:d25f:e855:79e7%6]) with mapi id 15.20.3805.028; Fri, 5 Feb 2021 06:09:57 +0000 From: "Sharma, Alok Kumar" To: "dwz@sourceware.org" CC: "George, Jini Susan" , "E, Nagajyothi" , "Achra, Nitika" Subject: [PATCH] DWZ aborted "write_types: Assertion `ref && ref->die_dup == NULL'" Thread-Topic: [PATCH] DWZ aborted "write_types: Assertion `ref && ref->die_dup == NULL'" Thread-Index: Adb7gvnaDnoO8doCTO+8r9M40Aq+AQ== Date: Fri, 5 Feb 2021 06:09:57 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f2ed062d-8486-4f50-a4f1-3cce0dd00d64_Enabled=true; MSIP_Label_f2ed062d-8486-4f50-a4f1-3cce0dd00d64_SetDate=2021-02-03T11:44:20Z; MSIP_Label_f2ed062d-8486-4f50-a4f1-3cce0dd00d64_Method=Privileged; MSIP_Label_f2ed062d-8486-4f50-a4f1-3cce0dd00d64_Name=Non-Business; MSIP_Label_f2ed062d-8486-4f50-a4f1-3cce0dd00d64_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_f2ed062d-8486-4f50-a4f1-3cce0dd00d64_ActionId=15ed1ed5-3feb-470c-bda9-b2de0dcbdcbd; MSIP_Label_f2ed062d-8486-4f50-a4f1-3cce0dd00d64_ContentBits=0 x-originating-ip: [103.139.56.217] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: d9251ef6-00eb-4fbf-9c86-08d8c99ca9ca x-ms-traffictypediagnostic: BYAPR12MB2645: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2089; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MVWR/a7yslB7pvl4EZewpFbqA25VKLGnaQST7VNJFCXFr+e3ZjyG9JYZbG/aAZeMupJr/mlVXabImKEeA8Lc8FM3BpCW3BUWn/GoFFt5jWvJVCOakj3Oz4bVYbDA+et/JzJLSLTFz7ZnZkSAgljACFUKeC+uiJ4TareAzwZEXqgrGWuauZpPzbApqSpaXZFYFUygFcj+wuhgsL37+7htFf3XfTWvApalaFLr3bO9/R73hJAzsgUGaSdjZ2Bv17E1xihq6IAZqkhHT8sf7ELHiqaP4wH2lOu5kBC7Kjvym5BMGgjwF0i7D4UKCgToJ0RtFSf1rJqzibxTkqDMGa3do0ddSBORFbGXqNdSIbmY3Ap3aKzmom6Xgr9WBlQHmCga67hZ0cXumhkXi7IH8EbhgwJjfaSp0PfITakK4il6OeNKfl6IXN3Ywif5ZXLD5ncaBxViAGYvh006hudk77o56I90fZckdGpsa7yI6AkOUsyZgFFRO+se0WB66WPlNWjcKAWCPWLUFStmGNe52T56FJANGiX+H/REtjcwD7TFByIWyqW37ynaZCbzRA0NoNm3 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR12MB3223.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(396003)(346002)(39860400002)(376002)(6916009)(2906002)(8676002)(316002)(4326008)(76116006)(52536014)(64756008)(66556008)(55016002)(86362001)(478600001)(66446008)(5660300002)(66476007)(26005)(8936002)(186003)(4744005)(6506007)(66616009)(9686003)(54906003)(99936003)(7696005)(71200400001)(66946007)(33656002)(83380400001)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?J0zTeT4KaQVemDJXlRPwdgPYh5+GqCsl5yDZmWO+/d4hFWYeS0fpPjz6pV5U?= =?us-ascii?Q?6BbLeW0NqpAloNPRQx2cMCv7jADkJj01RrZfWrXWE1C4coJ1458U9NgOLbwg?= =?us-ascii?Q?PrvD0wqHWuJIOE3AbfZvjLaZoZU8yMA3Ci5yv/vt+qsHBW0LxjO73G/ipHiy?= =?us-ascii?Q?yEB4LtFmilibjS8gnvEfOZNeeHS+5Jb5Zf7aXWHAL/lEv+e1FO/RPu6VqJo6?= =?us-ascii?Q?dXj3huKzqIiz3JZ+I9qsPkbG55oVUrPEHOKifb/gEGJokY9nc7GB5CfXbHS1?= =?us-ascii?Q?S7nsm+l4NVRCqslkoIctbfDnCj5TB2+vDvbWQwOiJTtrBcnoArqeNixiJThQ?= =?us-ascii?Q?VuOjh6c0QGEuIvi4ALA4soOmF0/n90Sc2GWTQMIGEqF9bRzpif0fZY46J4qM?= =?us-ascii?Q?TS9pNhIHUkaJZkbEzAPKsUp3d34P/SEK8Ngy6Vg8K+SIYHvVoVPRy3DerUhV?= =?us-ascii?Q?E92vzPRdroIqqTj2oI6V8JFGbal1rvF9+h5o5OtVWUs97KLtR6LnRZ+xhxoG?= =?us-ascii?Q?aW5k0W/c2m4KjWaIKuUjhf/8b/4FZ+SEFgg6flCaH/iYEh22WEFjSLKZyx1N?= =?us-ascii?Q?5I8XWZIKj2eg/ajlkV++KisnL4Guktg5nut+cX05nKFywX10+i4QjsXjubZ+?= =?us-ascii?Q?pgORBiaTM+uWykcdgHhbbDfNZ2XJk/uJZbEP8pvsJHZ3VckS0wxE2i+kgMFm?= =?us-ascii?Q?PYxTQAJZDOyeFuFbPN2C0Ys0UIIdVD+VGgIK1c1fVS6H/WLsF/dEarBgg5Gn?= =?us-ascii?Q?cbCT6nK0rmdUWdMKAIn0XwTSLy28PA8hLfgPuVBt/d8n1exY2jLZ1S43J5eF?= =?us-ascii?Q?0Uav8PsfIbLLZRAjK63+83RMZq2ZFMD0R+8Cq9uzuLgev+6uMJeKv8zJRn3F?= =?us-ascii?Q?9RUtvTBy6Zy8clg3auLhXg+b0EXCRUzacS2+6mqsChTWkXEAu9kJn/OXIzbW?= =?us-ascii?Q?KL5iQM4MSpA7OvL02URo1DfpJ8Wq7UiLNU4Qx+IGvut+gKTQ2itEc9twegij?= =?us-ascii?Q?HxlCSCm+P/6K5gTHpYWOhknsHKqk8kxBEXEJHT4fw13pqAWnxfl8glTOAajR?= =?us-ascii?Q?L5a0pf/HRTWuhfbxZgrtCkSntuU2ofmJZD6HimaG0NWMfEAMN3XutBiyk1XC?= =?us-ascii?Q?xCPTUG2Qr0RsiYkN5OqPuddh6ymrJdWSXat1H5sbO241giN0+5w3Pdz5HsHg?= =?us-ascii?Q?DVkh4uXpWWSSqSDwGf4dN6KHMgh/x0IiMlx8ivijU0T7SR2UBPMZLBvl5Txz?= =?us-ascii?Q?uxjb/NUc9gIVMF28n1Ed5CnzTjQJSgRWOLdDtZvp7H3KxraIiQfY6SoO3wiF?= =?us-ascii?Q?cXx6HVSyvn0yNPCuxv9Uo3qP?= Content-Type: multipart/mixed; boundary="_004_BYAPR12MB3223E443D810D86923E2051C9EB29BYAPR12MB3223namp_" MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB3223.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9251ef6-00eb-4fbf-9c86-08d8c99ca9ca X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Feb 2021 06:09:57.2734 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: pCtiELm3R446FzbTkNd/CmbaI+G8gifuHQlPuCciUaqgqtEMnqBGuIiH0OxwaQ4M3kJUSL63JTrbvzbl6FMsow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2645 X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2021 06:10:03 -0000 --_004_BYAPR12MB3223E443D810D86923E2051C9EB29BYAPR12MB3223namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi all, Would you please review the attached patch containing modification of asser= t condition. It was required to fix an abort which seem to be incorrect. There is an assert condition as "ref && ref->die_dup =3D=3D NULL". As per definition of "struct dw_die", the structure fields starting from 'die_dup' are present only if 'die_toplevel' is 1. In line with this at multiple places in code, full/paritial memory is allocated for pointer of type dw_die. Ex. die =3D pool_alloc (dw_die, offsetof (struct dw_die, die_dup)); Due to this, since memory is not allocated for field die_dup onwards, it may contain junk values. Macro 'die_safe_dupe' must be used in place of directly accessing 'die_dup' field whenever required. * dwz.c (write_types): Use 'die_safe_dup' to access field 'die_dup'. Regards, Alok --_004_BYAPR12MB3223E443D810D86923E2051C9EB29BYAPR12MB3223namp_ Content-Type: application/octet-stream; name="0001-DWZ-aborted-write_types-Assertion-ref-ref-die_dup-NU.patch" Content-Description: 0001-DWZ-aborted-write_types-Assertion-ref-ref-die_dup-NU.patch Content-Disposition: attachment; filename="0001-DWZ-aborted-write_types-Assertion-ref-ref-die_dup-NU.patch"; size=1454; creation-date="Fri, 05 Feb 2021 06:05:55 GMT"; modification-date="Fri, 05 Feb 2021 06:05:23 GMT" Content-Transfer-Encoding: base64 RnJvbSBhMzI3NGExOWU1YjczYjdlNDFlNzRmNmRkZmNkZDIwNzNmODNhYjYzIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbG9rIEt1bWFyIFNoYXJtYSA8QWxva0t1bWFyLlNoYXJtYUBh bWQuY29tPgpEYXRlOiBNb24sIDEgRmViIDIwMjEgMjM6NTc6NTEgKzA1MzAKU3ViamVjdDogW1BB VENIXSBEV1ogYWJvcnRlZCAid3JpdGVfdHlwZXM6IEFzc2VydGlvbiBgcmVmICYmIHJlZi0+ZGll X2R1cCA9PQogTlVMTCciCgpUaGVyZSBpcyBhbiBhc3NlcnQgY29uZGl0aW9uIGFzICJyZWYgJiYg cmVmLT5kaWVfZHVwID09IE5VTEwiLgpBcyBwZXIgZGVmaW5pdGlvbiBvZiAic3RydWN0IGR3X2Rp ZSIsIHRoZSBzdHJ1Y3R1cmUgZmllbGRzIHN0YXJ0aW5nCmZyb20gJ2RpZV9kdXAnIGFyZSBwcmVz ZW50IG9ubHkgaWYgJ2RpZV90b3BsZXZlbCcgaXMgMS4gSW4gbGluZSB3aXRoCnRoaXMgYXQgbXVs dGlwbGUgcGxhY2VzIGluIGNvZGUsIGZ1bGwvcGFyaXRpYWwgbWVtb3J5IGlzIGFsbG9jYXRlZCBm b3IKcG9pbnRlciBvZiB0eXBlIGR3X2RpZS4KRXguICBkaWUgPSBwb29sX2FsbG9jIChkd19kaWUs IG9mZnNldG9mIChzdHJ1Y3QgZHdfZGllLCBkaWVfZHVwKSk7CkR1ZSB0byB0aGlzLCBzaW5jZSBt ZW1vcnkgaXMgbm90IGFsbG9jYXRlZCBmb3IgZmllbGQgZGllX2R1c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