From nobody Fri Feb 03 16:11:36 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P7gdY0C1Nz3kT6v; Fri, 3 Feb 2023 16:11:45 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P7gdX6tjpz3nhS; Fri, 3 Feb 2023 16:11:44 +0000 (UTC) (envelope-from kevans@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675440705; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xa8IVfrCYjsVcM4oAc4fczyVILrg7sw/aurprhdjDds=; b=pTHgLNsGfKlOVEIzd+eQZYE2HOxvhZKYmxLt6ukWeuTH2NHSDqyvB4HclIrw9qhdvdLb8p s0lLLc8ORW6uGeL626DlJj5Wpeovmd/cVY0ARhnUXieevBK+UyggWiNJuWPyXOPzbi2h/h 5IN0bo8eXKtfX8IASdEF/V7UEfiUvpQFwWkGTSGPDz5BlIAiBzb0RSaDzhUOBwcLVQ4ByO cvoRlSniq/evHzktunFaY99R4B5zY/MaL5GuEhV13wOuTrBtFPIvRlnAVwuheACJQOY26k 7DC3gZxY6RX8T+rx3DjhQ/1orBB/z7cb0+i8fjN5Wc8iNSRL//QOPiv/4yeo9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675440705; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xa8IVfrCYjsVcM4oAc4fczyVILrg7sw/aurprhdjDds=; b=OpH8vRPla6fBqJFXC9tb73//Kyu1TR4zwo96qdVvRy61vq+skc4vHdSCyddZgy5QHYrccw lSK9Qrw/a5wMwopNpXUo/WwgCyWfrwDTNyfybc28UH15KPwzGpjOND04g2YOtaQ4pueZ1F p/rwNPbal3qwa1yonuSUesN/EgBSjDJj7scXRiO3QqvFb4xBF2x0SFyxmzQ1df3PxY8fKZ FZg5SK4ofqm90IOtl0aks2/HQqSlclyG7fNumRmDOnkpip79qWv5NDcWob33thj4xsfmwH nLtRcHlXUnk3g+ubZ3bfInJji/doSyh9ha0voYyDVwq6ZBpAjWWso6EURW5HOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675440705; a=rsa-sha256; cv=none; b=u4Ij0qpnQCxSQU7PsGx7R17ERbcPrTXwQ8rqh6HHeuqSyVzVw9axH6RKbedubZ+W5vPKXA +j6/SmNKvy/g0bwdHcab57iaB4Lqo4WqyVMIP5jUe1VWQS1zZBsqBOIz5DaTedlICNaccS BdekE+ieNpkJgXW0VcYEMVVh8TT/JTL3M77mdtaJ6x+UtPHEcBYy9R9vuOZ9aYael8boWv y61YMWs+v8Zm1AJy8yC+u35rsa0aIMHXZukpUIRYx0C6sjMs3mjHWftKPpNzEEhTZnSDYX 8gtfGaH6AVVBrkGr3zsADjtGjgmZ6fzQrdMZccD2j2Lg4hlLI2rqpie2aPedGg== Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 4P7gdX5r5yz11Cp; Fri, 3 Feb 2023 16:11:44 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f176.google.com with SMTP id j22so2652820qka.0; Fri, 03 Feb 2023 08:11:44 -0800 (PST) X-Gm-Message-State: AO0yUKXZiaHGsPBI+GXrZ94PnGPMoMP2AXXFKmpCIOhKPa3lHyPPp2N8 UyuHfLAj4Q4lzSU8axzpgdgrAsFaxuJfQ1XyNk4= X-Google-Smtp-Source: AK7set+U8Q5RShrNLRIRbX7CORf4MdQk5TkPQkr298r+2xl1pfD/8Xy/lbOuo1mjiCrqyOp2To4yMmjG7Q+CYHLIRr4= X-Received: by 2002:a05:620a:8509:b0:71c:deaf:c01f with SMTP id pe9-20020a05620a850900b0071cdeafc01fmr970628qkn.16.1675440703999; Fri, 03 Feb 2023 08:11:43 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202302031558.313Fw2sJ051540@gndrsh.dnsmgr.net> <86lele3f6c.fsf@ltc.des.no> In-Reply-To: <86lele3f6c.fsf@ltc.des.no> From: Kyle Evans Date: Fri, 3 Feb 2023 10:11:36 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: cb96a0ef0040 - main - cp: Minor code cleanup. To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: "Rodney W. Grimes" , rgrimes@freebsd.org, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-ThisMailContainsUnwantedMimeParts: N On Fri, Feb 3, 2023 at 10:08 AM Dag-Erling Sm=C3=B8rgrav = wrote: > > "Rodney W. Grimes" writes: > > Wouldnt it now be possible for code in the fts_read path to reference > > errno unintialized? > > Can you provide a test case? > > We (cp) only look at errno if fts_read() returns NULL, and that only > happens after an error (errno is expected to be set) or when we're done > (fts_read() explicitly sets errno to 0). > fts_read() doesn't always set errno to 0; notably, there's a number of FCHDIR() paths that don't set errno (and the change that added it mentions that scenario exactly) and will return NULL because of an error.