From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by sourceware.org (Postfix) with ESMTPS id BEDB63858C53 for ; Wed, 13 Apr 2022 16:57:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BEDB63858C53 X-IronPort-AV: E=McAfee;i="6400,9594,10316"; a="243306220" X-IronPort-AV: E=Sophos;i="5.90,257,1643702400"; d="scan'208,217";a="243306220" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 09:57:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,257,1643702400"; d="scan'208,217";a="724975608" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga005.jf.intel.com with ESMTP; 13 Apr 2022 09:57:54 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 13 Apr 2022 09:57:53 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 13 Apr 2022 09:57:53 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 13 Apr 2022 09:57:53 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.177) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 13 Apr 2022 09:57:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B8uUGPjPxrYdrcmL08IviquSdr5t1Q2RRcJ2Acva/4GiGVqWDxss7jUVoyYo8youDrOUvHTSr/NTeDTIU94eD6gcqRVnzcjrK8n7K2NC7ce7JHVpIECmqYV4L0SLUtjRyosJYPlOPQbcwbpTR2Hpl5ioBHR5w4uhS3x3rGf64SaKZGdWa5dhpDpIlnm/M3imWej026x/xXayBCZ7Re+gqwWIymqxSFmyW+TS1uF9H3PbSJn8X5XqIs9ZuUaY42hDSLlsJorXzc1L4WCIwuc9d6TZohc7GBlXDusWNzKkSs39JlJgaOGGZA6TqUKQyWFFnAzJscW8eUkGZjox/QOSOQ== 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=VI/fKV5zkXNDBlLBs5pZl8nAtAJQ+S7is+DmBv/x+OQ=; b=WOWvYnVNlZPFCat2hruTSJ4+rDlQtGX1XqUsrVouFcxhFoGbtXyYq70gPaFplQxuHtPgBAU3yZLUpP5baOLljOfpVnX8tV0l5cQp5B77Eobyrs30fY5ydPNANFiJ0JFdwvEZK5q0tT1x5UC/CPcoU+yj0zkJGkbxgsGr9IBfUH1Ulfi5/JTSR8c05R4Lj4/wWOzdRy6C28j8wXWAcHfZrR/oym+D887zBYq2PjYQeCVbwikKnaMIsaa7GrWlXc6EX8lx0w4frTcU2SCzI3haTPP99Jw3QGkxA29DpyIYwVA4QjuQ+4iQsqOMrDRv/MpSWGl/cHBzMWD3dB+1EUAvSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB4564.namprd11.prod.outlook.com (2603:10b6:5:2a0::7) by BYAPR11MB3526.namprd11.prod.outlook.com (2603:10b6:a03:88::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.30; Wed, 13 Apr 2022 16:57:51 +0000 Received: from DM6PR11MB4564.namprd11.prod.outlook.com ([fe80::7020:861:32c3:44b6]) by DM6PR11MB4564.namprd11.prod.outlook.com ([fe80::7020:861:32c3:44b6%6]) with mapi id 15.20.5144.030; Wed, 13 Apr 2022 16:57:51 +0000 From: "Rohr, Stephan" To: "gdb@sourceware.org" Subject: Issue in dwarf2/expr.c Thread-Topic: Issue in dwarf2/expr.c Thread-Index: AdhPVlK+Yrom0as+TeaLasSnLw9Ksw== Date: Wed, 13 Apr 2022 16:57:51 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.401.20 dlp-reaction: no-action x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 431dad7d-b6c3-423c-9aef-08da1d6ebf10 x-ms-traffictypediagnostic: BYAPR11MB3526:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: EHdLXF8Eh99jriNr5Hadki0/FKEmeThP/MsEYbMdOKuowjdSK2QcNNPIm83NsztaHyZ495CUCMSWjuKeYxdXwj1nqV2qAlbcHo2wBzzqV3+gVYzaUz+LC/dRMhYrlazUEF7yTCEHRmenJ0m4lt48Vm34FZt1D7mROKD2cocQKHAHDK469BE5MVt8AeBKQhE0Na8vocV84tNY2afaXhALZGwHbil/HGtTfR4d9xqabS6QSGAwcgp7HOCSErdDuafSK6r5fnWoMQ3VPXOslclPvJ1KeXpQ37O3I58Y6KO/mhomwxdHQ7Vy6Uwx5a3I1MrhDGWEp7fXHkx1JyeeKVmznQez20V0g5+1FjVVJ2tLXAY/5kyW8W3aYGJ2qZVxivL26cJJyn8OfZ2Nh0TpMiIRw7jSxR3ce35KCeqNwOZhrF78JSSmSAf9dUJZ19FV36rHVC/IS+bAzc5iJa1t3bO0dc3A+yT4KVP6saYSAL/4cFkBcT5D99FbReHoTf+Q6dfhcNrOYjtXmHuo4QOx9z5S36WwSnMRCV9TMmp+0snzq/mmYej2QjcDqo8zGVIPKUpob7xmA9ziTsg2Nqn78JOOSLM7/nRXNxqrVrIkrqhVws0xSfcTQcqZcpFq+Uuk/dwUJRVdmZadvtAY/UtsiRH1E6gHUqPgypAykqcIjgcVoesomgm/is1lYSb9MvotAMb6Q0gdyukQe8ZTQdm0bqmIKw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4564.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(55016003)(122000001)(316002)(64756008)(8676002)(52536014)(66476007)(66946007)(66556008)(38100700002)(38070700005)(6916009)(71200400001)(82960400001)(9686003)(7696005)(508600001)(76116006)(66446008)(6506007)(4744005)(186003)(5660300002)(33656002)(26005)(8936002)(2906002)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?jsatBV1y/e8mHOzeChJBcdTHQOifNWcSe7Zro06FJE+f84VDZJYi2Q6IxmOX?= =?us-ascii?Q?WLGNBIM1u9PKgmPQfM0asu3a/LRec2R2VR4ofqzj1ypglZ5tds8U49nozxeo?= =?us-ascii?Q?GQyvImZdLZayBOaRdkzxbzqCuWCCGDts9sR45WDV9A6R6TfkDyuySG/9AOnr?= =?us-ascii?Q?BDmuLlJZWcoxBFPt20w1nV4+GiZBAVAUXMwloHcPnoP0sPDn46Rkd7TQq+8I?= =?us-ascii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gaXn57raUYtseU6c2hLksN?= =?us-ascii?Q?7J/W/OJ5B5vvjOh6kdGFgTQ7l5tMB4NKZadPX62Q/L0bQTbSE+n/tY+eZWtL?= =?us-ascii?Q?3LOYyopFylFrU0E0PKv1b6CniWh/A3/eIBztx15QlLd9+c6YU5CHrk5IVfKA?= =?us-ascii?Q?zvb3bRWrVBPHxoAry+Q32uHTnOe7Makra6cnWunah1hKXqpwIPChCfqGKhFi?= =?us-ascii?Q?7oaffJ+2aXOeqnna/HxEyDx91KVQj9v70Yuv8s9U28syvJUugS9gRiYjnMUn?= =?us-ascii?Q?6unILcG+2M9d2wCqWF7TI0OBIQLr2wMyMLe5C6EAnYEiy2NQ+21303myzcGh?= =?us-ascii?Q?DaeT2VgVJmKbXCNGgHIao6a5QtG4qGS+8fQuxxhJ1XHNaXaoJXUvhJDQh1BP?= =?us-ascii?Q?SME4YPMGUFIAWHdnVUkO88r8bYK7+RZpaTc+1VuovMKOhUG9RVZ/+oi7+wld?= =?us-ascii?Q?2PHxj/l1azq4BacnBHUF1bzJabXefCj7Wba9q4qvFCqfl4tUN2ZP40lBZIGJ?= =?us-ascii?Q?nvHfkWuYfdqDh9RwFKdQ6tjm3bcHh+rtM0X7fGr2nsg72kqZkcnbUfiLLuxi?= =?us-ascii?Q?nlGkNqRlkNgDtrdlm4OqTogLlLxBFVmCB9O5YHIoxcWC3BUqsAWkPkzvRWTT?= =?us-ascii?Q?4LXvFp4n4w=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4564.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 431dad7d-b6c3-423c-9aef-08da1d6ebf10 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Apr 2022 16:57:51.4866 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XPPJYtalFieR68z1H3GJzWC3sMc8WHosrwYYNs32NaxCR3/yjVFo2O/+oqM7gIz2voEHQbPVYYOHZ9F7JOplbg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3526 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2022 16:57:58 -0000 Hi all, I came across a bug in dwarf2/expr.c:177 in function rw_pieced_value. when= reading a pieced value described by DW_OP_piece or DW_OP_bit_piece. if (value_type (v) !=3D value_enclosing_type (v)) internal_error (__FILE__, __LINE__, _("Should not be able to cr= eate a lazy value with " "an enclosing type")); This check can easily be triggered when casting a variable with location de= scribed by DW_OP_piece or DW_OP_bit_piece. A minimal reproducer can be found in gdb/testsuite/gdb.dwarf2/shortpiece.ex= p, e.g. casting s1 to an array type triggers the error p (short []) s1 I currently struggle to understand the reasoning for this check. I could th= ink of changing this to if (TYPE_LENGTH(value_type (v)) > TYPE_LENGTH( value_enclosing_type (v))) to support the cast operation. But in general, I'm not sure why this check is needed at all. I appreciate your feedback. Best stephan