From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6GqjEp8VTWodJCsAWB0awg (envelope-from ) for ; Tue, 07 Jul 2026 11:05:03 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=X3Eoi7jh; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 374C01E098; Tue, 07 Jul 2026 11:05:03 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 95BF01E024 for ; Tue, 07 Jul 2026 11:05:02 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8AEF84BA23E1 for ; Tue, 7 Jul 2026 15:05:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8AEF84BA23E1 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=X3Eoi7jh Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 9147A4BA23C3 for ; Tue, 7 Jul 2026 15:04:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9147A4BA23C3 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9147A4BA23C3 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783436678; cv=none; b=bRFKGZwwqhDW4F/Xm6TKzAM/+/Q/ewCWZvmVbOl7mUKq5n3eiWl3q3klFQgqYtIoyMZOpoUFtdqCE8wYEhclLAyt6HTALCHbyGugwlAD2ytdVkwOvIVrQFSlvYpLaae1JSeedJi3bBzB2vpXUYJ2ENGWfKjQj4k1K1yATBMdayI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783436678; c=relaxed/simple; bh=o8nG06pz68udLT9g5j9UU8BdjlKy8IROT/9DzOp8V14=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=DD11yZrHORfzKbw9r1qvgrKb2zLUxGZVilj/uWlHqL5XU6+ReOp3s9U/mcDCA0CpVRCpDIV5fE/Q8+qJ6nGMnQyNbBEJ5NjxU8niawGlFvQJ+onsy3D3gzeK1e3dI4dg9nDjtkR4fj57/XpL160l09Pa14y+mCLH7L8mzFKLPDU= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=X3Eoi7jh DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9147A4BA23C3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783436678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ILU7oQnYFgjkZTFAVlf4+9jmE4P3BR1uiPrYZFnwCl0=; b=X3Eoi7jh8a5m3Krhx5ThSgvCYlpyZVRhGMBQmfNcnMURONU4q1A0YoO0x07/8lmMn2+6EF 1zIA+eS+YscI0BRsmHRasFfZjUlvbxU3731mNMCb8Rni64cxevnjflhAF+moPiy2EoNPzx jAy2afN5/zm64cteLX1n8W/w2TMhvkk= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-558-ZGAuU8bhNUiJKqrdrVywUg-1; Tue, 07 Jul 2026 11:04:36 -0400 X-MC-Unique: ZGAuU8bhNUiJKqrdrVywUg-1 X-Mimecast-MFC-AGG-ID: ZGAuU8bhNUiJKqrdrVywUg_1783436676 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-473f4a48e9aso2611242f8f.2 for ; Tue, 07 Jul 2026 08:04:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783436675; x=1784041475; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ILU7oQnYFgjkZTFAVlf4+9jmE4P3BR1uiPrYZFnwCl0=; b=QJ6K4Vwkecja0qK90YGlrm3QUfZdm4w8YHp3bLbBb4J3OiZTk1IPxuFWDTz5RKXgJ6 NuS8LhWSuhHaeJ3oG6hTT2rTuERhRlX9eNjk+pHdgrd4svXfRGBv2efgxCOw/wZNHz4O wPVFm2t231FnpPUH0P6IZy5FcpvRvcq6IQzJ/CXBxCqz+YrMH3xsXRLba7WFvXSHCPNh PBe61KTxa4pgFaMkp4LPB6C/cXH/iP+pGt5zqZ5DgEYrU8gLXaZ3yxei/p/IdMx10GOx 7H7STQWmUUML2bUZ67LYfNGJUI6raYYlIToPe3LFi7Y2PH6gHbTjdpWA5+q5/JfE4rwS sWng== X-Gm-Message-State: AOJu0Yy+MMFtVsxbUuqZNdeIu2gsoqUNQvcMotJIDBnpOfgDDhPAzGjo +Dif5n1i/ZwAiAkysDMKNDv1wFzkAwKJ/9ScsRUXHgCQBnH99veC0eFjAI+vzfAMIC42aHFNRWY u6p5r85fKXMDwbg1oNs+SWTvnWv94WSWcN2nvL9bxl/0SqbcEzDms/4Pw+hOmbWk= X-Gm-Gg: AfdE7ckscaFWVxaGF9f4u53MzuCo4wRKtVOJYnePn6ePOI1QwSEW/F0075wUThhPsEV nXUJnTVpJ2TKlld1OksWomCrn4sjYOlK7PHx2n4HJdkGvSXa3HVlO+bltRe03lYDuOJ6E9t/B2u avrjTHRFl9SI2gPCFW+tQhzf6AFyqCTgRuWOrdc1rH52g7u5A5Xfy31Vjt2KYherAuwJT2NYN2S tIj9Xmp8te29v3Dv9bSxyK+LTfqK+Y1ktIIIgkkiacNdnqZIe51PQ7flKevQiQetHrD3A1xWYrN FlQT28FFqbicc+we2jfbcD+diX5KvQov5bCRMr6OUF/mDRmsxBuOgO6oTua0afX4uoxSu856Cdh 4T/v124w= X-Received: by 2002:a5d:4384:0:b0:474:2040:59ed with SMTP id ffacd0b85a97d-47de66d59a7mr4988159f8f.42.1783436675468; Tue, 07 Jul 2026 08:04:35 -0700 (PDT) X-Received: by 2002:a5d:4384:0:b0:474:2040:59ed with SMTP id ffacd0b85a97d-47de66d59a7mr4988117f8f.42.1783436674901; Tue, 07 Jul 2026 08:04:34 -0700 (PDT) Received: from localhost ([31.111.209.233]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47a9b4d850dsm35774586f8f.0.2026.07.07.08.04.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2026 08:04:34 -0700 (PDT) From: Andrew Burgess To: "Rohr, Stephan" , Tom Tromey Cc: "gdb-patches@sourceware.org" Subject: RE: [PATCH 1/1] gdb: set the cache information in 'get_prev_frame_maybe_check_cycle' In-Reply-To: References: <20260625145850.3104079-1-stephan.rohr@intel.com> <20260625145850.3104079-2-stephan.rohr@intel.com> <87se69wdbt.fsf@tromey.com> <87tsqbt7ge.fsf@redhat.com> Date: Tue, 07 Jul 2026 16:04:33 +0100 Message-ID: <87o6giu9ha.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ZnIn-Sb4E0LpD2S_cGjGJIvtJIh_Hx5lHXVBZo1z-fI_1783436676 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org "Rohr, Stephan" writes: > Hello Andrew, > > I think changing 'get_prev_frame_raw' to return a raw pointer > and changing 'compute_frame_id' to accept a raw pointer seems > reasonable. > > I was hesitant to propose this change as calling > 'frame_unwind_find_by_frame' in 'compute_frame_id' requires > a frame_info_ptr. Same for ' fi->unwind->this_id (..)'. It feels wrong > to create a temporary frame_info_ptr for these calls, though I observed > similar patterns, e.g., as done in 'create_new_frame'. Yeah, after sending the email I started implementing this change and ran into this exact case. I agree that changing frame_unwind_find_by_frame probably isn't going to be ideal right now, so I think my original suggestion might be the way to go. I think long term it might be right to downgrade some part of the frame building API back to raw frame_info pointers, but I think this will need some wider changes to prevent those pointers becoming invalidated, e.g. frame_unwind_find_by_frame can invoke Python code, which can then invalidate the frame cache (yuck), and though that probably is never going to do anything useful, right now we run into problems reinflating (due to missing frame-ids), and if we switch to raw frame_info pointer we end up with use after free issues. I'll go through your feedback to my earlier patch, and write up a commit message and repost it shortly. Thanks, Andrew