unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: "Eli Zaretskii" <eliz@gnu.org>,
	"Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: pipcet@protonmail.com, emacs-devel@gnu.org, eller.helmut@gmail.com
Subject: Re: MPS: assertion failed: header_type (h) != IGC_OBJ_FWD
Date: Tue, 16 Jul 2024 08:49:38 -0700	[thread overview]
Message-ID: <b1caa9e5-41b2-4878-99d4-08395f2b1aed@cs.ucla.edu> (raw)
In-Reply-To: <86zfqhh2xv.fsf@gnu.org>

On 2024-07-16 06:38, Eli Zaretskii wrote:
>> From: Gerd Möllmann<gerd.moellmann@gmail.com>
>> Cc: Emacs Devel<emacs-devel@gnu.org>,  Helmut Eller<eller.helmut@gmail.com>
>> The function scan_ambig assumes that that references are aligned on word
>> boundaries (8 bytes here). I haven't checked (and I'm too lazy to check
>> :-)), but that assumption doesn't have to be true.
> I think it_is_ true.  At least the original allocation code in
> alloc.c made sure it was true.  Paul, am I right?

You're right. In lisp.h, struct Lisp_Symbol is declared with a 
GCALIGNED_UNION_MEMBER, which means that struct Lisp_Symbol must be on 
an address that is a multiple of 8. This is verified statically by 
lisp.h's line "verify (GCALIGNED (struct Lisp_Symbol));". Although there 
could be a bug in Emacs that would use pointer arithmetic to misalign a 
struct Lisp_Symbol, that would be the same class of bug that would 
misalign any other type.

GCALIGNED_UNION_MEMBER is implemented via GNU C and/or C11 primitives if 
available. Although this could be ineffective on older compilers, the 
"verify (GCALIGNED (struct Lisp_Symbol));" would catch any older 
compiler that happened to not align struct Lisp_Symbol properly. In 
practice we've never run into any such compiler and are never likely to 
in the future, so long as we insist only on an alignment of 8.



      parent reply	other threads:[~2024-07-16 15:49 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-14  4:12 MPS: assertion failed: header_type (h) != IGC_OBJ_FWD Gerd Möllmann
2024-07-14  5:30 ` Pip Cet
2024-07-14  7:00   ` Gerd Möllmann
2024-07-14  7:08     ` Gerd Möllmann
2024-07-16 13:02     ` Gerd Möllmann
2024-07-16 13:38       ` Eli Zaretskii
2024-07-16 13:47         ` Gerd Möllmann
2024-07-16 14:11           ` Eli Zaretskii
2024-07-16 14:39             ` Gerd Möllmann
2024-07-16 15:21               ` Eli Zaretskii
2024-07-16 16:54                 ` Gerd Möllmann
2024-07-16 14:19           ` Helmut Eller
2024-07-16 14:48             ` Gerd Möllmann
2024-07-16 15:22               ` Eli Zaretskii
2024-07-16 16:13               ` Pip Cet
2024-07-16 16:47                 ` Gerd Möllmann
2024-07-17  7:51                 ` Andrea Corallo
2024-07-17 19:47               ` Gerd Möllmann
2024-07-18 15:08                 ` Gerd Möllmann
2024-07-18 16:05                   ` Pip Cet
2024-07-18 16:33                     ` Gerd Möllmann
2024-07-18 19:06                   ` Andrea Corallo
2024-07-18 19:33                     ` Gerd Möllmann
2024-07-19  4:38                       ` Gerd Möllmann
2024-07-23  0:36                         ` Pip Cet
2024-07-23  3:31                           ` Gerd Möllmann
2024-07-16 15:49         ` Paul Eggert [this message]

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=b1caa9e5-41b2-4878-99d4-08395f2b1aed@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=eller.helmut@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=pipcet@protonmail.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).