From nobody Wed Feb 11 06:15:35 2026 X-Original-To: dev-commits-src-branches@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 4f9p873LYlz6S15c for ; Wed, 11 Feb 2026 06:15:35 +0000 (UTC) (envelope-from git@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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f9p871v1Kz3hy8 for ; Wed, 11 Feb 2026 06:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770790535; 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; bh=CjAzUBKUPsO9slguk9ZeH41pS3Q9tsU3mkfFuG1huZg=; b=tdaXjW6F5b4NEa9UpAHfL9/K+CfCEepJ/AL5ijuVGcmBeyHaW7e/vHOLa/Q5To2b+Wgk5o DaS9Wy/wRx3iMvzbBlheHOolDxtLJB4qXTIK6FckR/UZC4xTFWXDDZSmknR1P64xrMhXxm MQAsbkrFQLv3TGjn/coFcHHlfL+J4cIx12wpQfPDdsiZ3Y24/RFU92Sw7vz8c78g+9o2Ds hNywlKsIXZpfCY7xBe+mS87U0GNc8ylowGwlZmz7yOo5Zn7ytKVhBbnvtacaBvsL9ZxLA7 d1DexSPis5yyCtobxpQaTpodjsPrtUQxR69MFUGQH/R2/uRGNeDN0tBlksw3TA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770790535; a=rsa-sha256; cv=none; b=IGrPjvwQXYxhldP5dhJNPXgOpd6S8pE8OZA3jJlStcfhN9Gy2lqIAkylTSavWJciAYMQhC 72xCZGA2DllKQFlBEiuij4cu73BSo4kkUEPYOqz97dAICTsIATKCDfbDK0QN1spffcUdsd 5hecPIiKQ2RfoenmZ9bwcSBsmaZgQW49EaVZ4SX82grScfU3j+spU5Rx6OzIH54Po9LLgM JyOV67Oco/eBVwdMfPKww4y167JM8sRl4O0BHzk75GPhxiffP3tI6jN2gqd50lx0l0658r qTQw14tAw6EOXdA9n0Kkzaf1Bau+ZlIJPfy8D9le0fEv6uW6fpcsS0NiyXI0yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770790535; 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; bh=CjAzUBKUPsO9slguk9ZeH41pS3Q9tsU3mkfFuG1huZg=; b=bO52e/1XgZYCp9iy/4nFSOoGYUVS3yl4tSiTi25wWsWAutaJhGzsQdNuc7MfHxJs5TAFR/ lEVc1lQi9Qd1/80Qkp1Pi3TsGkoyn9818Cb0BJXzcu+5TT6SDxba7JxwS0X/7P74eJtSug FkOIxqXj7/eK0j73P3DjQzzgVAdkLwkPQGuQe8ht88L/zUTWYxKA//U/KqGittXy3N0W2v rwkc0yDpmvW1E+Y3gPce++WI/CPYOdrUeodIyuYtDVKSZ3Kq30CpK+UwnqVA8etiPA9GuN j/17tiLZAJ0QQjIrjcEB/gw9E5qv4vvmFiCNgS8y6ltvCwRqYO9uTRIGWtqy9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f9p871TGSzdgX for ; Wed, 11 Feb 2026 06:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34313 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 11 Feb 2026 06:15:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav From: Colin Percival Subject: git: 2434f3b279a9 - releng/14.4 - diff: Add test case for pagination resource leak List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: 2434f3b279a90f9a47a963d5898eea610a94f6e0 Auto-Submitted: auto-generated Date: Wed, 11 Feb 2026 06:15:35 +0000 Message-Id: <698c1e87.34313.4f3375c0@gitrepo.freebsd.org> The branch releng/14.4 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=2434f3b279a90f9a47a963d5898eea610a94f6e0 commit 2434f3b279a90f9a47a963d5898eea610a94f6e0 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-05 14:39:47 +0000 Commit: Colin Percival CommitDate: 2026-02-11 06:14:23 +0000 diff: Add test case for pagination resource leak The pagination code leaks either processes or descriptors or both, depending on the exact version of the code you have. Add a test case which exercises this leak to facilitate fixing it. Approved by: re (cperciva) MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: thj, kevans Differential Revision: https://reviews.freebsd.org/D55111 (cherry picked from commit 270492602b9bd8b8fce4f021f055804978bf3f23) (cherry picked from commit 51c2384ce049ec92e07901cf8a84c171e5d72104) --- usr.bin/diff/tests/diff_test.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/usr.bin/diff/tests/diff_test.sh b/usr.bin/diff/tests/diff_test.sh index 453d82a4a3f3..2a07535d3d86 100755 --- a/usr.bin/diff/tests/diff_test.sh +++ b/usr.bin/diff/tests/diff_test.sh @@ -403,6 +403,27 @@ bigu_body() diff -U$(((1<<31)-2)) a b } +prleak_head() +{ + atf_set "descr" "Verify that pagination does not leak resources" +} +prleak_body() +{ + local n=32 + mkdir a b + for hi in $(jot -w%02x $n 0) ; do + mkdir a/$hi b/$hi + for lo in $(jot -w%02x $n 0) ; do + echo "$hi$lo" >a/$hi/$lo + echo "$hi$lo" >b/$hi/$lo + done + done + ulimit -n 1000 + ulimit -u 1000 + atf_check diff -rul a b + atf_check diff -Astone -rul a b +} + atf_init_test_cases() { atf_add_test_case simple @@ -432,4 +453,5 @@ atf_init_test_cases() atf_add_test_case dirloop atf_add_test_case bigc atf_add_test_case bigu + atf_add_test_case prleak }