From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#73307: Fix ctype(3) usage Date: Tue, 17 Sep 2024 17:05:29 -0700 Organization: UCLA Computer Science Department Message-ID: <89deb908-92a6-489f-bab9-116556ce8ce4@cs.ucla.edu> References: <86r09ibiq3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------0acPehYJigiIb8l9Pe7EdgUy" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="556"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Po Lu , 73307-done@debbugs.gnu.org, Thomas Klausner To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 18 02:06:08 2024 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 1sqiCt-000AYE-Ok for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Sep 2024 02:06:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqiCb-0004uf-PT; Tue, 17 Sep 2024 20:05:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sqiCZ-0004mM-Ej for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 20:05:47 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sqiCZ-0006gL-2v for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 20:05:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=XJZSo/opSCMrvIp3Si/axaVLSBinsnnYKoBzfwuS8Us=; b=RgpcA7Ntp+R/zQm6M5WN8GePGl+IaQ2Ki1Y4yBS1lOelafzr2o1h72Q0GQTHjf971+xAJOFIWTXP7IhxoIC4zXVwVwtmydXjEeUlKY/w+6s4grlrTJLnZsdMcg44HBIOS7HM/wxZ6PeZ5xTR5Bj2374JbX9uEoR/njqWgQ5GLy40owgjVrZ0HSYE8mc80GWkanlp/bowhfHxc8QXL+/gpJKGUywgNZ6jIM2EjpG2XbFm6QpTOL8dnB+dy5pAmVetPKOeAJyPiCX707307G63EwURYtpg/+dqeNT+B3Dw6t2/GHtgU5akYJq5uJNLWllc4dQ93jWTl90SKqVs2//yYg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sqiCo-0006y2-4f for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 20:06:02 -0400 Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Sep 2024 00:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 73307 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 73307@debbugs.gnu.org, eggert@cs.ucla.edu, wiz@gatalith.at Original-Received: via spool by 73307-done@debbugs.gnu.org id=D73307.172661795426761 (code D ref 73307); Wed, 18 Sep 2024 00:06:01 +0000 Original-Received: (at 73307-done) by debbugs.gnu.org; 18 Sep 2024 00:05:54 +0000 Original-Received: from localhost ([127.0.0.1]:56230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqiCf-0006xX-Hz for submit@debbugs.gnu.org; Tue, 17 Sep 2024 20:05:54 -0400 Original-Received: from mail.cs.ucla.edu ([131.179.128.66]:60980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqiCd-0006xH-Gl for 73307-done@debbugs.gnu.org; Tue, 17 Sep 2024 20:05:52 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 950403C011BD4; Tue, 17 Sep 2024 17:05:30 -0700 (PDT) Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id 1CrF7B32fJGt; Tue, 17 Sep 2024 17:05:30 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id EFF443C011BD7; Tue, 17 Sep 2024 17:05:29 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu EFF443C011BD7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1726617930; bh=XJZSo/opSCMrvIp3Si/axaVLSBinsnnYKoBzfwuS8Us=; h=Message-ID:Date:MIME-Version:To:From; b=YcdTc+fDCVjlxlpnItLlKN1u6+iUcII1oG4GYZLyqQLZdOQBy+kLaVJzlbpzoOKxT mt2a+SxoZRoVjlLsSa6rvyz025xV6VxbahyjUMIvGFrwaGCm7SMsLOK6e4VM8+EAlY aHYi7rRQ9umuv7WCR9ZHkfIYowqF7MvwlIlDQEZ3WJVIOy7fL4+08RtyktDnq/Pv9p scdaWlVxBpN5l+4I6iamgAth7KQeK/aOaIJV80RWkTQxNNoPI6dz1se5ItjoX/3MXP ABLjMB1xc93vHAamEc8LbbefbzzPtIPQqo4kdLK99c0DHW+m0yM0fwCIT9yUqkAvA5 W+XCDjMKHB5fQ== X-Virus-Scanned: amavis at mail.cs.ucla.edu Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id xxPzeiYIdOGo; Tue, 17 Sep 2024 17:05:29 -0700 (PDT) Original-Received: from [192.168.254.12] (unknown [47.150.137.250]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id BC92B3C011BD4; Tue, 17 Sep 2024 17:05:29 -0700 (PDT) Content-Language: en-US In-Reply-To: <86r09ibiq3.fsf@gnu.org> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291984 Archived-At: This is a multi-part message in MIME format. --------------0acPehYJigiIb8l9Pe7EdgUy Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024-09-17 04:52, Eli Zaretskii wrote: > However, I'm not sure this is the right fix, the function is > defined with argument type of 'int'. Paul, any comments? Although that patch was an improvement it still had problems, as it incorrectly assumed the string does not end in a multibyte space, and that Emacs's locale matches the system's. Emacs itself should not use unless it knows the string is unibyte and the system locale matches Emacs's. I scanned through its source code looking for all problematic instances of that have crept in (except I didn't scan the MS-Windows code, where you're the expert), and found five other places where ctype.h was obviously misused. I installed the attached to fix these glitches and am boldly closing this the report. I can't easily test patch 0003, which fixes Android-specific code. Although I think it's an improvement, in unlikely cases I suspect it still doesn't exactly match what the Android kernel does with #! lines. I don't know whether that matters. I'll CC this to Po Lu (my goto person for Android) as a heads-up. --------------0acPehYJigiIb8l9Pe7EdgUy Content-Type: text/x-patch; charset=UTF-8; name="0001-Fix-yes-or-no-p-with-multibyte-spaces.patch" Content-Disposition: attachment; filename="0001-Fix-yes-or-no-p-with-multibyte-spaces.patch" Content-Transfer-Encoding: base64 RnJvbSA0M2NkZTAzZmE1YTY2M2ExNTA5YTc2MjA3N2MxMWViNTdhNjBjZWU4IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBUdWUsIDE3IFNlcCAyMDI0IDE1OjIyOjAyIC0wNzAwClN1YmplY3Q6IFtQQVRD SCAxLzRdIEZpeCB5ZXMtb3Itbm8tcCB3aXRoIG11bHRpYnl0ZSBzcGFjZXMKTUlNRS1WZXJz aW9uOiAxLjAKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PVVURi04CkNvbnRl bnQtVHJhbnNmZXItRW5jb2Rpbmc6IDhiaXQKClByb2JsZW0gcmVwb3J0ZWQgYnkgVGhvbWFz IEtsYXVzbmVyIChCdWcjNzMzMDcpLgpFbWFjcyBzaG91bGRu4oCZdCB1c2UgY3R5cGUuaCwg YXMgaXQgZG9lc27igJl0IHdvcmsgZm9yIG11bHRpYnl0ZQpjaGFycyBhbmQgaXQgZG9lc27i gJl0IHdvcmsgd2l0aCBFbWFjc+KAmXMgbG9jYWxlIG1vZGVsIGFueXdheS4KKiBzcmMvZm5z LmM6IEluY2x1ZGUgc3ludGF4LmgsIG5vdCBjdHlwZS5oLgooRnllc19vcl9ub19wKTogQ2hl Y2sgdGhlIGNoYXJhY3RlciBjYXRlZ29yeSB3aXRoIFNZTlRBWCwgbm90CndpdGggaXNzcGFj ZSwgd2hpY2ggYXNzdW1lcyB0aGUgY3VycmVudCBsb2NhbGUgYW5kIHdvcmtzIG9ubHkKd2l0 aCBzaW5nbGUtYnl0ZSBjaGFyYWN0ZXJzLgotLS0KIHNyYy9mbnMuYyB8IDE4ICsrKysrKysr K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ot ICAgIGlmICgobGVuID4gMCkgJiYgIWlzc3BhY2UgKHNbbGVuIC0gMV0pKQotICAgICAgcHJv bXB0ID0gQ0FMTE4gKEZjb25jYXQsIHByb21wdCwgYnVpbGRfc3RyaW5nICgiICIpKTsKLSAg fQotICBwcm9tcHQgPSBDQUxMTiAoRmNvbmNhdCwgcHJvbXB0LCBWeWVzX29yX25vX3Byb21w dCk7CisgIHB0cmRpZmZfdCBwcm9tcHRsZW4gPSBTQ0hBUlMgKHByb21wdCk7CisgIGJvb2wg cHJvbXB0X2VuZHNfaW5fbm9uc3BhY2UKKyAgICA9ICgwIDwgcHJvbXB0bGVuCisgICAgICAg JiYgKFNZTlRBWCAoWEZJWE5BVCAoRmFyZWYgKHByb21wdCwgbWFrZV9maXhudW0gKHByb21w dGxlbiAtIDEpKSkpCisJICAgIT0gU3doaXRlc3BhY2UpKTsKKyAgQVVUT19TVFJJTkcgKHNw YWNlX3N0cmluZywgIiAiKTsKKyAgcHJvbXB0ID0gQ0FMTE4gKEZjb25jYXQsIHByb21wdCwK KwkJICBwcm9tcHRfZW5kc19pbl9ub25zcGFjZSA/IHNwYWNlX3N0cmluZyA6IGVtcHR5X3Vu aWJ5dGVfc3RyaW5nLAorCQkgIFZ5ZXNfb3Jfbm9fcHJvbXB0KTsKIAogICBzcGVjcGRsX3Jl ZiBjb3VudCA9IFNQRUNQRExfSU5ERVggKCk7CiAgIHNwZWNiaW5kIChRZW5hYmxlX3JlY3Vy c2l2ZV9taW5pYnVmZmVycywgUXQpOwotLSAKMi40My4wCgo= --------------0acPehYJigiIb8l9Pe7EdgUy Content-Type: text/x-patch; charset=UTF-8; name="0002-Fix-misuse-of-toupper-in-sfnt_parse_style.patch" Content-Disposition: attachment; filename="0002-Fix-misuse-of-toupper-in-sfnt_parse_style.patch" Content-Transfer-Encoding: base64 RnJvbSA1OGE0NGI2YWMzMTdjOWExN2JjZGQyMDhlNGVjMzNmZjk3NzI0MjllIE1vbiBTZXAg MTcgMDA6MDA6M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0eWxlIChM aXNwX09iamVjdCBzdHlsZV9uYW1lLCBzdHJ1Y3Qgc2ZudF9mb250X2Rlc2MgKmRlc2MpCiAJ fQogCiAgICAgICAvKiBUaGlzIHRva2VuIGlzIGV4dHJhbmVvdXMgb3Igd2FzIG5vdCByZWNv Z25pemVkLiAgQ2FwaXRhbGl6ZQotCSB0aGUgZmlyc3QgbGV0dGVyIGFuZCBzZXQgaXQgYXMg dGhlIGFkc3R5bGUuICAqLworCSB0aGUgZmlyc3QgbGV0dGVyIGlmIGl0J3MgQVNDSUkgbG93 ZXJjYXNlLCB0aGVuIHNldCB0aGUgdG9rZW4gYXMKKwkgdGhlIGFkc3R5bGUuICAqLwogCiAg ICAgICBpZiAoc3RybGVuIChzaW5nbGUpKQogCXsKLQkgIGlmIChpc2xvd2VyIChzaW5nbGVb MF0pKQotCSAgICBzaW5nbGVbMF0gPSB0b3VwcGVyIChzaW5nbGVbMF0pOworCSAgc2luZ2xl WzBdID0gY190b3VwcGVyIChzaW5nbGVbMF0pOwogCiAJICBpZiAoTklMUCAoZGVzYy0+YWRz dHlsZSkpCiAJICAgIGRlc2MtPmFkc3R5bGUgPSBidWlsZF9zdHJpbmcgKHNpbmdsZSk7Ci0t IAoyLjQzLjAKCg== --------------0acPehYJigiIb8l9Pe7EdgUy Content-Type: text/x-patch; charset=UTF-8; name="0003-Fix-some-misparsing-in-check_interpreter.patch" Content-Disposition: attachment; filename="0003-Fix-some-misparsing-in-check_interpreter.patch" Content-Transfer-Encoding: base64 RnJvbSBlMGIwMjdkMTIxNWVkMzJmZTBmM2QwOTU2ZDJkN2E4MTU1MjI3NGYyIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBUdWUsIDE3IFNlcCAyMDI0IDE2OjM4OjUzIC0wNzAwClN1YmplY3Q6IFtQQVRD SCAzLzRdIEZpeCBzb21lICMhIG1pc3Bh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aXJl IHN0YXJ0LiAgKi8KIAotICBpZiAoIXdzKQorICBpZiAoISp3cykKICAgICB7CiAgICAgICBp ZiAobHNlZWsgKGZkLCAwLCBTRUVLX1NFVCkpCiAJZ290byBmYWlsOwotLSAKMi40My4wCgo= --------------0acPehYJigiIb8l9Pe7EdgUy Content-Type: text/x-patch; charset=UTF-8; name="0004-Use-c-ctype.h-in-lib-src.patch" Content-Disposition: attachment; filename="0004-Use-c-ctype.h-in-lib-src.patch" Content-Transfer-Encoding: base64 RnJvbSA4NjViNTRlMmFjZWE0ZmRhYTNmMzAyZWQyMjVmNTAyODFiMzcxZDZlIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBUdWUsIDE3IFNlcCAyMDI0IDE2OjU0OjE3IC0wNzAwClN1YmplY3Q6IFtQQVRD SCA0LzRdIFVzZSBjLWN0eXBlLmggaW4gbGliLXNyYwoKVGhpcyBmaXhlcyBzb21lIHVubGlr ZWx5IGJ1Z3MgYW5kIHJlbW92ZXMgdGhlIHRlbXB0YXRpb24Kb2YgdXNpbmcgY3R5cGUuaC4g IEFsdGhvdWdoIHNvbWUgdXNlcyB3ZXJlIGNvcnJlY3QsCm1hbnkgd2VyZW4ndC4KKiBsaWIt c3JjL2Vicm93c2UuYzogSW5jbHVkZSBjLWN0eXBlLmgsIG5vdCBjdHlwZS5oLgoqIGxpYi1z cmMvZW1hY3NjbGllbnQuYzogSW5jbHVkZSBjLWN0eXBlLmgsIG5vdCBjdHlwZS5oLgoqIGxp Yi1zcmMvdXBkYXRlLWdhbWUtc2NvcmUuYzogSW5jbHVkZSBjLWN0eXBlLmgsIG5vdCBjdHlw ZS5oLgpBbGwgdXNlcyBjaGFuZ2VkLgotLS0KIGxpYi1zcmMvZWJyb3dzZS5jICAgICAgICAg ICB8IDEwICsrKysrLS0tLS0KIGxpYi1zcmMvZW1hY3NjbGllbn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