From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#62290: Error when handling invalid unicode with suspendable ports Date: Mon, 20 Mar 2023 23:27:32 +0100 Message-ID: <87pm932h4b.fsf_-_@gnu.org> References: <874jqf6b35.fsf@cbaines.net> <20230320091513.10817-1-mail@cbaines.net> 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="6710"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: 62290-done@debbugs.gnu.org To: Christopher Baines Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Mar 20 23:28:36 2023 Return-path: Envelope-to: guile-bugs@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 1peNzY-0001UX-0h for guile-bugs@m.gmane-mx.org; Mon, 20 Mar 2023 23:28:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNz7-0000lb-TX; Mon, 20 Mar 2023 18:28:09 -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 1peNz2-0000kq-26 for bug-guile@gnu.org; Mon, 20 Mar 2023 18:28:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNz0-0000io-Hs for bug-guile@gnu.org; Mon, 20 Mar 2023 18:28:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNz0-0007sr-Dn for bug-guile@gnu.org; Mon, 20 Mar 2023 18:28:02 -0400 Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: bug-guile@gnu.org Resent-Date: Mon, 20 Mar 2023 22:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 62290 X-GNU-PR-Package: guile Mail-Followup-To: 62290@debbugs.gnu.org, ludo@gnu.org, mail@cbaines.net Original-Received: via spool by 62290-done@debbugs.gnu.org id=D62290.167935126130274 (code D ref 62290); Mon, 20 Mar 2023 22:28:02 +0000 Original-Received: (at 62290-done) by debbugs.gnu.org; 20 Mar 2023 22:27:41 +0000 Original-Received: from localhost ([127.0.0.1]:57095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNyf-0007sE-B2 for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:27:41 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNye-0007s2-5Z for 62290-done@debbugs.gnu.org; Mon, 20 Mar 2023 18:27:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNyY-0000eM-Uw; Mon, 20 Mar 2023 18:27:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=PCPlLL7uXQP7rxDUHEOrLfskkOE0wJY0zq1ctokOozw=; b=B7q3TjBl0coP9xeiMX+m 2thdYlzJv3WDd1SPs2LX7CsnrcbDt8282fkHhlmHzWmMIJZMrckBkBsSyK8FaplJikHxmqqMHBxVW Rgu79aNi1To2rJISU/n/nDxhf91rnMTFShPH6/jhqTc110j91+RgubvJ2cbjlP/cyvx9SiOHHgUUv tcVzIRMAti1PoKcil9fcVIxs8IYXJZVtNA6ZiKqEY5/j1gLq1IS7y1b4pdJTsXGdTMmsIwCrhsEFV J+y2ToNabf7tF3NWi7DpmFUcp5zR54Ia+iBZM1kc1HuDXudOmGK1p/8dw3+7KiX2U5jxtJRXO6zGO +0qB7xvekGx7cg==; Original-Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNyY-0001ZG-Cc; Mon, 20 Mar 2023 18:27:34 -0400 In-Reply-To: <20230320091513.10817-1-mail@cbaines.net> (Christopher Baines's message of "Mon, 20 Mar 2023 09:15:13 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10574 Archived-At: Hello, Christopher Baines skribis: > Based on the implementation in ports.c. I don't understand what this > code is really doing, but the suspendable ports implementation differs > from the similar C code for a couple of inequalities. > > * module/ice-9/suspendable-ports.scm (decode-utf8, bad-utf8-len): Flip a > couple of inequalities. > * test-suite/tests/ports.test ("string ports"): Add additional invalid > UTF-8 test case. Pushed as cba2e7e3fec3c781230570f5d1ef070625eeeda8. Thanks for documenting the problem and providing a perfect patch! Ludo=E2=80=99.