From nobody Tue May 10 16:59:21 2022 X-Original-To: dev-commits-src-all@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 209C01AC8E16; Tue, 10 May 2022 16:59:22 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KyPQf0P8bz4dN2; Tue, 10 May 2022 16:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652201962; 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=jcKlHtpU832zoGolpYOs2/TitEToi/t4hMpX94yxo04=; b=fGTEvsieuq8j1QIUbdOjbN6a15YsAt9Z4HcIMJJ5sH45wepsYbs4/VLjUwyFHwXuK6xmni fKbRBISjrl39GQqh3AhC77X/xKafxCRRFD7MnkeP/tpXexSyMU/CnmL30uQVCgWKiUoW54 QZ6g5V7Qn3sMYKxiKil2d1DWmLDlSFP5Cx9JEqugilBinGvcMEUXdQVFEIot+M0qQfMDJn aTIiIVxaowbcM6T+KwVsTpuUimOlyeTjQE34Q9CY/65/97k49PCUBJNW72h/m4llSLmLMJ HnkGGnpXSI25m4uOLulpcXwjzGOmOZOdutGd3Mp430jEkoSZMosYtOupo1oAxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 E387ADFB; Tue, 10 May 2022 16:59:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24AGxLRB044734; Tue, 10 May 2022 16:59:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24AGxLPJ044733; Tue, 10 May 2022 16:59:21 GMT (envelope-from git) Date: Tue, 10 May 2022 16:59:21 GMT Message-Id: <202205101659.24AGxLPJ044733@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 6e7a585348d5 - main - bitstring: fix ff_area() when start!=0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e7a585348d5b9b96d16c1d76a994236560203c1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652201962; 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=jcKlHtpU832zoGolpYOs2/TitEToi/t4hMpX94yxo04=; b=Nwr+3NKUJmmxxcpRU1eYANDfs2qDhrwPOFCi2KwwonXdGwJeWiQKpTQoDLTISkdO5O5c/B f6oPfLp4kxrk0NEkD27AfPkWc4yUsWK9n7qpc3RU5df3KWhJooxoRu+at70EORxFVI2dwl Y16bYU78GfPIasiXxSqm2tn0d99jpF6Vc2fB32O07zWBdS93i0KLkchkFfoo2NV/mh0BcK qBEDz2Dy9LHFmfoUDm6THU2lbAUaa800ceiVRS5RSnMfQojMcsJcGDKGddv0TgBTvUVQWL H4debpWGPZT3sb0ncvO7zrmt5znWbB1eV84vnQdUMNx2qhV49gGgQaemiyOxgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652201962; a=rsa-sha256; cv=none; b=sM+M4QZtwzbfHaKgGQWAb4dbhHtCdDM14Wt2vuF3tuX3eKtfgmER+cFU94H3PfLC32d83f 8ro5ycXMsowaVM5E+zKW2EGC0X4GdXLagUm9bbMhR+K1mvSn3QOlOOJM/FE9mqSnu7an1R OoQLFP+zloD2vSIL/YillRLGjQXmSJq2r8Vl1WKlLspv68JuZ+LGiy5K3l53glSli78Gnh znyeHyVydcecDffGqkOGayeJJ0spVjsybDTObeZ06f5+nO9deCF9YUFga/MGFrwjkKsUgu NocvJ3LWOl2ofKsiSKfWXTvRnWbNHqgpHmbjB8CUxq0CsH8VbZkPRp9mSkaW/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=6e7a585348d5b9b96d16c1d76a994236560203c1 commit 6e7a585348d5b9b96d16c1d76a994236560203c1 Author: Doug Moore AuthorDate: 2022-05-10 16:53:52 +0000 Commit: Doug Moore CommitDate: 2022-05-10 16:53:52 +0000 bitstring: fix ff_area() when start!=0 commit 84e2ae64c597000a0 introduced an error in the ff*_area_at functions for nonzero start parameters when the bit range sought was found immediately. It mistakenly replaced '_value = _start' with '_value = 0' in initialization. Undo that mistake. Reported by: markj Reviewed by: markj Tested by: markj Fixes: 84e2ae64c597 vm_reserv: use enhanced bitstring for popmaps Differential Revision: https://reviews.freebsd.org/D35157 --- sys/sys/bitstring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/bitstring.h b/sys/sys/bitstring.h index e579f0dece13..3d239c531e47 100644 --- a/sys/sys/bitstring.h +++ b/sys/sys/bitstring.h @@ -305,7 +305,7 @@ bit_ff_area_at(bitstr_t *_bitstr, int _start, int _nbits, int _size, _mask = _match ? _BITSTR_MASK : 0; _maxshft = _bit_idx(_size - 1) == 0 ? _size : (int)_BITSTR_BITS; - _value = 0; + _value = _start; _curbitstr = _bitstr + _bit_idx(_start); _test = ~(_BITSTR_MASK << _bit_offset(_start)); for (_last = _size - 1, _test |= _mask ^ *_curbitstr;