From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector objects Date: Sat, 30 May 2020 09:31:49 -0700 Organization: UCLA Computer Science Department Message-ID: <7c66e510-a8e6-17d0-94b1-793b49f87a37@cs.ucla.edu> References: <83zha8cgpi.fsf@gnu.org> <83h7w5xvfa.fsf@gnu.org> <83y2phwb9x.fsf@gnu.org> <83r1v9w9vi.fsf@gnu.org> <83mu5xw50d.fsf@gnu.org> <83k110wxte.fsf@gnu.org> <4bab5f55-95fe-cf34-e490-1d4319728395@cs.ucla.edu> <837dwyvi74.fsf@gnu.org> <1484f569-c260-9fb0-bfe1-67897de289d3@cs.ucla.edu> <83blm9tn4j.fsf@gnu.org> <4aeb8963-4fd1-fcd4-e6e1-be409ab54775@cs.ucla.edu> <83tuzzrk30.fsf@gnu.org> <749bc7d0-6376-ec2e-7f84-dcd3a3cea465@cs.ucla.edu> <83sgfjqn49.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="ciao.gmane.io:159.69.161.202"; logging-data="130030"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 Cc: 41321@debbugs.gnu.org, Stefan Monnier To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 30 18:32:35 2020 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 1jf4PS-000Xi0-At for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 May 2020 18:32:34 +0200 Original-Received: from localhost ([::1]:34418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jf4PR-0007DB-BS for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 May 2020 12:32:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf4Ow-0007B3-PO for bug-gnu-emacs@gnu.org; Sat, 30 May 2020 12:32:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jf4Ow-0007ay-FQ for bug-gnu-emacs@gnu.org; Sat, 30 May 2020 12:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jf4Ow-0006Go-CP for bug-gnu-emacs@gnu.org; Sat, 30 May 2020 12:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 May 2020 16:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41321 X-GNU-PR-Package: emacs Original-Received: via spool by 41321-submit@debbugs.gnu.org id=B41321.159085631924094 (code B ref 41321); Sat, 30 May 2020 16:32:02 +0000 Original-Received: (at 41321) by debbugs.gnu.org; 30 May 2020 16:31:59 +0000 Original-Received: from localhost ([127.0.0.1]:58965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf4Ot-0006GY-9J for submit@debbugs.gnu.org; Sat, 30 May 2020 12:31:59 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:52576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf4Or-0006GK-10 for 41321@debbugs.gnu.org; Sat, 30 May 2020 12:31:57 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1ED6B1600D9; Sat, 30 May 2020 09:31:51 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id grDdBFN5dde2; Sat, 30 May 2020 09:31:50 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4164A1600DA; Sat, 30 May 2020 09:31:50 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Mrkd8yux0Sra; Sat, 30 May 2020 09:31:50 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 083DD1600D9; Sat, 30 May 2020 09:31:50 -0700 (PDT) Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0IxRApsRWR3 MzRzUk9mNlY4bVp3MHhmcVQ2UEtFNDZMY0ZlZnpzMGtiZzRHT1JmOHZqRzJTZjF0azVlVThN Qml5Ti9iClowM2JLTmpOWU1wT0REUVF3dVA4NGtZTGtYMndCeHhNQWhCeHdiRFZadWR6eERa SjFDMlZYdWpDT0pWeHEya2wKakJNOUVUWXVVR3FkNzVBVzJMWHJMdzYrTXVJc0hGQVlBZ1Jy NytLY3dEZ0JBZndoU In-Reply-To: Content-Language: en-US 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:181236 Archived-At: On 5/29/20 2:01 PM, Pip Cet wrote: > (1) says: > It=E2=80=99s an invalid optimization, since pointers can address the > middle of Lisp_Object data. >=20 > That may be true (we still haven't observed it), I observed it earlier, in code that iterated through a Lisp vector; at th= e machine level the only pointer was into the middle of that vector. Addres= ses of Lisp_Vector elements are not GCALIGNED on x86 and other platforms. > but it's not what > happened in Eli's case: Yes, that's right. That is, the patch for (1) fixed not only Eli's case, = but other plausible cases. > 1. malloc() % GCALIGNMENT !=3D 0. Never happens, as far as I can tell. Although that's true of all current Emacs porting targets as far as I kno= w, I'd rather not hardwire this into the code, as neither POSIX nor the C standa= rd require it. This is why the comment refers to platforms where malloc() % = 8 !=3D 0 as "oddball hosts". > 2. A Lisp object requires greater alignment than malloc() gives it. > IIRC, there was at least one RISC architecture whose specification We don't need anything that obscure. Just use __int128 on x86 with glibc = 2.24. On that platform __int128's alignment is 16, malloc's is 8. > I'm not saying it's the best solution, but I would prefer simply > defining LISP_ALIGNMENT to be 8 to either patch. That's not correct for !USE_LSB_TAG, where LISP_ALIGNMENT is merely the n= ative alignment (there's no need to align objects to 8 because the tags are at = the high end).