From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#52888: 29.0.50; font_{delete_unmatched,score} do not handle nil FONT_WEIGHT_INDEX Date: Wed, 05 Jan 2022 14:55:02 +0100 Message-ID: <87tuei8eyx.fsf@gmail.com> References: <87bl0raq55.fsf@melete.silentflame.com> <83tuei9x3v.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18384"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52888@debbugs.gnu.org, Sean Whitton To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 05 15:12:42 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n571t-0004VG-OX for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Jan 2022 15:12:41 +0100 Original-Received: from localhost ([::1]:54966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n571r-0003aE-TQ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Jan 2022 09:12:39 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n56lm-0004uM-VV for bug-gnu-emacs@gnu.org; Wed, 05 Jan 2022 08:56:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56443) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n56lm-0005o4-Ls for bug-gnu-emacs@gnu.org; Wed, 05 Jan 2022 08:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n56lm-0004BY-G4 for bug-gnu-emacs@gnu.org; Wed, 05 Jan 2022 08:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Jan 2022 13:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52888 X-GNU-PR-Package: emacs Original-Received: via spool by 52888-submit@debbugs.gnu.org id=B52888.164139091216022 (code B ref 52888); Wed, 05 Jan 2022 13:56:02 +0000 Original-Received: (at 52888) by debbugs.gnu.org; 5 Jan 2022 13:55:12 +0000 Original-Received: from localhost ([127.0.0.1]:39756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n56ky-0004AK-8k for submit@debbugs.gnu.org; Wed, 05 Jan 2022 08:55:12 -0500 Original-Received: from mail-wm1-f44.google.com ([209.85.128.44]:43706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n56kv-00049z-VQ for 52888@debbugs.gnu.org; Wed, 05 Jan 2022 08:55:11 -0500 Original-Received: by mail-wm1-f44.google.com with SMTP id k66-20020a1ca145000000b00345fa984108so3365358wme.2 for <52888@debbugs.gnu.org>; Wed, 05 Jan 2022 05:55:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=vnpIdcAFkMprYI4adJXs5R3lV9NvuJeMdYITh1V+Bh0=; b=m14iLdSMDLIgOekXd/DwQlk7+Grr++WKlM6AWTOHKtFzHux5erQI6J61TQjv26jF2n kOux3MI3EjsgHX3Ntm5hPxQCEMhsrLA+W0nh9el0FtOyWll+aWRgbiKe0JpIdD+zgn1Z zIBz9df/fBFQCYG9ol/edpIaTxRMXgmx2izk5mibU6BQCJeTzmkjXOGLyGVeMyQo7tT0 l/I26ru+3JWhlBw0BVrNL4r8EZFCU0Qqtw0zKV5e3xzVQIx38/uXR2c9kdSYryivV919 zumcAimKrvP9Go55Nxu+t87IgUBnHCymnrJuLaElmY10CVDLZ/FZlBrfIenkysCNj1/J ib6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=vnpIdcAFkMprYI4adJXs5R3lV9NvuJeMdYITh1V+Bh0=; b=hTNuK7X8lCtUIY/tTCL+fDcZ24AYw7PWb/qyEy4yL8Z/cS3ZUOVPZe16ggi1ZZ7wpj 58aKF3xixTVI+BHIm4y96wcStjzgbuVfbgd1BLE9u2zbNHw5ejvcxCD4Palm9fASNqXv 3F9QE7MDBA4ZMrTUFlrdfxVFvvQ4UxxYQ7P8tcL0qs0wFdK64P3i5LicVv6zlPqSGK3b hGXS6SMYq9Dc8gbPpltVLDhbUujJKJNLHWL/nMwt6Qg3oWZ3zLoiyiF/jqdn0q9DQc6Y KevZBoCo/sCn9EnJVyU2aLJ8jbP/cqSyQ7RE6JJsRqf/no8AK20cFws/vqDqxkaDppK9 LCcg== X-Gm-Message-State: AOAM531rc3aUAOz+dz+X20iBQwNtXLiZqdJxOn9MIfGiu8/XiI3+ScYB pp7WyhuO7CcATV4/a0Ci8jsMqTyGp4c= X-Google-Smtp-Source: ABdhPJyH7AlFOi2X3e6cNTMr8GOicIZz130tymOMlgwzPYpOFzwTr6PnYuyUvVdF5VZVIo/aHHJV/A== X-Received: by 2002:a05:600c:ac4:: with SMTP id c4mr2937819wmr.81.1641390903655; Wed, 05 Jan 2022 05:55:03 -0800 (PST) Original-Received: from rltb ([2a01:e0a:3f3:fb50:32f5:4bb4:3da9:8697]) by smtp.gmail.com with ESMTPSA id c7sm46377851wri.21.2022.01.05.05.55.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jan 2022 05:55:03 -0800 (PST) In-Reply-To: <83tuei9x3v.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 05 Jan 2022 14:37:56 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:223688 Archived-At: >>>>> On Wed, 05 Jan 2022 14:37:56 +0200, Eli Zaretskii said: Eli> I'm far from being an expert on Fontconfig programming, but the ab= ove Eli> use of 'range' looks strange: it's a pointer that starts pointing = to Eli> some random (potentially invalid) address, and you pass its addres= s to Eli> FcPatternGetRange, which presumably assigns to it a valid point. = But Eli> doesn't that valid pointer need to be released somehow after we use Eli> it? Or does it point to static area(s)? I cannot find anything in Eli> the Fontconfig documentation about the memory-management protocols= for Eli> FcValue objects, but maybe we should call FcValueDestroy on it aft= er Eli> we are done with it? Or maybe this is not needed, as this passage Eli> from the docs says near the end: Eli> void FcValueDestroy (FcValue v) Eli> Frees any memory referenced by `v'. Values of type FcTypeStr= ing, Eli> FcTypeMatrix and FcTypeCharSet reference memory, the other t= ypes Eli> do not. Based on an admittedly quick reading of the fontconfig code, it=CA=BCs not our responsibility to deallocate the FcRange here; it ends up pointing to memory previously allocated internally by fontconfig. Robert --=20