From nobody Fri Jan 26 02:22:11 2024 X-Original-To: bugs@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 4TLhKb5yZlz58WQM for ; Fri, 26 Jan 2024 02:22:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TLhKb482fz4D96 for ; Fri, 26 Jan 2024 02:22:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706235731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T+06YQ2ll2uHiYzrIIz0sZJQ0KSmO6YZD63FyeDMUfE=; b=SvrD+L3B+8FLJsaAuUUbIdNEyAB9DOKbzo/v6ZWAhkD9XqAJ3yUhLJRsZVvl8d8Bp6Y939 iqh/lS51hcp1U7nyjK6TwDf7mKj+YBYUynaJMzqxDskBsGBsIkNJniNbt96D/PHrCGUEyE 1grCU9E8d2ahAKL49oWQqF3lQpcLWd/dsxcc4pEEDoKF9h1g6TBt9KNomC8BpXyn5LcFso jrT7fCCVbaJIeMVcBGd4t2FlznjtlspXIeX78W7JB1O1zw5ocNaEyYw0dv4MzOq4P53BD0 KMuRS8h/U0qwcxrTcQy6I3/me5GnMWS7CRlSF+O3EDxXFCxtN/cXskuUxQFxWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706235731; a=rsa-sha256; cv=none; b=ypM2uP8DhlI/LFRAPbv2Hc7iVQy53xXtjhL05wCBYAvMJ2GzSDM5lfazpV5PSVZXstBj6D 6Pw23iaM3+ebnHZ+FavLAFfD+bl8MW/0cyvYXDiMi8/jhtEe8tZTEmIfpzzYcefXodQoNy d7dh1JtGajW+FKvJiVJ5qVF1rTO18awJJ6x5Lw/9rrM+vw/z/c0LeyF8yWqiNhwON1M9uP o0jWCEUOkE80EYvJf8vt8PxrvBC/x9AQYHZZTxsU68moUaTnNELLa2UXRpU/FbvELfJGrh 3pU40cPU6NcvDFR/9+W+LcPjjxxHp0lqab7R+FWai7AP5ossmYcvnx7OBjzT8g== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TLhKb39b8zNQS for ; Fri, 26 Jan 2024 02:22:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 40Q2MBjl050609 for ; Fri, 26 Jan 2024 02:22:11 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 40Q2MB0L050606 for bugs@FreeBSD.org; Fri, 26 Jan 2024 02:22:11 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 276632] LLVM std::filesystem::remove_all fails to handle dangling symlinks Date: Fri, 26 Jan 2024 02:22:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markj@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276632 Bug ID: 276632 Summary: LLVM std::filesystem::remove_all fails to handle dangling symlinks Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: markj@FreeBSD.org remove_all_impl() will attempt to remove a file specified by its path, recursing if it encounters a directory. It opens the file with O_CLOEXEC | O_RDONLY | O_DIRECTORY | O_NOFOLLOW, whi= ch for a dangling symlink returns EMLINK on FreeBSD, contradicting POSIX (which says it should return ELOOP in this scenario). Bug 214633 notes this probl= em, but fixing it would break compatibility. remove_all_impl() however only handles ENOTDIR and ELOOP, so it incorrectly returns an error in this situation on FreeBSD. We should extend it to check for EMLINK as well. --=20 You are receiving this mail because: You are the assignee for the bug.=