From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KrR5HMxc/GWXdBAAWB0awg (envelope-from ) for ; Thu, 21 Mar 2024 12:14:04 -0400 Received: by simark.ca (Postfix, from userid 112) id 685671E0C0; Thu, 21 Mar 2024 12:14:04 -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 53EF51E08C for ; Thu, 21 Mar 2024 12:14:02 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 717213858C98 for ; Thu, 21 Mar 2024 16:14:00 +0000 (GMT) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by sourceware.org (Postfix) with ESMTPS id 31BD13858D28 for ; Thu, 21 Mar 2024 16:13:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 31BD13858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 31BD13858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.221.41 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711037623; cv=none; b=Ec8whoKUTnQi0m4An07t5v0Xs5caF30QAQ5tQVQIZ+twtUE8CLirsdAbX6G0e2tZFYDSmVSBs2+j1ac4C5r/Pt0ZGO7KYKlbHaY3LLIFvUTD3bYK7I4whp3l0p6MjRan9Kgv/cHnIeMIqlFf+7GI9Ke9nfDEhGFungDeSaeHq7o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711037623; c=relaxed/simple; bh=DB84WGLe1mnx9BYmjzUdpnXxLYtfBYUjc9eZPNxyRLU=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=AHxV0AFo4WGRN0PyXJIJSfv3VdavLPU87NckKCLLms0/R549CdJdWgn0+vtJATZEh7ebvy+m22B1816shGtUf0YGAYB70FIVgIJGW5U5aFeo13Cu2pgYMLLBJnxi8rJnoXtEyTf+KtjQyMJfwxaQ4famuu8D0n0CAx3UD2j3ORg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-34175878e30so653661f8f.3 for ; Thu, 21 Mar 2024 09:13:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711037621; x=1711642421; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cpRUKWzj7AlzXdB1IZ1/RNgNccFzecqrKRog4Y+PH0A=; b=sAEG34MLPdyjuMR2/9rYeyPJKxx1I/BNmp1FaKIwK7NUBhRUD0L5oe7fDJxWaO+JFz gbEP4m0kzkkt+UvayPbc31prIdxeHJOKnmUyo3lJEypwGIJpk57dupQuXWCh9NqVVS5S ySOeLcOnmltR5FU2RRuWf7DYSZ7QgOe+2aJP/rOTmhH+CmRHPTBxiHI/oUJs042nNhrY s0ccRnKhLnilzfITuzsiVeIq4APS0bKWEkSn0/zcr1Qiu1b/8+SJNS846jA1/DgIOodO WudTh0Lq5Hjg5JncNXCRi4RT6Fe2KeZn0r888TK6u8nKQCoDQ6yIg1XeQoUSG+yr+w6C 2e5Q== X-Forwarded-Encrypted: i=1; AJvYcCVF/FYuV8rkfZA4a3EqrzcreutL5ATn6edpD5lyD9Doe9PoXZbeL5sYIOwPhxwTyOvI7JRL+Vqqrz7WCUD3+KPN52oIrrBTsNp+rQ== X-Gm-Message-State: AOJu0YwTmuUjEXHwpF2G+BbCQDIqlgdMJWqnGMcB7+aLqOv0c1RmDeh5 FwUoLWzJhjXyf1zsxN74o1D08zGypzysjZdZYe0nNepnGol1S4r3 X-Google-Smtp-Source: AGHT+IG7ygdBMHT0XnanIviuVgkaJoeO1gM+YDLrrwJqKdR9i+/zUfSi3PhirZJSK8i1k3/uMhYdmQ== X-Received: by 2002:a05:6000:4011:b0:33e:7d7e:9af4 with SMTP id cp17-20020a056000401100b0033e7d7e9af4mr6297034wrb.12.1711037620825; Thu, 21 Mar 2024 09:13:40 -0700 (PDT) Received: from ?IPV6:2001:8a0:f918:ab00:5ea7:1bb:7941:5784? ([2001:8a0:f918:ab00:5ea7:1bb:7941:5784]) by smtp.gmail.com with ESMTPSA id u8-20020a5d4688000000b0033e3c4e600asm17688022wrq.7.2024.03.21.09.13.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Mar 2024 09:13:40 -0700 (PDT) Message-ID: Date: Thu, 21 Mar 2024 16:13:38 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Better handling for realpath() failures in windows_make_so() on Cygwin Content-Language: en-US To: Jon Turney , Orgad Shaneh , gdb-patches@sourceware.org References: <20240321065417.1125-1-orgad.shaneh@audiocodes.com> From: Pedro Alves In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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 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 latest version of this patch. > >> Fix a memory leak which would occur in the case when the result of realpath() 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 a0e9b53238c3033222c53b1654da535c0743ab6e. > > 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.html > [2] https://sourceware.org/pipermail/gdb-patches/2016-January/130435.html > Curiously, after upstreaming your _sigbe unwinder recently, I looked at upstreaming this patch (the version of the 2016 patch in downstream cygwin gdb), but then this same thought of removing the limit 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... Pedro Alves