From nobody Fri Nov 17 00:13:02 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 4SWcmv5p4Fz51GtS; Fri, 17 Nov 2023 00:13:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 4SWcmv5KcQz3NSS; Fri, 17 Nov 2023 00:13:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700179983; 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: in-reply-to:in-reply-to:references:references; bh=WSFBiOfhgxM5L8f80vp6S05eht0sNKAo2Y2v0zLsjB8=; b=XP/sFip363nUR03zoiD1qEPdB6NT41Sq9bwUzgHbLZsmnv3SrVbF3IyEzDXTGkEz95YexM rOAPuVlX/jbOrgDyjinL4ti8xRNr6aTqtQpurxyhoYHNqCnU3hQ5cqhfuB24tdY0z+y1bh Imz/rdCPUSGYybILpORfcRqE4KjpHybrT8+L8xSkyVczaj7IZKcbgXXGFnw0icu5tPvORy fMpXvlP7WdpkYS3VNso+kjM0bQ14G2IpKdRDsVZd/WZgGQgW9Kj2xwpCpp13cKM1qNNhNJ FJJGACJEUhpqk9elAXESWOCcZnykPJy509ebqUFjENrjuFcwo1iZ6ySzlWYfCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700179983; 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: in-reply-to:in-reply-to:references:references; bh=WSFBiOfhgxM5L8f80vp6S05eht0sNKAo2Y2v0zLsjB8=; b=DIzfmSGi7sDQxEsruoaE15m+AfEl0rdnr7BGraduGcH726D8SkPlXffUSu8YnoXzs8KV4A Ju6p22I6soSj/6dRLPtB+BxbIIEzRF/j3h/DauqK8Zre/ewFAXzCQyps0n07MmuhebQ6zF Pd5IFhUm20JxrzkEfNflKYmtnXjH+ldBIK+jcRRmdRX38Rov1aueXzG7CBIWGxkJCE9j44 dunpX+MLFSx0ud7XNNVtdK6C1gXc2Ck2FLNYXlwU+U3YTpgVx8ED/uCbfx4Mx0RWXIQjOV AeHB8huE+vMkct4Fl9Qn7ODdRV8SDShRRJCJEW+OQJlw8YIymDwghq64zNbDjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700179983; a=rsa-sha256; cv=none; b=pWkAzdu6aQKOxS9kEZuxzVOqsDYVCXXe66+i48ogWQGhSy+V+2TEZ5EORDsBE69KeiWaY1 gjeeDbJxko0SV70Mgm3txuYSuMPs7VEo1aRvaEtQebclA9JigoSO5eOQmCZ0ZRqaKjQwrX TCAbMGJ3q7xKR2kVoNgGzmNGXRETvRCe6TnTeE+PGXSkuWey1lN8XhlKf6EF2t0jrr5+/G 6f4UBwhWqH0PSh8zxGoErCP0zoJkK5S2Slsxoqtq3zVevBWqqCenA0B9pxdTM0S9tNFA0j VnTE5YFBCloR/7Q6ekhVk754u8VNgp/zVKTbOvP/SExVHfmBiuf7kcJpx1SLhQ== Received: from [IPV6:2601:648:8384:fd00:4878:c61e:b5b1:ef36] (unknown [IPv6:2601:648:8384:fd00:4878:c61e:b5b1:ef36]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SWcmv1tmkz19WX; Fri, 17 Nov 2023 00:13:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <681da086-e250-4e7b-9baa-6b366742312e@FreeBSD.org> Date: Thu, 16 Nov 2023 16:13:02 -0800 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 User-Agent: Mozilla Thunderbird Subject: Re: git: fd9ae9ac04ed - main - pkg: Allocate a suitably-sized string for the local ABI Content-Language: en-US From: John Baldwin To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202311160054.3AG0somJ049001@gitrepo.freebsd.org> In-Reply-To: <202311160054.3AG0somJ049001@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/15/23 4:54 PM, John Baldwin wrote: > The branch main has been updated by jhb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=fd9ae9ac04edf9acef4a2ffbf663698a2b8e7ced > > commit fd9ae9ac04edf9acef4a2ffbf663698a2b8e7ced > Author: John Baldwin > AuthorDate: 2023-11-16 00:53:53 +0000 > Commit: John Baldwin > CommitDate: 2023-11-16 00:53:53 +0000 > > pkg: Allocate a suitably-sized string for the local ABI > > Previously the local ABI string was written to an on-stack buffer and > the pointer to that buffer was saved in a global before the function > returned. This had two issues: c[ABI].val pointed to a > no-longer-valid on-stack buffer after config_init returned, and the > string could potentially be truncated. Fix both of those by changing > pkg_get_myabi to return a pointer to a string allocated by asprintf. > > Note that the allocated string is left in the global config array > until it is implicitly freed on process exit. > > Reported by: GCC 13 -Wdangling-pointer > Reviewed by: emaste > Differential Revision: https://reviews.freebsd.org/D42623 With this (and earlier fixes), I'm able to build amd64 world + GENERIC with GCC 13.2. The review for the port for that is still in review, but once the port lands I have a change against freebsd-ci to add GCC 13 jobs to Jenkins for main. -- John Baldwin