From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arsen =?utf-8?Q?Arsenovi=C4=87?= Newsgroups: gmane.emacs.devel Subject: Re: HAVE_FAST_UNALIGNED_ACCESS Date: Sat, 01 Apr 2023 17:22:48 +0200 Message-ID: <86h6tzr4b2.fsf@aarsen.me> References: <87sfdmlgzx.fsf@gmail.com> <94d3de92c50a96d9172f88462bf3bc9c2792600c.camel@gmail.com> <83mt3s244o.fsf@gnu.org> <875yagtopn.fsf@yahoo.com> <838rfc17ja.fsf@gnu.org> <871ql4t8ph.fsf@yahoo.com> <83wn2wyuli.fsf@gnu.org> <63A29442-4C0C-4C3C-B40E-4A3DB91E3009@gmail.com> <83lejcypyw.fsf@gnu.org> <87wn2wrmgc.fsf@yahoo.com> <83bkk7zvxl.fsf@gnu.org> <87lejbpxkm.fsf@aarsen.me> <83zg7rybfo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39250"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, mattias.engdegard@gmail.com, vibhavp@gmail.com, rpluim@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 01 17:49:52 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pidUE-0009ub-Rw for ged-emacs-devel@m.gmane-mx.org; Sat, 01 Apr 2023 17:49:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pidTi-0004bB-Hn; Sat, 01 Apr 2023 11:49:18 -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 1pidTh-0004ap-1s for emacs-devel@gnu.org; Sat, 01 Apr 2023 11:49:17 -0400 Original-Received: from mout-p-102.mailbox.org ([2001:67c:2050:0:465::102]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pidTf-0004SD-0K; Sat, 01 Apr 2023 11:49:16 -0400 Original-Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4PphR90LrRz9sWN; Sat, 1 Apr 2023 17:49:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1680364149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jeA2jvrI+0jOTrrTsd6bpOK1ApyUsmSmlb3ELJwJPNE=; b=ES95Lne/G1q2LYOHnPFiGWokLmLvaop4spRNH/0EDgjnDk63cYbwdiJn3R+OcIUPyn/8mB RjVyTQJfQt70S+oNvg1j3Tz7q4nke2nghQE5Mw5x8wQ6zAvCzCPjtTrvgBjZt7I7U7Eooh IIcVH9rjnmhV64u3y9MyBW9sB1A7Py8boEbQZY74vChX8ZYrmtDehzZ6GiShb0wPR3en3G Jq9IpI0YlXHx24pzx8VmdaWanJ+IGdUkoZ9NGZND/NjwtXMyORRgLmELObod7fFdqdFHKW LA/qSukT5QT9sSQ6lajnqKoroq8zZ8O30AAjJU5rqtGXEuKDztuW00jYhpom8A== In-reply-to: <83zg7rybfo.fsf@gnu.org> X-Rspamd-Queue-Id: 4PphR90LrRz9sWN Received-SPF: pass client-ip=2001:67c:2050:0:465::102; envelope-from=arsen@aarsen.me; helo=mout-p-102.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305017 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: > You are again trying to push for a change without showing any actual > bug with the existing code. Please humor me, and please show me an > actual bug due to the existing code before suggesting a solution. See > above for the description of the details I'd like to know about such > actual bug. For a somewhat contrived example, UBsan flags this code (and, when running the testsuite, it'd seem that it flags only this code). ~/gnu/emacs-29/_build 2 $ gcc --version gcc (Gentoo Hardened 13.0.1_pre20230326-r1 p9) 13.0.1 20230326 (experimen= tal) Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS= E. =20=20 ~/gnu/emacs-29/_build$ git rev-parse HEAD b39c3cd1125590bf4b77880b41ac08b29cdfcff6 ~/gnu/emacs-29/_build$ gcc -dumpmachine x86_64-pc-linux-gnu I can't speak to Po's example, but IIUC, he ran into a problem somewhere (maybe the same example?). >> .. or something similar to it, assuming I made an error, which is likely >> given the circumstances. This does pass the testsuite, anyway. It >> should just expand deferences into explicit memcpys. >>=20 >> No actual memcpy calls are produced, and this is at least functional on >> a superset of compilers, and I suspect replacing the whole thing with a >> naive-looking while (*(w1++) !=3D *(w2++)); loop would be even better (b= ut >> I can settle for that being too experimental). > > Sorry, I don't want to risk any errors, and I would like to avoid any > experiments with the release branch. Which is why I'm asking for hard > evidence. It isn't that I don't understand what you and others are > saying, or don't believe you. It's just that we need to see the > problems before we can judge the solutions that must be safe on this > branch. I was writing the patch for demonstration purposes more than for actual application. I understand why you're arguing this, and I have to thank you for it - such efforts keep Emacs as stable as it is - but this feels like an example that is too trivial to apply such judgment to, hence my position. I am certain that you have an understanding of the issue at hand, I'm only trying to provide a solution that's safe enough for 29. Have a lovely day. =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZChScl8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosSTzakBAJA71e8SPOafHf8c6bDEezvzQPkdIyHv90/1 oq6QvfKFAP0WIyBwLPUYQBRBd3YsVeBkKAeN0jGUMJT7f1yrcSLuAQ== =H6+s -----END PGP SIGNATURE----- --=-=-=--