From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yG3JCsZEP2frczkAWB0awg (envelope-from ) for ; Thu, 21 Nov 2024 09:33:42 -0500 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=fKYvti9q; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 27E101E259; Thu, 21 Nov 2024 09:33:42 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) 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.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 C2DA91E1CC for ; Thu, 21 Nov 2024 09:33:41 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6F917385B504 for ; Thu, 21 Nov 2024 14:33:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F917385B504 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=fKYvti9q Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 5CA773856953 for ; Thu, 21 Nov 2024 14:30:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5CA773856953 Authentication-Results: sourceware.org; dmarc=pass (p=none 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 5CA773856953 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732199454; cv=none; b=XXXvZlV/eTwdZRDJsNcGPO2mrnVO/z0HhwGC1aavMQv+7jJ9gb+oi/TWGI+HvOfFD/0K7VH/dq4GNxp34y+n4uLO1T9G03exWvQXw0D7UaAE+hYRKICvLShiell/5yCq5yDe4r0gKZvtgofAi020vt32S52L7DNHZveizJS9Xwk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732199454; c=relaxed/simple; bh=ZWv29/JoaypEVkb6erNK433BSCr/E4t2sTtqNTonwu4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=CFRdxdQUGOie2ypKTWMszqw9B2Eune47C/O25QOPNKnihrVYaMW+I/Swf2k50ewvJ/jusAY+Gl800YMuUTERnqeqh6dbg/ALRYRChtiA8HQL1I60CUFBlIcz1oxdHYu3bDydBAu/YsoObJO3vL3viwJ4Sy/OpzZ4XgP4DqmDNuM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5CA773856953 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732199454; 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=fJ6xxS5YlHyI3FdFkrmv6nOgioG3ov9h6gXlEJorNmA=; b=fKYvti9q/B8s2mwWPWxcHMFSJbutgm/igIYFnyoce4T5A5xXL5YFgWSwf2LWSPGWALlFku 3T9AknTAvfZHkGgkKIXAlotDV/SKi1LacR3e1dNIoYPNXmnuutICS6qFIWyE6H/TgGTlxb EmsHen+AwUeNiVzyqpr1KdakAfkhfEU= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-615-TrFrwdeMMPGD7Pzo2a74vA-1; Thu, 21 Nov 2024 09:30:53 -0500 X-MC-Unique: TrFrwdeMMPGD7Pzo2a74vA-1 X-Mimecast-MFC-AGG-ID: TrFrwdeMMPGD7Pzo2a74vA Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4315c1b5befso6546955e9.1 for ; Thu, 21 Nov 2024 06:30:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732199452; x=1732804252; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fJ6xxS5YlHyI3FdFkrmv6nOgioG3ov9h6gXlEJorNmA=; b=BMnyn5WMW5K/D7H71iaNxDvNOygGWovMb9//2XpWWh8ezsClCK7lDcmsn1KF18B5EJ mbl2KKUZwYJf/dND/W1GvfmNeY4YZTWzc/sq6B7APNjgg5omC6uH39DaKrd+KfSmu813 j9fsI3PEGO6CUhrFw5rRCIyQc+5JKuSPDiKdsy5LWGjz9hgsnBbsEzlHRsuzbwlwV1yY ik/9yMNCqESMVXxNFZlvnlz5mKharBh/NO+hPyiEakxnGcDXMvj67WStz4q52k11jUmk lSoEi9GeGzaZmkAo++/D2qYDDXeRew45g+hZdIbLBx1R/xinrDmoqC/95wPq9wOE8Z4e 8hPw== X-Gm-Message-State: AOJu0Yy4cAIgnTqzGuyPLk1fryNm+HsgWDqTqSiun0ZaRRqf5yYeeutJ y91dhSEMfvg0TZCd6nHKr2yMzZ/vlzjGspjDKxdMXGGwMdPZ253nFnLREIrmPVbJqMKw4aZHupW Pl6GdP3cXLvpVZTEgOMRVkRo6mBBnskW6ZiRvFYMmyj3cTdHs986NRmSdvF0= X-Gm-Gg: ASbGnctSldcD4gjsd32nVGtlhsfHGLWe3fT0yXZY61YELaH7NMbsQtlUdkxIk0dUMWr 0fDvL8c8NFKRDKPvnMQjNgXQvdmzbLzYIrUaywL76b4/lS04PLEvGiP9KdlMMu5AB9+R57sQlqP a3q4wKXRN+yZYEPWvnV8TjLJp6ko4AlkIdFWl4NDRcjagBFCR4mnRD2ruIsWumdRPjc+pe74Lzo x+XdD4+HwaGevkeOdmgsmo8oTQ7AYSkDy7aIKAmmMlxLaaaxj2aue9hj1V/dgHUPHbQwnlcsYaX PA== X-Received: by 2002:a05:600c:4f11:b0:431:3bf9:3ebb with SMTP id 5b1f17b1804b1-4334f01fc3dmr54201765e9.24.1732199451871; Thu, 21 Nov 2024 06:30:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IG3DneMlgtZfIVVL3Chifjkk39QEiV3GP/3ODf+ILkgMJGSE6AJ81KeH7QK35H14pK38hAhyw== X-Received: by 2002:a05:600c:4f11:b0:431:3bf9:3ebb with SMTP id 5b1f17b1804b1-4334f01fc3dmr54201465e9.24.1732199451518; Thu, 21 Nov 2024 06:30:51 -0800 (PST) Received: from localhost (197.209.200.146.dyn.plus.net. [146.200.209.197]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b45d395asm57172065e9.19.2024.11.21.06.30.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2024 06:30:51 -0800 (PST) From: Andrew Burgess To: Kevin Buettner Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb/build-id: protect against weirdly short build-ids In-Reply-To: <20241120142224.6e54aa4c@f40-zbm-amd> References: <20241120142224.6e54aa4c@f40-zbm-amd> Date: Thu, 21 Nov 2024 14:30:50 +0000 Message-ID: <87v7wgmzfp.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: yntu46fcFH-S8705cDil4c_0b3ZB_HTuNRj68EJPQhc_1732199452 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 Kevin Buettner writes: > On Tue, 19 Nov 2024 10:00:28 +0000 > Andrew Burgess wrote: > >> I propose that, in build_id_to_bfd_suffix we just return early if the >> build-id is 1 byte (or less) with a return value that indicates no >> separate file was found. > > I wonder if also printing some sort of warning might be appropriate in > such cases? If a general warning isn't suitable, I think it makes > sense to at least use separate_debug_file_debug_printf() to output > a suitable message when separate-debug-file debugging is enabled. I posted a v2 which includes a debug log message that the lookup was abandoned. I was tempted with the idea of a warning, but wasn't sure if that was justified or not... I'm still not really sure. If you have a strong preference for a warning then I can switch to that approach. Anyway, let me know what you think of v2. Thanks, Andrew