unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 41321@debbugs.gnu.org, monnier@iro.umontreal.ca, pipcet@gmail.com
Subject: bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector objects
Date: Sat, 30 May 2020 15:18:53 -0700	[thread overview]
Message-ID: <b0907f2b-6efd-5e79-295b-438d3975de18@cs.ucla.edu> (raw)
In-Reply-To: <83imgdkyk8.fsf@gnu.org>

On 5/30/20 12:33 PM, Eli Zaretskii wrote:

> Posix may require it, but do we actually know of any supported
> important platforms where this happens?

That depends on what the question is. If the question is "Are there 
platforms where the lost-marker bug occurs?", then no, we don't know of 
any supported important platforms. But if the question is "Are there 
platforms where LISP_ALIGNMENT should be some value other than 8?", then 
yes, LISP_ALIGNMENT should be 4 on Ubuntu 18.04.3 i386 when Emacs is 
configured --with-wide-int (I just tested this, and it is indeed 4 on 
that platform in the Emacs master branch). This is because on this 
platform Lisp objects have a native alignment of 4, and this platform is 
!USE_LSB_TAG so the presence of tag bits imposes no extra alignment 
requirement.

> let's worry about the
> more general fix on master, where we still have time to try various
> solutions, and settle for a simpler and easier fix on emacs-27.

Yes, that's what we're trying to do, and it's what's in the latest patch 
that Pip Cet and I proposed very similar variants of.

> But your proposal is also less efficient, isn't it?   If so, its more
> general nature comes at a price.

Sure. Compared to simply making LISP_ALIGNMENT = 8 as a workaround 
(which is not correct as noted above but which fixes the lost-marker 
bug), the proposed patch is about a 1% CPU-time hit in my usual 
benchmark (make compile-always) on a 32-bit platform compiled with 
--with-wide-int (this is Ubuntu 18.04.4, gcc -m32, Xeon E3-1225 v2). We 
can surely speed this up with some cost in complexity (that's what I was 
working on on the master branch), but for emacs-27 I thought that 
reliability took precedence over 1% performance improvements.

I expect that most of the performance hit is not due to the 
LISP_ALIGNMENT thing, it's due to the "you have to check pointers three 
times" thing. In my master-branch draft I'm working on getting this down 
to "you have to check pointers an average of 1+epsilon times" for some 
suitable value of epsilon. I don't know yet what epsilon will be. But 
anyway, this is only about improving that 1% performance hit.





  reply	other threads:[~2020-05-30 22:18 UTC|newest]

