From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2060c.outbound.protection.outlook.com [IPv6:2a01:111:f400:7d00::60c]) by sourceware.org (Postfix) with ESMTPS id 973EB3858D1E for ; Wed, 29 Mar 2023 13:07:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 973EB3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v2oiYlTQdZRYsH87LT/heUP+YbbgHqjP6j7bK+TNX+Q=; b=eUUpNZmpcVzYAE2JsMwaX/DHt9sEBw/u8qgDHSZekMIpTIzGVZfvR5rPynGu8VpY7ct4f2eb0zArBZZJ+qe+bk6Gii4zR5ANn1UDk6+MMYE5AsBbJKEpMZsmarpTLYgCI58S/tuNdOQEoUI200nlrZUIqg7mn3iRSgpwH4zjAgs= Received: from DUZPR01CA0234.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b4::25) by AS1PR08MB7452.eurprd08.prod.outlook.com (2603:10a6:20b:4dc::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.29; Wed, 29 Mar 2023 13:07:08 +0000 Received: from DBAEUR03FT022.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4b4:cafe::5f) by DUZPR01CA0234.outlook.office365.com (2603:10a6:10:4b4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.43 via Frontend Transport; Wed, 29 Mar 2023 13:07:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT022.mail.protection.outlook.com (100.127.142.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.22 via Frontend Transport; Wed, 29 Mar 2023 13:07:08 +0000 Received: ("Tessian outbound e13c2446394c:v136"); Wed, 29 Mar 2023 13:07:08 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 3255752ba29e72af X-CR-MTA-TID: 64aa7808 Received: from b2effd553fa8.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 56011548-7EB1-4F2B-8AFF-9C223E1106A7.1; Wed, 29 Mar 2023 13:07:02 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b2effd553fa8.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 29 Mar 2023 13:07:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WhJv8sod9qCAeg85DSBiX8io+0l+mA0XlyK7OvnT9O/X6rxb08ie+wUM39fc7UvpYLN14oSc9e3xT0KBLjxe6Au+vcIlotWK8vG1AYcXolqTuD21uLmU+JKe5wS5gZdtUephqi2G0/gdrjyif8kzMwm48JM85EBhxECp0VBuhB+MnGkCu+hptrGfWrLSUv8QdbrIOudFb/ogctbuFeAztf84E0zxORicP22hhQqAj9ODWZBZbYhp0AwcSczLdPH1k4/Sb5qblMgkgGVoBDo2JoV40VjnrFQVaID7oBqrIRz0flCrDZsMRwW/A/jeLBAvBJV+xMUENXAnHrd8BcemvA== 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=v2oiYlTQdZRYsH87LT/heUP+YbbgHqjP6j7bK+TNX+Q=; b=gDNTvA+bp0IsJPiqEXiimkg9BB1FIl2w38CG3cBc80X6wYu6E3jAfDb1fV0pLoLA/0J1Ij9pzkW//DWiQiLVMKvkMaBz2gidMw0mijJTlTAZ0MoIIVQID86SvOSQlp5cbFIdxYn7LNJ+S2MDiWIQmJgV+us/1cedaN8bD9HowpeNe/X+kCUKkekE/m9niT20jOWOXoH8sqfuKiJhdAmPOtw/gFSdpMp2xZ7CZWxeGeyRbztZOvvnAonJOqFBqXBKVvmEEUenfPmGVdQf5LxsigVjtwect72ZsP5UripbJWxWq0chBX1l74cIK2NnemDM3sXPGWjS3LqXVmGbt7v/xQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v2oiYlTQdZRYsH87LT/heUP+YbbgHqjP6j7bK+TNX+Q=; b=eUUpNZmpcVzYAE2JsMwaX/DHt9sEBw/u8qgDHSZekMIpTIzGVZfvR5rPynGu8VpY7ct4f2eb0zArBZZJ+qe+bk6Gii4zR5ANn1UDk6+MMYE5AsBbJKEpMZsmarpTLYgCI58S/tuNdOQEoUI200nlrZUIqg7mn3iRSgpwH4zjAgs= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by VE1PR08MB5565.eurprd08.prod.outlook.com (2603:10a6:800:1b2::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.35; Wed, 29 Mar 2023 13:07:00 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::7386:6dd6:e6ba:dd94]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::7386:6dd6:e6ba:dd94%4]) with mapi id 15.20.6222.033; Wed, 29 Mar 2023 13:06:59 +0000 Message-ID: <4a3a9bef-cb26-d52d-5c76-66092966a7ef@arm.com> Date: Wed, 29 Mar 2023 14:06:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] aarch64: Fix an infinite loop on bt when the core dump has an SVE section but the target does not support it. To: =?UTF-8?B?0JTQvNC40YLRgNC+INCc0LXQtNCy0ZTQtNGM?= Cc: gdb-patches@sourceware.org References: <20230319205529.75469-1-dmytro.medvied@gmail.com> Content-Language: en-US From: Luis Machado In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0375.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18e::20) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|VE1PR08MB5565:EE_|DBAEUR03FT022:EE_|AS1PR08MB7452:EE_ X-MS-Office365-Filtering-Correlation-Id: 10bce374-43d6-4206-0d37-08db30568072 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: CcY7qaIMLptoyL94vdDWYsTKYOYVloxwdliGWEdCTRgcS4Vm7McPM5RohjuD9nUPV7DJSV5FMFjpDNdq302CGFFFz4QWovM4ukPIcSya5GzU0x11iES4lkQs2bFhPvE3gjUx1WrHoDNfBhDsIgGBukvtMCwLmk41YYeQ2p0t0BuJUnbuxT2w6jRZhKczTpWlEmY7tPktQv6VP2wl3OFb/3DPXMh5GU70gE29KxJtEnVECENe9A53xFb9U7sgMtXwTq0ez7+Oz6ySrcQGzgWvVRxJl6OpVHZW2DGSUoP4Xx7GRNGOGBePYklJ6m6McC3HZI4/JUu1BlZTN1OBtJZ95CyznTbOpJJVPAWVDqdnHRUGbgBtW+sFRoSDG5vEGg9A5eorS0+2PCLKUbEdxqiP4HK+OEWkPpAluJ5i4AucixXw8hb2cwUdtFcOLHhwjokI9PN1TMkHzj7WGnwQQrFuifa1xFEN7//wAXfpCKUfgmvFOTIx3IeMoKJyISy7yXMB50IO7QpKaLAfo2WvqwWXlFBItcV5unA4rsSUSUwNG4nL4pOquu2YEooAlRqzCr80jqBxuJIJh9wl64VmQMg/MUrAb9SiNJydH82XjDutcGPuUSrmMwKYqe85B8f2hYje6HndsLd5mcxhVYu2hTKRQWkNXPREIR8WOVgNc1keOts= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB3919.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(39850400004)(396003)(346002)(376002)(136003)(451199021)(83380400001)(31686004)(6666004)(26005)(53546011)(478600001)(316002)(36756003)(6506007)(4326008)(66946007)(6916009)(8676002)(66556008)(66476007)(41300700001)(86362001)(31696002)(6512007)(966005)(38100700002)(6486002)(44832011)(8936002)(5660300002)(2906002)(2616005)(186003)(16330500008)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5565 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT022.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 3816028e-fdc0-40b9-c919-08db30567aa3 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zIZUQr6clk8jLx6in+Dt6EabiAPy74rx3ObUqlcXHVIEggNxcGzxRT6JWB010Cc7qq+laAecgcXVUI0lTUKEJhuvuXKkZ82anQLqmkMsdycjAmTjf9JieXMllkndvQCdlxa1myNnDzgljoUEndgiN3GkFWSXY1fRqYP00Tt+g+n1el64gFCEsQQOeX6k4Y5WGmdZFUmZD1oIqVGKDYvI0iqVgfSXU66lbfGgppjXde57MFq/a6S9OKeMFUTILgN+j6skgK0qlBXdZuFpsMfjSBjI8WHj3O7szqf+ff3GnoSM9WnNuMuWXyBMO4IVWzs3ao9AvvcBHsxPA51xO/SsTRAnkkbIphfbzg2DYWGXDiFhby2se93EbpW1NnSvXQvtH79o+a/YCKx2cYTdVwUotobax8SvPps128B7TB8qs/xHiubGdrJaoJKcFQTGUAQasRS9VcbcrNHiInUdjGfesh71km3H2JvfFwrLDQYfEyQVGkvl+0MqYyLrGOumiDo7dpQ9Y2gUUdC3D29D3r4ByG9omlw/HJiK2K0cWsjcbPPtjKWq8NHZl12Tq4eOcScVv5eAWu5UlOaN3mnZXaHBFNficuT28IAGQuMe+qJVVBIbMlqynb0T/fyJAGhz1ZjorKhL7x30YF65qIkw84FORrbugzU7ugT3RgFtHUaF8/hypxyCaW5jky1K8xO1qLUy9awAfM8dsVPAz3rvSJlfw4Du+608eCfgW35COm2oc75ZMXsnZoBCEEjEh1QiFTtZ X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(376002)(136003)(396003)(39860400002)(346002)(451199021)(40470700004)(46966006)(36840700001)(47076005)(2906002)(2616005)(83380400001)(336012)(6512007)(8676002)(4326008)(70206006)(70586007)(966005)(478600001)(53546011)(316002)(26005)(6506007)(82310400005)(186003)(6666004)(44832011)(36756003)(86362001)(36860700001)(41300700001)(31696002)(81166007)(82740400003)(5660300002)(6486002)(356005)(40480700001)(40460700003)(31686004)(8936002)(6862004)(16330500008)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2023 13:07:08.3335 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 10bce374-43d6-4206-0d37-08db30568072 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT022.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR08MB7452 X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,KAM_DMARC_NONE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NONE,TXREP,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, On 3/29/23 13:42, Дмитро Медвєдь wrote: > Hi Luis, > > On Mon, Mar 27, 2023 at 12:43 PM Luis Machado wrote: >> Hi, >> >> That's interesting. If the target doesn't support SVE, why is the SVE_MAGIC context being generated in the first place? >> >> It should've been handled by the default case, where we increment the section by the size. >> >> If gdb knows about SVE, it should be able to handle it, unless the target says the vector length is 0. >> >> Could you please clarify what target you observed this on? > > The core dump was generated on the Amazon EC2 instance that is powered > by Arm-based AWS Graviton3 processor. It was not generated by gdb. To > make the core dump a modification of a third party tool > https://github.com/Percona-Lab/coredumper was used. I assume that > this coredumper does not write all the info that is needed for gdb to > resolve the SVE section correctly. Thanks for the additional information. That's very useful to give the bug some context. > > I will prepare a minimal working example which reproduces the issue > with modified Percona-Lab coredumper and will provide the source and I don't think that's going to be needed. > the core dump, but I still think that infinite loop should be fixed in > gdb as well and maybe a warning should be added in this case. I agree. Even if it is a case of inconsistent state/data, gdb should still be able to cope with it gracefully. A warning would be appropriate, stating SVE state has been found, but it is being skipped because the target hasn't reported SVE support. Do you have a copyright assignment with the FSF so we can take your contribution? The patch may be trivial, but I thought I'd check anyway.