From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.bugs Subject: bug#56413: [PATCH 1/1] scm_i_utf8_string_hash: compute u8 chars not bytes Date: Tue, 05 Jul 2022 22:04:08 -0500 Message-ID: <878rp7q6vr.fsf@trouble.defaultvalue.org> References: <20220706012323.1024763-1-rlb@defaultvalue.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17070"; mail-complaints-to="usenet@ciao.gmane.io" To: 56413@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Wed Jul 06 05:05:43 2022 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 1o8vMF-0004Cp-46 for guile-bugs@m.gmane-mx.org; Wed, 06 Jul 2022 05:05:43 +0200 Original-Received: from localhost ([::1]:49184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8vMD-0000m3-8k for guile-bugs@m.gmane-mx.org; Tue, 05 Jul 2022 23:05:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8vLb-0000lt-3v for bug-guile@gnu.org; Tue, 05 Jul 2022 23:05:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58091) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8vLa-0003bu-R0 for bug-guile@gnu.org; Tue, 05 Jul 2022 23:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o8vLa-00038X-HC for bug-guile@gnu.org; Tue, 05 Jul 2022 23:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rob Browning Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 06 Jul 2022 03:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56413 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch Original-Received: via spool by 56413-submit@debbugs.gnu.org id=B56413.165707665211997 (code B ref 56413); Wed, 06 Jul 2022 03:05:02 +0000 Original-Received: (at 56413) by debbugs.gnu.org; 6 Jul 2022 03:04:12 +0000 Original-Received: from localhost ([127.0.0.1]:51988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8vKm-00037R-J2 for submit@debbugs.gnu.org; Tue, 05 Jul 2022 23:04:12 -0400 Original-Received: from defaultvalue.org ([45.33.119.55]:59668 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8vKk-00037H-7I for 56413@debbugs.gnu.org; Tue, 05 Jul 2022 23:04:11 -0400 Original-Received: from trouble.defaultvalue.org (localhost [127.0.0.1]) (Authenticated sender: rlb@defaultvalue.org) by defaultvalue.org (Postfix) with ESMTPSA id 81BA220347 for <56413@debbugs.gnu.org>; Tue, 5 Jul 2022 22:04:08 -0500 (CDT) Original-Received: by trouble.defaultvalue.org (Postfix, from userid 1000) id 1E66A14E494; Tue, 5 Jul 2022 22:04:08 -0500 (CDT) In-Reply-To: <20220706012323.1024763-1-rlb@defaultvalue.org> 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" Xref: news.gmane.io gmane.lisp.guile.bugs:10297 Archived-At: Rob Browning writes: > Noticed while investigating a migration to utf-8 strings. After making > changes that routed non-ascii symbol hashing through this function, > encoding-iso88597.test began intermittently failing because it would > traverse trailing garbage when u8_strnlen reported 8 chars instead of 4. > > Change the scm_i_str2symbol internal hash type to unsigned long to > explicitly match the hashing result type. Hmm. I suppose the current test could be handled on the scheme side instead. (I'd started off attempting some more direct, elaborate tests that didn't pan out.) Happy to rework that if desired. -- Rob Browning rlb @defaultvalue.org and @debian.org GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4