Thread overview: 132+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-16 10:33 bug#41321: 27.0.91; Emacs aborts due to invalid pseudovector objects Eli Zaretskii
2020-05-16 16:33 ` Paul Eggert
2020-05-16 16:47   ` Eli Zaretskii
2020-05-17 10:56 ` Pip Cet
2020-05-17 15:28   ` Eli Zaretskii
2020-05-17 15:57     ` Eli Zaretskii
2020-05-22  7:22       ` Eli Zaretskii
2020-05-22  8:35         ` Andrea Corallo
2020-05-22 11:04           ` Eli Zaretskii
2020-05-22 12:55             ` Andrea Corallo
2020-05-22 10:54         ` Eli Zaretskii
2020-05-22 11:47         ` Pip Cet
2020-05-22 12:13           ` Eli Zaretskii
2020-05-22 12:39             ` Pip Cet
2020-05-22 12:48               ` Eli Zaretskii
2020-05-22 14:04                 ` Pip Cet
2020-05-22 14:26                   ` Eli Zaretskii
2020-05-22 14:40                     ` Andrea Corallo
2020-05-22 19:03                       ` Eli Zaretskii
     [not found]                         ` <CAOqdjBdpU4U1NqErNH0idBmUxNeE3fL=2=KKpo9kbCM3DhW5gA@mail.gmail.com>
2020-05-23 17:58                           ` Andrea Corallo
2020-05-23 22:37                             ` Stefan Monnier
2020-05-23 22:41                               ` Pip Cet
2020-05-23 23:26                                 ` Stefan Monnier
2020-05-22 12:32           ` Eli Zaretskii
2020-05-29  9:51           ` Eli Zaretskii
2020-05-29 10:00             ` Pip Cet
2020-05-23 23:54         ` Pip Cet
2020-05-24 14:24           ` Eli Zaretskii
2020-05-24 15:00             ` Pip Cet
2020-05-24 16:25               ` Eli Zaretskii
2020-05-24 16:55                 ` Eli Zaretskii
2020-05-24 18:03                   ` Pip Cet
2020-05-24 18:40                     ` Eli Zaretskii
2020-05-24 19:40                       ` Pip Cet
2020-05-25  2:30                         ` Eli Zaretskii
2020-05-25  6:40                           ` Pip Cet
2020-05-25 11:28                             ` Pip Cet
2020-05-25 14:53                               ` Eli Zaretskii
2020-05-25 15:12                                 ` Stefan Monnier
2020-05-26  3:39                                 ` Paul Eggert
2020-05-26  3:33                               ` Paul Eggert
2020-05-26  6:18                                 ` Pip Cet
2020-05-26  7:51                                   ` Paul Eggert
2020-05-26  8:27                                     ` Pip Cet
2020-05-26  6:46                                 ` Paul Eggert
2020-05-26 15:17                                   ` Eli Zaretskii
2020-05-26 22:49                                     ` Paul Eggert
2020-05-27 15:26                                       ` Eli Zaretskii
2020-05-27 16:58                                         ` Paul Eggert
2020-05-27 17:33                                           ` Eli Zaretskii
2020-05-27 17:53                                             ` Paul Eggert
2020-05-27 18:24                                               ` Eli Zaretskii
2020-05-27 18:39                                                 ` Paul Eggert
2020-05-28  2:43                                               ` Stefan Monnier
2020-05-28  7:27                                                 ` Eli Zaretskii
2020-05-28  7:41                                                   ` Paul Eggert
2020-05-28 13:30                                                     ` Stefan Monnier
2020-05-28 14:28                                                       ` Pip Cet
2020-05-28 16:24                                                         ` Stefan Monnier
2020-05-29  9:43                                                         ` Pip Cet
2020-05-29 18:31                                                           ` Paul Eggert
2020-05-29 18:37                                                             ` Pip Cet
2020-05-29 19:32                                                               ` Paul Eggert
2020-05-29 19:37                                                                 ` Pip Cet
2020-05-29 20:26                                                                 ` Stefan Monnier
2020-05-29 20:40                                                                   ` Paul Eggert
2020-05-30  5:54                                                                     ` Eli Zaretskii
2020-05-30 17:52                                                                       ` Paul Eggert
2020-05-30 18:11                                                                         ` Eli Zaretskii
2020-05-30 18:17                                                                           ` Paul Eggert
2020-05-30  5:51                                                                   ` Eli Zaretskii
2020-05-30 14:26                                                                     ` Stefan Monnier
2020-05-27 17:57                                           ` Pip Cet
2020-05-27 18:39                                             ` Paul Eggert
2020-05-27 18:56                                               ` Pip Cet
2020-05-28  1:21                                                 ` Paul Eggert
2020-05-28  6:31                                                   ` Pip Cet
2020-05-28  7:47                                                     ` Paul Eggert
2020-05-28  8:11                                                       ` Pip Cet
2020-05-28 18:27                                           ` Eli Zaretskii
2020-05-28 19:33                                             ` Paul Eggert
2020-05-29  6:19                                               ` Eli Zaretskii
2020-05-29 20:24                                                 ` Paul Eggert
2020-05-29 21:01                                                   ` Pip Cet
2020-05-30  5:58                                                     ` Eli Zaretskii
2020-05-30  7:19                                                       ` Pip Cet
2020-05-30  9:08                                                         ` Eli Zaretskii
2020-05-30 11:06                                                           ` Pip Cet
2020-05-30 11:31                                                             ` Eli Zaretskii
2020-05-30 13:29                                                               ` Pip Cet
2020-05-30 16:32                                                                 ` Eli Zaretskii
2020-05-30 16:36                                                                   ` Pip Cet
2020-05-30 16:45                                                                     ` Eli Zaretskii
2020-05-30 18:04                                                                 ` Paul Eggert
2020-05-30 18:12                                                                   ` Pip Cet
2020-05-30 18:16                                                                   ` Eli Zaretskii
2020-05-30 18:45                                                                     ` Paul Eggert
2020-05-30 18:39                                                                   ` Pip Cet
2020-05-30 18:57                                                                     ` Paul Eggert
2020-05-30 19:06                                                                       ` Pip Cet
2020-05-30 21:27                                                                         ` Paul Eggert
2020-05-30 21:49                                                                           ` Pip Cet
2020-05-30 22:23                                                                             ` Paul Eggert
2020-05-30 22:54                                                                               ` Pip Cet
2020-05-30 16:31                                                     ` Paul Eggert
2020-05-30 16:42                                                       ` Eli Zaretskii
2020-05-30 17:06                                                         ` Paul Eggert
2020-05-30 17:22                                                           ` Eli Zaretskii
2020-05-30 18:12                                                             ` Paul Eggert
2020-05-30 18:21                                                               ` Eli Zaretskii
2020-05-30 19:14                                                                 ` Paul Eggert
2020-05-30 19:33                                                                   ` Eli Zaretskii
2020-05-30 22:18                                                                     ` Paul Eggert [this message]
2020-05-31 15:48                                                                       ` Eli Zaretskii
2020-06-01 14:48                                                                         ` Eli Zaretskii
2020-09-27 14:39                                                                           ` Lars Ingebrigtsen
2020-09-27 14:45                                                                             ` Pip Cet
2020-09-27 15:02                                                                               ` Lars Ingebrigtsen
2020-09-27 15:16                                                                             ` Eli Zaretskii
2020-05-30 16:53                                                       ` Pip Cet
2020-05-30  5:50                                                   ` Eli Zaretskii
2020-05-29  8:25                                               ` Pip Cet
2020-05-25 15:14                             ` Eli Zaretskii
2020-05-25 17:41                               ` Pip Cet
2020-05-24 19:00               ` Andy Moreton
2020-05-24 19:09                 ` Pip Cet
2020-05-29 10:16         ` Eli Zaretskii
2020-05-29 10:34           ` Pip Cet
2020-05-29 10:55             ` Eli Zaretskii
2020-05-29 11:47               ` Pip Cet
2020-05-29 13:52                 ` Eli Zaretskii
2020-05-29 14:19                   ` Pip Cet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b0907f2b-6efd-5e79-295b-438d3975de18@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=41321@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=pipcet@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).