From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id IIoSJSNh/GX6eBAAWB0awg (envelope-from ) for ; Thu, 21 Mar 2024 12:32:35 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=PBHCVHHa; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 923151E0C0; Thu, 21 Mar 2024 12:32:35 -0400 (EDT) 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 76AC51E08C for ; Thu, 21 Mar 2024 12:32:33 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 25E45385828F for ; Thu, 21 Mar 2024 16:32:33 +0000 (GMT) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 4D4A5385841C for ; Thu, 21 Mar 2024 16:32:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4D4A5385841C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4D4A5385841C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::629 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711038733; cv=none; b=Vd7vU61VNTK3pSojK9TQ2ruC+gGQfxyaeuH89IlbNJWvtQLXLfHMdrMW6RxK/fpy7axLEPA2UzWxdy3gDhIk0m8Q3vcFJLi7kAQaJRuh/JacEpShJdCHhhSfetu3BtdQPuaK8yFCicaB51gezNf1ic5LkRdHDMOq7BM84FSlYYI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711038733; c=relaxed/simple; bh=tHJtbK70li8T85RR7CxuWOeBODkWIC8bt0xKKT4u4Qs=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=sv8HJoQtaKuhz15AKrPEcPlImmXWsfq1We7wQ4/yTbsYsMjx0OCsF24nG9IcS7+o1f48LzBLYP/pQauK+HRSYg++YOwSmKtO0hk5Vb7OA/uGBeAw5k9LWEcxw7/kpomlg5OpCP9p5Aex7VDy7SMQZDsu0ot0nkJEx7wvUWBKwTk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a3fb8b0b7acso139386166b.2 for ; Thu, 21 Mar 2024 09:32:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711038722; x=1711643522; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=62ZlmUFQBujp7jCSy8M3kvCyEohgpf6BmyP58V8VtbY=; b=PBHCVHHa2T34tEBvSgvGF2f553+5wvdVIdSh+USloTXsPuHcGZ73yt4LF2kGz62TJw UyZ6TlZTjZ6nQEB+kYjEG9yVL1ihzSF0g2yiWJt8YLzcQKOXvWXx7SyL0tQqJvy43+0B GS2/PZeVXV8NysMTXg7j8hzUuqGJC5MQNxznxLfUn3z3lE8Gtv+8/qcPMcpmOiuFdPNL MrHcQ/nwUjPhHo1NRUAKAdYFlTSb0AwQN7wAYCfQ5jQ6zunfOoC0rS4MsmCR6FUKbG5p RQqGZAnb9+RIcK7v/XEnESpRleoAVSyYGRJ/88NpLd21Aa5avFB6wiM+ykB/Wf+UjdZ8 +OlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711038722; x=1711643522; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=62ZlmUFQBujp7jCSy8M3kvCyEohgpf6BmyP58V8VtbY=; b=fpDpN6HrV1Rgwsk/hpM6dKqS+ml5yBBweX5/Wmb5NdsKRHYbJ9QMqQ8BzULRqRBhmO vFx7uIUrwNM/Zouef2uvkmu1tzUadpbIuJUDC1Vzp12d7D01bV2kr+dzjobrCTEBa3Wv h8hWgaBvo3b9Gdr0kY8N8UuRxxSJS1VbSXdhjaSBDdHBu0RKy/huJRArC92KNSlGIASC 1RGk9Wv6CE9cVViyzoHzTthIK5GMdpLiLS3AwdsTi24K1TvPvliaHupbr2Vcx01gqcPg IP3h1j8bkUQsZGOpt+dZPptsdUeSydTLCB6N07IIXPuhE8TzZ6rpDY9/EphS76evoJ9X wsTw== X-Forwarded-Encrypted: i=1; AJvYcCV37MsH3pPEig7PT/crbIdzg8fiEXfnf4A9I+71r7r3s4Dz5jLBXO8ERhtaJZk5KpGq4zr/ZinXsCueDAxClHijXjeJkeE+3Ytjng== X-Gm-Message-State: AOJu0YzBe78npZqIYlm7gsB02R9t6iwqZiXlv0k2kkwWiPwoemskbKYL WvYtOclyDZns4cx+LHhrtt2t+xuw6JEW7Zp/J1TCJ1opuzsJJHq4Bn8eU60ScGnT32rT9F0ZV60 oFb9myupQ+wnixOw/UeTM5OdFWrIUTAidIoU= X-Google-Smtp-Source: AGHT+IFfw+fI5u7QfOKCSOp08iHSRAeN1/TOptpEVUHwpRbR7alPAMKLX9/MTXz1H3RmgxGxyjxrks0u0OGlPkH7PZw= X-Received: by 2002:a17:906:2349:b0:a47:e62:4d72 with SMTP id m9-20020a170906234900b00a470e624d72mr1505580eja.15.1711038721766; Thu, 21 Mar 2024 09:32:01 -0700 (PDT) MIME-Version: 1.0 References: <20240321065417.1125-1-orgad.shaneh@audiocodes.com> In-Reply-To: From: Orgad Shaneh Date: Thu, 21 Mar 2024 18:31:50 +0200 Message-ID: Subject: Re: [PATCH] Better handling for realpath() failures in windows_make_so() on Cygwin To: Pedro Alves Cc: Jon Turney , gdb-patches@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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 On Thu, Mar 21, 2024 at 6:13=E2=80=AFPM Pedro Alves wrot= e: > > On 2024-03-21 14:45, Jon Turney wrote: > > On 21/03/2024 06:53, Orgad Shaneh wrote: > >> From: Jon Turney > > > > Not sure where this is coming from, but this doesn't seem to be my late= st version of this patch. > > > >> Fix a memory leak which would occur in the case when the result of rea= lpath() is > >> greater than or equal to SO_NAME_MAX_PATH_SIZE. > >> > >> Distinguish between realpath() failing (returning NULL), and returning= a path > >> longer than SO_NAME_MAX_PATH_SIZE > >> > >> Warn rather than stopping with an error in those cases. > > > > This line in the patch commentary, and the title, refers to the part of= the patch submitted [1], which is already applied as commit a0e9b53238c303= 3222c53b1654da535c0743ab6e. > > > > I separated that out because of the discussion starting at [2] ("Remove= SO_NAME_PATH_SIZE instead"...) > > > > [1] https://sourceware.org/pipermail/gdb-patches/2020-January/164695.ht= ml > > [2] https://sourceware.org/pipermail/gdb-patches/2016-January/130435.ht= ml I took it from MSYS2 patches, which were taken from cygwin patches, but apparently diverged (possibly my fault, in https://github.com/msys2/MSYS2-packages/pull/2475. Not sure why :)) Thanks for the references. I see that some of the work is already done (so_name, so_original_name and so->name are all std::strings), so it looks like there's not much left. > Curiously, after upstreaming your _sigbe unwinder recently, I looked at u= pstreaming this patch (the version of the 2016 patch > in downstream cygwin gdb), but then this same thought of removing the lim= it hit me. (at least I'm consistent over the > years, eh.) > > I then realized that Simon is working on a series that switches the solib= path storage to a std::string, which will > let us easily not use SO_NAME_MAX_PATH_SIZE at all in the Windows code. = So I just dropped that patch from > my upstreaming queue... Great! So I'll drop this patch. Thank you. - Orgad